lynxai-team/agent-smith/create-action
Claude Code and agent skill by lynxai-team/agent-smith
- community
Checking that the SKILL.md file is still in the repository.
use when asked to create, define, or modify an action in Agent Smith - writes the .js/.py/.yml file in features/actions/, adds the # tool docblock so agents can call it as a tool, and registers it with lm update
Install
npx vskill@latest install lynxai-team/agent-smith/create-actionSKILL.md
Create an Action
Define, register, and verify an action — a unit of work (JS/Python code or a wrapped shell command) that workflows and agents can call.
Workflow
- Ensure a registered features directory (first time only) — edit the conf file to add your
features/root path, then runlm conf. Actions are discovered from theactions/subdirectory of each registered path (same mechanism as agents/workflows). - Write the action file — create
<name>.jsinfeatures/actions/(default), or.pyfor a Python script /.ymlto wrap a shell command. The filename without extension becomes the action name. - Expose it as an agent tool — add a
# tooldocblock at the very top of the file (see Tool docblock). Without it the action still runs from workflows, but agents cannot call it. - Register — run
lm update. Discovery upserts the action into theactiontable; with a docblock it also upserts a ToolSpec into thetooltable. - (Optional) Give it to an agent — add the action name to the agent's
toolsList, then runlm updateagain. - Verify:
lm updateoutput lists- actions: <name>(and- tools: <name>when exposed).- Run it through a one-step workflow (
steps: [- action: <name>]) withlm <workflow> [args...], or call it from an agent that has it in itstoolsList.
Formats
JavaScript (.js) — default
ESM module exporting an async action(args, options) function. The docblock (first comment in the file) declares the tool interface:
argsshape depends on the caller: string array (CLI / first workflow step), tool arguments object with the docblock's keys (agent tool call), or the workflow context object (later steps) — handle both.optionscarries run flags:debug,verbose,isToolCallwhen called by an agent.- Return a string or object; in workflows an object's keys are merged into the shared context.
- To run shell commands from JS use
utils.execute(cmd, args)—import { utils } from "@agent-smith/core"(seegit_diff.jsexample).
YAML (.yml) — wrap a system command
cmdplus optional staticargs(all strings); runtime args are appended after them, positionally.- Result is the trimmed stdout string of the command.
Python (.py)
Plain script run with python3; arguments arrive in sys.argv[1:]:
Result is the printed stdout as a string.
Tool docblock
The docblock is what makes an action callable by agents; it defines the ToolSpec (name, description, arguments) that other agents see.
- JS: file must start with
/*on line 1 and# toolon line 2; content up to the closing*/is parsed as YAML. - Python: same, but the opening marker is a triple-quote docstring (
"""on line 1). - YAML: a top-level
tool:section instead of a comment. - Fields:
name(overridden by the filename — keep it for documentation),description,arguments(map of arg name →{ description, required }).
Gotchas
- The docblock must be the first bytes of the file — the parser checks the file starts with
/*\n# tool(JS) or"""\n# tool(Python). An import, shebang, or comment before it silently disables tool registration: the action still works from workflows, but agents get "tool <name> not found for agent ...". - Docblock content is parsed as YAML — write
key: valueand nested maps, not JS/JSON object syntax. - The docblock `name` is overridden by the filename — renaming the file renames the tool and breaks every agent
toolsListreferencing it. - Python actions return raw stdout string — printing JSON does not make it structured; if a later workflow step needs keys, use a JS action or an adaptater that parses the output.
- YAML action args are all strings, appended after static `args:` — design the wrapped command to accept them positionally; only trimmed stdout becomes the result (stderr is lost).
- JS actions must export exactly `action` (async function) as ESM — the module is dynamically imported and called at run time; a different export name fails only when the action runs, not at registration.
- Every change requires `lm update` — new files, edited docblocks, or new
toolsListreferences are not picked up until re-registration. - Do not verify with `lm <action-name>` — actions are not standalone CLI commands in the current CLI; run them through a workflow step or an agent tool call.
References (load when needed)
- Action executor (extension dispatch, args handling per format):
agent-smith/packages/core/src/actions/cmd.ts - Tool docblock parser (
# toolmarkers, YAML parsing, name override):agent-smith/packages/core/src/tools.ts - Feature discovery (scans
actions/for .yml/.js/.py, table registration):agent-smith/docsite/public/doc/libraries/core/3.feature-discovery.md - User-facing action doc:
agent-smith/docsite/public/doc/terminal_client/6.actions.md - Real examples:
agent-smith/examples/features/actions/traffic.js,agent-smith/examples/features/actions/weather.py,agent-smith-plugins/code/git/dist/actions/git_diff.js
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/core/src/features/skills/create-action/SKILL.md
Popularity
- Repository stars
- 47
- Repository forks
- 4
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lynxai-team/agent-smith/create-action)