lynxai-team/agent-smith/create-adaptater
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 adaptater (adapter) in Agent Smith - writes the .js file in features/adaptaters/, registers it with lm update so workflows can use it as a data transformation step between actions and agents
Install
npx vskill@latest install lynxai-team/agent-smith/create-adaptaterSKILL.md
Create an Adaptater
Define, register, and verify an adaptater — a JS data-transformation step that workflows run between actions and agents (normalize CLI args, reshape the shared context, prepare prompt for agent steps).
Workflow
- Ensure a registered features directory (first time only) — edit the conf file to add your
features/root path, then runlm conf. Adaptaters are discovered from theadaptaters/subdirectory of each registered path (same mechanism as agents/actions/workflows). - Write the adaptater file — create
<name>.jsinfeatures/adaptaters/; the filename without extension becomes the adaptater name..jsis the only supported extension. The file must be an ESM module exporting an asyncaction(args, options)function (see Format). - Register — run
lm update. Feature discovery upserts the adaptater into theadaptatertable. No ToolSpec is created: unlike actions, adaptaters have no# tooldocblock and cannot be called directly by agents. - (Optional) Wire it into a workflow — add
- adaptater: <name>tosteps:in a workflow YAML (typically step 1, or between two steps whose data formats don't match), then runlm updateagain. - Verify:
lm updateoutput shows+ [adaptater] <name> <path>for the new file.- Run the workflow:
lm <workflow> [args...] --debug— each step prints as it runs; if the adaptater is the final step, its result is printed to stdout.
Format
ESM module exporting an async action(args, options) function:
args(first param): string array when the adaptater is step 1 of a workflow (raw CLI args; piped/clipboard/file input may be appended to the array), or the tool arguments object when the workflow is called as an agent tool; for later steps it is the whole accumulated context object. Handle both shapes.options: run flags —debug,verbose,isToolCallwhen called through an agent tool call.- Return value: an object has its keys merged into the shared workflow context (existing context keys win); a string/array lands in
context.args.
Example
Goal: a workflow that takes CLI args and feeds them as prompt to an agent.
lm q list the planets of the solar system ≡ lm infer "list the planets of the solar system".
Gotchas
- Only `.js` files are discovered —
.py/.ymlinadaptaters/are silently ignored (unlike actions, which support .yml/.js/.py). - The module must export exactly `action` — the executor dynamically imports the file and calls the exported
action; a different export name fails only at run time with a wrapped "executing js action: ..." error, not at registration. - No `# tool` docblock, no ToolSpec — adaptaters cannot be called directly by agents; they exist only as workflow steps. Do not copy the action docblock pattern from the create-action skill.
- No CLI alias —
lm <adaptater-name>does not work (aliases are created only for agents/actions/workflows); verify through a workflow step or programmatically. - Context keys cannot be overwritten — object results merge as
{ ...result, ...context }, so returned keys that already exist in the context are dropped; choose distinct key names (promptto feed an agent step). - Step 1 sees raw CLI args as an array, not an object — normalize in the adaptater (e.g.
params.join(" ")); later steps see the accumulated context object. - Fail loudly — throw on bad input, or return
{ error: ... }; the executor throws a returned error and wraps thrown exceptions asadaptater <name>: <e>. - Every change requires `lm update` — new/edited adaptaters or workflow step lists are not picked up until re-registration.
References (load when needed)
- Adaptater executor (dynamic import,
actioncall, error wrapping):agent-smith/packages/core/src/adaptaters/cmd.ts - Workflow step dispatch + context merge (how an adaptater result flows to the next step):
agent-smith/packages/core/src/workflows/cmd.ts - Feature discovery (
adaptaters/dir scan,.jsonly,adaptatertable, no CLI alias):agent-smith/docsite/public/doc/libraries/core/3.feature-discovery.md - User-facing doc with the prequery example:
agent-smith/docsite/public/doc/terminal_client/7.workflows.md
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-adaptater/SKILL.md
Popularity
- 7-day trend score
- 0
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-adaptater)