@dobot-plus/skill
v1.3.1
Published
Agent skill for Dobot+ plugin development
Readme
Dobot+ Agent Skill
@dobot-plus/skill is a Agent Skill that converts the device specification in a project's root Requirements.md into runnable Dobot+ plugin code — Lua logic, UI pages, block/script configurations, and more.
Use it together with @dobot-plus/cli to speed up Dobot+ plugin development.
Requirements
- Node.js v20+
- IDE (with Agent Skills support)
- @dobot-plus/cli (install globally for the
dptbuild command)
Installation
npm install -g @dobot-plus/skill@latestAfter installation, the skill is deployed automatically to:
~/agents/skills/dobot-plus/
├── SKILL.md # Main skill instructions
├── scripts/ # Code generation scripts
├── references/ # Schemas and authoring guidelines
├── package.json # Runtime dependency manifest
└── node_modules/ # Runtime dependencies (e.g. ajv)The default install location is ~/agents/skills/dobot-plus. You can customize it with environment variables:
| Variable | Description |
| --- | --- |
| DOBOT_SKILL_INSTALL_DIR | Root directory for skill installation; defaults to ~/agents/skills |
| SKIP_DOBOT_SKILL_INSTALL | Set to 1 to skip the postinstall deployment step |
Usage
1. Prepare a Dobot+ plugin project
Create or open an existing Dobot+ plugin project with @dobot-plus/cli:
npm install -g @dobot-plus/cli
dpt create2. Write the device specification
Create Requirements.md in the project root describing the device's communication protocol, register addresses, and function definitions. The document should include:
- Protocol parameters (e.g. Modbus RTU baud rate, parity)
- Register addresses and bit-field descriptions
- A list of device functions
See the built-in example at references/Requirements.md.
3. Invoke the skill in IDE
In IDE Chat, run:
/dobot-plusThe agent follows the steps in SKILL.md automatically:
- Parse
Requirements.mdand break it down into atomic function items - Generate and validate
function.json - Generate scaffold code for Lua scripts, HTTP APIs, block configs, UI pages, and more
- Prompt you to run
dpt buildto produce the final plugin package
Directory structure
apps/skill/
├── SKILL.md # IDE skill instructions (deployed on install)
├── install.js # postinstall script for global npm installs
├── package.runtime.json # package.json template for the deployed skill
├── scripts/ # Code generation CLI scripts
│ ├── projectName.js # Read the project name
│ ├── reset.js # Reset project generation state
│ ├── validate.js # Validate function.json
│ ├── http.js # Generate HTTP-related files
│ ├── script.js # Generate script programming config
│ ├── blocks.js # Generate block programming config
│ ├── httpApi.js # Generate httpAPI.lua
│ ├── userApi.js # Generate userAPI.lua
│ ├── modbus.js # Generate Modbus communication module
│ ├── lua.js # Generate core Lua logic skeleton
│ ├── page.js # Generate UI page skeleton
│ └── daemon.js # Generate daemon.lua
└── references/ # Schemas and guidelines
├── function.schema.json # function.json data structure
├── blocks.schema.json # Block config schema
├── scripts.schema.json # Script config schema
├── lua.md # Lua authoring guidelines
├── page.md # UI page authoring guidelines
└── Requirements.md # Requirements.md format exampleDevelopment
When developing locally inside the monorepo, install.js detects that it is not running from a node_modules path and skips the consumer install step.
To publish a new version:
npm run releaseTroubleshooting
Global install fails on Windows (EBUSY)
If npm install -g @dobot-plus/skill fails with EBUSY: resource busy or locked, an older postinstall script is likely conflicting with npm's global install lock. Upgrade to v1.2.1 or later and retry:
npm uninstall -g @dobot-plus/skill
Remove-Item -Recurse -Force "$env:USERPROFILE\agents\skills\dobot-plus" -ErrorAction SilentlyContinue
npm install -g @dobot-plus/skill@latestSkill not recognized by IDE
Verify that the skill is installed at ~/agents/skills/dobot-plus/SKILL.md and that Agent Skills are enabled in IDE settings.
Missing Requirements.md
The skill does not create or modify Requirements.md. Prepare a complete device specification in the project root before invoking /dobot-plus.
Related links
- @dobot-plus/cli — Dobot+ plugin development CLI
- @dobot-plus/template — Plugin project template
- Dobot+ documentation
