servo_dog
Skill34 starsChanged 6 months agoMITView on GitHub
Use this skill when the user asks to control a four-servo robotic dog, start the Servo Dog web control panel, calibrate dog leg servo offsets, or run dog actions such as forward, backward, turn, bow, shake hand, jump, or retract legs. This skill controls four servos directly from Lua with mcpwm. Default GPIOs are: Default neutral angles are compatible with the original servo dog controller: Run the server script asynchronously. It starts the PWM worker, mounts the bundled web UI,…
In this repository42 other files it gives its agents.
- air_mouseSkill
- balance_ballSkill
- bilibili_up_fansSkill
- camera_previewSkill
- china_a_share_quoteSkill
- clock_dial_demoSkill
- cloudmusicSkill
- codex_usage_dashboardSkill
- current_ip_infoSkill
- current_weatherSkill
- dfrobot_matrix_lidar_8x8_i2cSkill
- dfrobot_stcc4_i2cSkill
- dinoSkill
- example_skillSkill
- flappybirdSkill
- flashbackSkill
- game_2048Skill
- game_of_lifeSkill
- gimbal_color_detectSkill
- gimbal_motion_detectSkill
- github_repo_starSkill
- jump_prince_gameSkill
- lcd_touch_paintSkill
- mazeSkill
- mosaico-musicalSkill
- movement_detectionSkill
- network_radioSkill
- number_puzzleSkill
- reaction_gameSkill
- snake_gameSkill
- snakeSkill
- stock_quotes_displaySkill
- tetris_clockSkill
- token_usageSkill
- unihiker_buttonSkill
- unihiker_expansion_batterySkill
- unihiker_expansion_irSkill
- unihiker_expansion_motor_controlSkill
- unihiker_expansion_servo_controlSkill
- unihiker_expansion_WS2812Skill
- weather_clockSkill
- whack_mole_gameSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Use this skill when the user asks to control a four-servo robotic dog, start the Servo Dog web control panel, calibrate dog leg servo …
- Distinctive: line 27
Default neutral angles are compatible with the original servo dog controller:
- Distinctive: line 36
Run the server script asynchronously.
- Distinctive: line 60
After it starts, open:
- Distinctive: line 88
If the command script reports that the controller is not running, start the web control script first.
- Distinctive: line 164
Start calibration from the web UI or send:
- Very specific: line 190
Add a Lua function that calls set_angle() or set_angles() and uses action_delay(ms) inside long loops.
- Very specific: line 193
Add a button entry in the server ACTIONS list if the web UI should expose it.
- Very specific: line 195
Use action_delay() instead of delay.delay_ms() inside actions so a new command can interrupt the current action.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Servo Dog
Use this skill when the user asks to control a four-servo robotic dog, start the Servo Dog web control panel, calibrate dog leg servo offsets, or run dog actions such as forward, backward, turn, bow, shake hand, jump, or retract legs.
This skill controls four servos directly from Lua with mcpwm. Default GPIOs are:
fl_gpio:1fr_gpio:2bl_gpio:41br_gpio:42
Default neutral angles are compatible with the original servo dog controller:
fl_neutral:70fr_neutral:110bl_neutral:110br_neutral:70
Start Web Control
Run the server script asynchronously. It starts the PWM worker, mounts the bundled web UI, and registers HTTP APIs.
{
"path": "{CUR_SKILL_DIR}/scripts/servo_dog_server.lua",
"timeout_ms": 0,
"name": "servo_dog_server",
"exclusive": "servo_dog",
"replace": true,
"args": {
"app_id": "servo_dog",
"queue_name": "servo_dog_cmd",
"web_root": "{CUR_SKILL_DIR}/assets",
"worker_path": "{CUR_SKILL_DIR}/scripts/servo_dog_worker.lua",
"worker_args": {
"fl_gpio": 1,
"fr_gpio": 2,
"bl_gpio": 41,
"br_gpio": 42
}
}
}After it starts, open:
/lua/servo_dog/The page uses:
GET /api/lua/servo_dog/statePOST /api/lua/servo_dog/controlGET /api/lua/servo_dog/start_calibrationGET /api/lua/servo_dog/exit_calibrationPOST /api/lua/servo_dog/adjust
Command Control
For command or agent control, keep the server running and call:
{
"path": "{CUR_SKILL_DIR}/scripts/servo_dog_command.lua",
"args": {
"queue_name": "servo_dog_cmd",
"action": "forward"
}
}If the command script reports that the controller is not running, start the web control script first.
Actions
Supported action names:
installationidleforwardbackwardturn_leftturn_rightlay_downbowlean_backbow_leansway_back_forthswayshake_handpokeshake_back_legsjump_forwardjump_backwardretract_legs
Movement aliases:
{"move":"F"}
{"move":"B"}
{"move":"L"}
{"move":"R"}Original web action id aliases:
{"action":"1"}
{"action":"2"}
{"action":"3"}
{"action":"4"}
{"action":"5"}
{"action":"6"}
{"action":"7"}
{"action":"8"}
{"action":"9"}
{"action":"10"}
{"action":"11"}
{"action":"12"}These map to lay_down, bow, lean_back, bow_lean, sway_back_forth, sway, shake_hand, poke, shake_back_legs, jump_forward, jump_backward, and retract_legs.
Optional Action Args
Some actions accept overrides:
{
"action": "forward",
"args": {
"repeat_count": 3,
"speed": 90
}
}Supported fields are:
repeat_count: positive integer for repeated gait/action cycles.speed: higher values shorten interpolation delay.hold_time_ms: hold duration for actions such asbow,lean_back, andshake_hand.angle_offset: offset used byidleandsway.
Calibration
Start calibration from the web UI or send:
{"action":"installation"}Adjust one servo offset:
{
"path": "{CUR_SKILL_DIR}/scripts/servo_dog_command.lua",
"args": {
"queue_name": "servo_dog_cmd",
"type": "adjust",
"servo": "fl",
"value": 3
}
}Valid servo ids are fl, fr, bl, and br. Values are clamped to -25..25 and saved under the DATA root in servo_dog/config.json.
Extension
To add a new dog action, edit {CUR_SKILL_DIR}/scripts/servo_dog_worker.lua:
- Add a Lua function that calls
set_angle()orset_angles()and usesaction_delay(ms)inside long loops. - Register it in the
actionstable. - Optionally add an alias in
action_aliases. - Add a button entry in the server
ACTIONSlist if the web UI should expose it.
Use action_delay() instead of delay.delay_ms() inside actions so a new command can interrupt the current action.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

