[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXAD5MCK6N3SFDMRE7BAAN":3,"skill-same:01M6BXAD5MCK6N3SFDMRE7BAAN":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":37,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M6BXAD5MCK6N3SFDMRE7BAAN","create-adaptater",null,"use when asked to create, define, or modify an adaptater (adapter) in Agent Smith - writes the .js file in features\u002Fadaptaters\u002F, registers it with lm update so workflows can use it as a data transformation step between actions and agents","lynxai-team\u002Fagent-smith","lynxai-team","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F251374637?v=4","01M6BXA5J9YTMDT46KAFFYCFFA","lynxai.team","01M6BXA5PK5C25QTMDWWX01H88",48,"MIT","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-adaptater\u002FSKILL.md",[],[19,20,21,22,23,24,25,26],"create","create adaptater","workflows","update","file","actions","data","js","2026-11-10 10:12:30",false,"---\nname: create-adaptater\ndescription: use when asked to create, define, or modify an adaptater (adapter) in Agent Smith - writes the .js file in features\u002Fadaptaters\u002F, registers it with lm update so workflows can use it as a data transformation step between actions and agents\n---\n\n# Create an Adaptater\n\nDefine, 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).\n\n## Workflow\n\n1. **Ensure a registered features directory** (first time only) — edit the conf file to add your `features\u002F` root path, then run `lm conf`. Adaptaters are discovered from the `adaptaters\u002F` subdirectory of each registered path (same mechanism as agents\u002Factions\u002Fworkflows).\n2. **Write the adaptater file** — create `\u003Cname>.js` in `features\u002Fadaptaters\u002F`; the filename without extension becomes the adaptater name. `.js` is the only supported extension. The file must be an ESM module exporting an async `action(args, options)` function (see Format).\n3. **Register** — run `lm update`. Feature discovery upserts the adaptater into the `adaptater` table. No ToolSpec is created: unlike actions, adaptaters have no `# tool` docblock and cannot be called directly by agents.\n4. **(Optional) Wire it into a workflow** — add `- adaptater: \u003Cname>` to `steps:` in a workflow YAML (typically step 1, or between two steps whose data formats don't match), then run `lm update` again.\n5. **Verify**:\n   - `lm update` output shows `+ [adaptater] \u003Cname> \u003Cpath>` for the new file.\n   - Run the workflow: `lm \u003Cworkflow> [args...] --debug` — each step prints as it runs; if the adaptater is the final step, its result is printed to stdout.\n\n## Format\n\nESM module exporting an async `action(args, options)` function:\n\n```js\n\u002F\u002F features\u002Fadaptaters\u002Fprequery.js\nasync function action(params, options) {\n    const prompt = Array.isArray(params) ? params.join(\" \") : params.prompt;\n    return { prompt };\n}\n\nexport { action };\n```\n\n- `args` (first param): **string array** when the adaptater is step 1 of a workflow (raw CLI args; piped\u002Fclipboard\u002Ffile 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.\n- `options`: run flags — `debug`, `verbose`, `isToolCall` when called through an agent tool call.\n- Return value: an **object** has its keys merged into the shared workflow context (existing context keys win); a **string\u002Farray** lands in `context.args`.\n\n## Example\n\nGoal: a workflow that takes CLI args and feeds them as prompt to an agent.\n\n```yaml\n# features\u002Fworkflows\u002Fq.yml\nsteps:\n  - adaptater: prequery   # [\"list\", \"planets\"] -> { prompt: \"list planets\" }\n  - agent: infer          # picks up prompt from context\n```\n\n```js\n\u002F\u002F features\u002Fadaptaters\u002Fprequery.js\nasync function action(params, options) {\n    const prompt = Array.isArray(params) ? params.join(\" \") : params.prompt;\n    return { prompt };\n}\n\nexport { action };\n```\n\n`lm q list the planets of the solar system` ≡ `lm infer \"list the planets of the solar system\"`.\n\n## Gotchas\n\n- **Only `.js` files are discovered** — `.py`\u002F`.yml` in `adaptaters\u002F` are silently ignored (unlike actions, which support .yml\u002F.js\u002F.py).\n- **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.\n- **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.\n- **No CLI alias** — `lm \u003Cadaptater-name>` does not work (aliases are created only for agents\u002Factions\u002Fworkflows); verify through a workflow step or programmatically.\n- **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 (`prompt` to feed an agent step).\n- **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.\n- **Fail loudly** — throw on bad input, or return `{ error: ... }`; the executor throws a returned error and wraps thrown exceptions as `adaptater \u003Cname>: \u003Ce>`.\n- **Every change requires `lm update`** — new\u002Fedited adaptaters or workflow step lists are not picked up until re-registration.\n\n## References (load when needed)\n\n- Adaptater executor (dynamic import, `action` call, error wrapping): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fadaptaters\u002Fcmd.ts`\n- Workflow step dispatch + context merge (how an adaptater result flows to the next step): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`\n- Feature discovery (`adaptaters\u002F` dir scan, `.js` only, `adaptater` table, no CLI alias): `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Flibraries\u002Fcore\u002F3.feature-discovery.md`\n- User-facing doc with the prequery example: `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Fterminal_client\u002F7.workflows.md`\n","# Create an Adaptater\n\nDefine, 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).\n\n## Workflow\n\n1. **Ensure a registered features directory** (first time only) — edit the conf file to add your `features\u002F` root path, then run `lm conf`. Adaptaters are discovered from the `adaptaters\u002F` subdirectory of each registered path (same mechanism as agents\u002Factions\u002Fworkflows).\n2. **Write the adaptater file** — create `\u003Cname>.js` in `features\u002Fadaptaters\u002F`; the filename without extension becomes the adaptater name. `.js` is the only supported extension. The file must be an ESM module exporting an async `action(args, options)` function (see Format).\n3. **Register** — run `lm update`. Feature discovery upserts the adaptater into the `adaptater` table. No ToolSpec is created: unlike actions, adaptaters have no `# tool` docblock and cannot be called directly by agents.\n4. **(Optional) Wire it into a workflow** — add `- adaptater: \u003Cname>` to `steps:` in a workflow YAML (typically step 1, or between two steps whose data formats don't match), then run `lm update` again.\n5. **Verify**:\n   - `lm update` output shows `+ [adaptater] \u003Cname> \u003Cpath>` for the new file.\n   - Run the workflow: `lm \u003Cworkflow> [args...] --debug` — each step prints as it runs; if the adaptater is the final step, its result is printed to stdout.\n\n## Format\n\nESM module exporting an async `action(args, options)` function:\n\n```js\n\u002F\u002F features\u002Fadaptaters\u002Fprequery.js\nasync function action(params, options) {\n    const prompt = Array.isArray(params) ? params.join(\" \") : params.prompt;\n    return { prompt };\n}\n\nexport { action };\n```\n\n- `args` (first param): **string array** when the adaptater is step 1 of a workflow (raw CLI args; piped\u002Fclipboard\u002Ffile 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.\n- `options`: run flags — `debug`, `verbose`, `isToolCall` when called through an agent tool call.\n- Return value: an **object** has its keys merged into the shared workflow context (existing context keys win); a **string\u002Farray** lands in `context.args`.\n\n## Example\n\nGoal: a workflow that takes CLI args and feeds them as prompt to an agent.\n\n```yaml\n# features\u002Fworkflows\u002Fq.yml\nsteps:\n  - adaptater: prequery   # [\"list\", \"planets\"] -> { prompt: \"list planets\" }\n  - agent: infer          # picks up prompt from context\n```\n\n```js\n\u002F\u002F features\u002Fadaptaters\u002Fprequery.js\nasync function action(params, options) {\n    const prompt = Array.isArray(params) ? params.join(\" \") : params.prompt;\n    return { prompt };\n}\n\nexport { action };\n```\n\n`lm q list the planets of the solar system` ≡ `lm infer \"list the planets of the solar system\"`.\n\n## Gotchas\n\n- **Only `.js` files are discovered** — `.py`\u002F`.yml` in `adaptaters\u002F` are silently ignored (unlike actions, which support .yml\u002F.js\u002F.py).\n- **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.\n- **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.\n- **No CLI alias** — `lm \u003Cadaptater-name>` does not work (aliases are created only for agents\u002Factions\u002Fworkflows); verify through a workflow step or programmatically.\n- **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 (`prompt` to feed an agent step).\n- **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.\n- **Fail loudly** — throw on bad input, or return `{ error: ... }`; the executor throws a returned error and wraps thrown exceptions as `adaptater \u003Cname>: \u003Ce>`.\n- **Every change requires `lm update`** — new\u002Fedited adaptaters or workflow step lists are not picked up until re-registration.\n\n## References (load when needed)\n\n- Adaptater executor (dynamic import, `action` call, error wrapping): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fadaptaters\u002Fcmd.ts`\n- Workflow step dispatch + context merge (how an adaptater result flows to the next step): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`\n- Feature discovery (`adaptaters\u002F` dir scan, `.js` only, `adaptater` table, no CLI alias): `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Flibraries\u002Fcore\u002F3.feature-discovery.md`\n- User-facing doc with the prequery example: `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Fterminal_client\u002F7.workflows.md`\n",{"name":5,"description":7},"main","e8f77439e066ac9c34dc4ea47d83e8cf853e5b3f","packages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-adaptater",3,"https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith","https:\u002F\u002Flynxai-team.github.io\u002Fagent-smith\u002F","https:\u002F\u002Fgithub.com\u002Flynxai-team","https:\u002F\u002Flynxai.team","Private AI - Take control of your cognitive infrastructure","2026-10-13 23:57:30",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add lynxai-team\u002Fagent-smith --skill create-adaptater",{"tool":48,"command":49},"bunx","bunx skills add lynxai-team\u002Fagent-smith --skill create-adaptater",{"tool":51,"command":52},"pnpm","pnpm dlx skills add lynxai-team\u002Fagent-smith --skill create-adaptater","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-adaptater\u002FSKILL.md",true,[],[57,72,83,91,101],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":68,"publishedAt":27},"01M6BXAGXQ7HCZ1J0M2TPWW6NR","create-workflow","use when asked to create, define, or modify a workflow in Agent Smith - writes the .yml file in features\u002Fworkflows\u002F, chains actions\u002Fagents\u002Fadaptaters\u002Fcommands, registers it with lm update so it runs as `lm \u003Cname>` and can be exposed as an agent tool","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-workflow\u002FSKILL.md",[63],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[69,19,70,71,24,23,22,21],"create workflow","workflow","tool",{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":79,"publishedAt":27},"01M6BXAF8V7V4KDD1GGE653BMG","create-agent","use when asked to create, define, or modify an agent in YAML for Agent Smith, optionally exposes it as a subagent tool","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-agent\u002FSKILL.md",[78],{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},[19,80,71,81,82],"create agent","subagent","yaml",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":27},"01M6BXABB60RKKWKY02Z8BWRX3","create-action","use when asked to create, define, or modify an action in Agent Smith - writes the .js\u002F.py\u002F.yml file in features\u002Factions\u002F, adds the","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-action\u002FSKILL.md",[],[90,19,26,24,23],"create action",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":27},"01M6BXA9GZ3JJGGTMDQYTSV83J","update-doc-map","read this only when instructed to update the documentation map","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fmaintenance\u002Fskills\u002Fupdate-doc-map\u002FSKILL.md",[],[98,22,99,100],"update doc map","doc","documentation",{"skillNo":102,"name":103,"nameZh":6,"description":104,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":105,"categories":106,"keywords":111,"publishedAt":27},"01M6BXA80V4Y1PNEHPD1CGGMQA","document-agent-smith-package","use when asked to create or update package documentation in the docsite","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fmaintenance\u002Fskills\u002Fdocument-agent-smith-package\u002FSKILL.md",[107,110],{"categoryNo":108,"categoryName":109,"taxonomyType":66,"taxonomyTypeDesc":67},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":64,"categoryName":65,"taxonomyType":66,"taxonomyTypeDesc":67},[112,113,19,22,100],"document agent smith package","package"]