[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BXAGXQ7HCZ1J0M2TPWW6NR":3,"skill-same:01M6BXAGXQ7HCZ1J0M2TPWW6NR":61},{"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":23,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":40,"repositoryHtmlUrl":41,"repositoryHomepageUrl":42,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":45,"updatedAt":46,"install":47,"resources":60},"01M6BXAGXQ7HCZ1J0M2TPWW6NR","create-workflow",null,"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","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-workflow\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31],"workflow","create","create workflow","workflows","update","file","actions","tool","2026-11-10 10:12:30",false,"---\nname: create-workflow\ndescription: 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\n---\n\n# Create a Workflow\n\nDefine, register, and verify a workflow (an ordered pipeline of actions, agents, adaptaters, and commands) from a YAML file in the Agent Smith framework.\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`. Workflows are discovered from the `workflows\u002F` subdirectory of each registered path (same mechanism as agents\u002Factions).\n2. **Write the workflow YAML** — create `\u003Cname>.yml` in `features\u002Fworkflows\u002F`. The filename (without extension) becomes the workflow name and its CLI command. Only `steps` is required:\n\n   ```yaml\n   steps:\n     - action: \u003Caction-name>\n     - agent: \u003Cagent-name>\n   ```\n\n3. **Register** — run `lm update`. Feature discovery upserts the workflow into the `workflow` table, creates a CLI alias (so `lm \u003Cname>` works), and — if the YAML has a `tool:` section — registers a ToolSpec in the `tool` table so agents can call it.\n4. **(Optional) Expose as an agent tool** — add a `tool:` section with `description` and `arguments`, then run `lm update` again. Other agents reference the workflow by name in their `toolsList`.\n5. **Verify**:\n\n   ```bash\n   lm \u003Cname> [args...]     # runs the pipeline; args feed step 1\n   lm \u003Cname> --debug       # prints each step as it runs\n   ```\n\n## Step types\n\nEach entry in `steps:` is a single-key map naming a registered feature (executor: `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`):\n\n| Key | Runs | Receives |\n|-----|------|----------|\n| `action` | an action (.js\u002F.py\u002F.yml) | step 1: CLI args array; later steps: the whole accumulated context object |\n| `agent` | a registered agent | its prompt (see Data flow) |\n| `adaptater` | a JS data adapter (`.js` only, exports async `action`) | same as action |\n| `command` (or `cmd`) | a user command from `cmds\u002F` (.js exporting `runCmd`) | same as action |\n\n## When steps reference features that don't exist yet\n\nCreate them first using the matching sibling skill — load it with the `load-skill` tool before writing the file: `create-action`, `create-agent-yaml`, `create-adaptater`. Their gotchas (docblock placement, exports, registration) are what make workflows fail at run time.\n\n## Data flow (how steps pass data)\n\nAll steps share one context object:\n\n- **Step 1** receives the raw CLI args as an array — or, when the workflow is called as a tool by an agent, the tool arguments object.\n- Each step's result is merged into the context: a **string\u002Farray result** lands in `context.args`; an **object result** adds its keys to the context. On key collision the *existing* context value wins (later results cannot overwrite earlier keys).\n- An **agent step needs a `prompt`**:\n  - step 1: from the first CLI arg (or `params.prompt` when called as a tool);\n  - later steps: from a `prompt` key in the context — i.e. the previous step must return an object containing `prompt`. Exception: if the previous step was an `action` that returned a **string**, that string becomes the prompt (via `context.args`).\n- An agent's own output is merged as `text` (plus `thinkingText`, `stats`) — **not** as `prompt`.\n\nConsequences:\n- To feed CLI args into an agent, start with an adaptater that returns `{ prompt: ... }` (see examples).\n- To chain agent → agent, insert an adaptater\u002Faction between them that renames the previous `text` to `prompt`; two adjacent agent steps fail with \"provide a prompt for the task\".\n\n## Adaptaters\n\nDeclared in an `adaptaters\u002F` folder (`.js` only), they transform data between steps:\n\n```js\n\u002F\u002F adaptaters\u002Fprequery.js\nasync function action(params, options) {\n    return { prompt: Array.isArray(params) ? params.join(\" \") : params.prompt };\n}\nexport { action };\n```\n\n## Field reference\n\n- `steps` (required): ordered list of step entries.\n- `title` (optional): human-readable label; the workflow's name always comes from the filename.\n- `tool` (optional): exposes the workflow as a callable tool — `description` + `arguments` define the interface other agents see when calling it; the tool name is the filename.\n\n## Examples\n\nMinimal (action returns a string → becomes the agent prompt):\n\n```yaml\n# features\u002Fworkflows\u002Fcommit_msg.yml\ntitle: \"Generate a git commit message from a git diff\"\nsteps:\n  - action: git_diff        # returns the diff string -> context.args\n  - agent: commit_msg       # prompt = that string\n```\n\nAdaptater-first (normalize CLI args for an agent):\n\n```yaml\n# features\u002Fworkflows\u002Fq.yml\nsteps:\n  - adaptater: prequery     # CLI args array -> { prompt: \"...\" }\n  - agent: infer            # prompt from context\n```\n\nFull pipeline exposed as an agent tool (adaptater → agent → action):\n\n```yaml\n# features\u002Fworkflows\u002Fsqlquery.yml\ntool:\n  description: Read data or write in the database. Schema-aware read\u002Fwrite.\n  arguments:\n    prompt:\n      description: The question to ask about the data\nsteps:\n  - adaptater: db-getschema      # returns { prompt, schema }\n  - agent: db-create-query       # prompt from context; declares {schema} variable; outputs SQL as text\n  - action: db-ask-execute-query # receives whole context, reads args.text + options.variables.dbpath\n```\n\nThen in another agent's YAML add `toolsList: [sqlquery]` and run `lm update`.\n\n## Gotchas\n\n- **Agent steps after the first need a `prompt` in the context** or you get \"provide a prompt for the task \u003Cname>\". Agent output is stored under `text`, so agent → agent needs an intermediate adaptater\u002Faction returning `{ prompt: ... }`.\n- **Step 1 sees raw CLI args as an array**, not an object — design step 1 (often an adaptater) to normalize them; later steps see the accumulated context object.\n- **Context keys cannot be overwritten** by later steps (`{...result, ...context}` merge order) — give each step's returned keys distinct names.\n- **The name is the filename.** Renaming the `.yml` file changes the workflow's CLI command and breaks any agent `toolsList` referencing it.\n- **Every change requires `lm update`** — new\u002Fedited workflows, step lists, or `tool:` sections are not picked up until re-registration; a `tool:` section without re-registration leaves callers with \"tool not found\".\n- **Adaptaters must be `.js` exporting an async `action(args, options)` function**; other extensions are not discovered.\n\n## References (load when needed)\n\n- Workflow executor (step types + data flow): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`\n- Workflow YAML parser: `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fread.ts`\n- Feature discovery (dirs, tables, `lm update` pipeline): `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Flibraries\u002Fcore\u002F3.feature-discovery.md`\n- User-facing workflow doc: `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Fterminal_client\u002F7.workflows.md`\n- Real examples: `agent-smith-plugins\u002Fcode\u002Fgit\u002Fdist\u002Fworkflows\u002Fgit_commit.yml`, `agent-smith-plugins\u002Fcode\u002Fsqlite\u002Fdist\u002Fworkflows\u002Fsqlquery.yml`, `agent-smith-plugins\u002Fagents\u002Fdist\u002Fworkflows\u002Fq.yml`\n","# Create a Workflow\n\nDefine, register, and verify a workflow (an ordered pipeline of actions, agents, adaptaters, and commands) from a YAML file in the Agent Smith framework.\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`. Workflows are discovered from the `workflows\u002F` subdirectory of each registered path (same mechanism as agents\u002Factions).\n2. **Write the workflow YAML** — create `\u003Cname>.yml` in `features\u002Fworkflows\u002F`. The filename (without extension) becomes the workflow name and its CLI command. Only `steps` is required:\n\n   ```yaml\n   steps:\n     - action: \u003Caction-name>\n     - agent: \u003Cagent-name>\n   ```\n\n3. **Register** — run `lm update`. Feature discovery upserts the workflow into the `workflow` table, creates a CLI alias (so `lm \u003Cname>` works), and — if the YAML has a `tool:` section — registers a ToolSpec in the `tool` table so agents can call it.\n4. **(Optional) Expose as an agent tool** — add a `tool:` section with `description` and `arguments`, then run `lm update` again. Other agents reference the workflow by name in their `toolsList`.\n5. **Verify**:\n\n   ```bash\n   lm \u003Cname> [args...]     # runs the pipeline; args feed step 1\n   lm \u003Cname> --debug       # prints each step as it runs\n   ```\n\n## Step types\n\nEach entry in `steps:` is a single-key map naming a registered feature (executor: `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`):\n\n| Key | Runs | Receives |\n|-----|------|----------|\n| `action` | an action (.js\u002F.py\u002F.yml) | step 1: CLI args array; later steps: the whole accumulated context object |\n| `agent` | a registered agent | its prompt (see Data flow) |\n| `adaptater` | a JS data adapter (`.js` only, exports async `action`) | same as action |\n| `command` (or `cmd`) | a user command from `cmds\u002F` (.js exporting `runCmd`) | same as action |\n\n## When steps reference features that don't exist yet\n\nCreate them first using the matching sibling skill — load it with the `load-skill` tool before writing the file: `create-action`, `create-agent-yaml`, `create-adaptater`. Their gotchas (docblock placement, exports, registration) are what make workflows fail at run time.\n\n## Data flow (how steps pass data)\n\nAll steps share one context object:\n\n- **Step 1** receives the raw CLI args as an array — or, when the workflow is called as a tool by an agent, the tool arguments object.\n- Each step's result is merged into the context: a **string\u002Farray result** lands in `context.args`; an **object result** adds its keys to the context. On key collision the *existing* context value wins (later results cannot overwrite earlier keys).\n- An **agent step needs a `prompt`**:\n  - step 1: from the first CLI arg (or `params.prompt` when called as a tool);\n  - later steps: from a `prompt` key in the context — i.e. the previous step must return an object containing `prompt`. Exception: if the previous step was an `action` that returned a **string**, that string becomes the prompt (via `context.args`).\n- An agent's own output is merged as `text` (plus `thinkingText`, `stats`) — **not** as `prompt`.\n\nConsequences:\n- To feed CLI args into an agent, start with an adaptater that returns `{ prompt: ... }` (see examples).\n- To chain agent → agent, insert an adaptater\u002Faction between them that renames the previous `text` to `prompt`; two adjacent agent steps fail with \"provide a prompt for the task\".\n\n## Adaptaters\n\nDeclared in an `adaptaters\u002F` folder (`.js` only), they transform data between steps:\n\n```js\n\u002F\u002F adaptaters\u002Fprequery.js\nasync function action(params, options) {\n    return { prompt: Array.isArray(params) ? params.join(\" \") : params.prompt };\n}\nexport { action };\n```\n\n## Field reference\n\n- `steps` (required): ordered list of step entries.\n- `title` (optional): human-readable label; the workflow's name always comes from the filename.\n- `tool` (optional): exposes the workflow as a callable tool — `description` + `arguments` define the interface other agents see when calling it; the tool name is the filename.\n\n## Examples\n\nMinimal (action returns a string → becomes the agent prompt):\n\n```yaml\n# features\u002Fworkflows\u002Fcommit_msg.yml\ntitle: \"Generate a git commit message from a git diff\"\nsteps:\n  - action: git_diff        # returns the diff string -> context.args\n  - agent: commit_msg       # prompt = that string\n```\n\nAdaptater-first (normalize CLI args for an agent):\n\n```yaml\n# features\u002Fworkflows\u002Fq.yml\nsteps:\n  - adaptater: prequery     # CLI args array -> { prompt: \"...\" }\n  - agent: infer            # prompt from context\n```\n\nFull pipeline exposed as an agent tool (adaptater → agent → action):\n\n```yaml\n# features\u002Fworkflows\u002Fsqlquery.yml\ntool:\n  description: Read data or write in the database. Schema-aware read\u002Fwrite.\n  arguments:\n    prompt:\n      description: The question to ask about the data\nsteps:\n  - adaptater: db-getschema      # returns { prompt, schema }\n  - agent: db-create-query       # prompt from context; declares {schema} variable; outputs SQL as text\n  - action: db-ask-execute-query # receives whole context, reads args.text + options.variables.dbpath\n```\n\nThen in another agent's YAML add `toolsList: [sqlquery]` and run `lm update`.\n\n## Gotchas\n\n- **Agent steps after the first need a `prompt` in the context** or you get \"provide a prompt for the task \u003Cname>\". Agent output is stored under `text`, so agent → agent needs an intermediate adaptater\u002Faction returning `{ prompt: ... }`.\n- **Step 1 sees raw CLI args as an array**, not an object — design step 1 (often an adaptater) to normalize them; later steps see the accumulated context object.\n- **Context keys cannot be overwritten** by later steps (`{...result, ...context}` merge order) — give each step's returned keys distinct names.\n- **The name is the filename.** Renaming the `.yml` file changes the workflow's CLI command and breaks any agent `toolsList` referencing it.\n- **Every change requires `lm update`** — new\u002Fedited workflows, step lists, or `tool:` sections are not picked up until re-registration; a `tool:` section without re-registration leaves callers with \"tool not found\".\n- **Adaptaters must be `.js` exporting an async `action(args, options)` function**; other extensions are not discovered.\n\n## References (load when needed)\n\n- Workflow executor (step types + data flow): `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fcmd.ts`\n- Workflow YAML parser: `agent-smith\u002Fpackages\u002Fcore\u002Fsrc\u002Fworkflows\u002Fread.ts`\n- Feature discovery (dirs, tables, `lm update` pipeline): `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Flibraries\u002Fcore\u002F3.feature-discovery.md`\n- User-facing workflow doc: `agent-smith\u002Fdocsite\u002Fpublic\u002Fdoc\u002Fterminal_client\u002F7.workflows.md`\n- Real examples: `agent-smith-plugins\u002Fcode\u002Fgit\u002Fdist\u002Fworkflows\u002Fgit_commit.yml`, `agent-smith-plugins\u002Fcode\u002Fsqlite\u002Fdist\u002Fworkflows\u002Fsqlquery.yml`, `agent-smith-plugins\u002Fagents\u002Fdist\u002Fworkflows\u002Fq.yml`\n",{"name":5,"description":7},"main","e8f77439e066ac9c34dc4ea47d83e8cf853e5b3f","packages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-workflow",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":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add lynxai-team\u002Fagent-smith --skill create-workflow",{"tool":53,"command":54},"bunx","bunx skills add lynxai-team\u002Fagent-smith --skill create-workflow",{"tool":56,"command":57},"pnpm","pnpm dlx skills add lynxai-team\u002Fagent-smith --skill create-workflow","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-workflow\u002FSKILL.md",true,[],[62,73,83,91,101],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":69,"publishedAt":32},"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",[68],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[25,70,31,71,72],"create agent","yaml","subagent",{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":32},"01M6BXAD5MCK6N3SFDMRE7BAAN","create-adaptater","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","https:\u002F\u002Fgithub.com\u002Flynxai-team\u002Fagent-smith\u002Fblob\u002Fmain\u002Fpackages\u002Fcore\u002Fsrc\u002Ffeatures\u002Fskills\u002Fcreate-adaptater\u002FSKILL.md",[],[25,80,30,81,82,29,28,27],"create adaptater","data","js",{"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":32},"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",[],[25,90,82,30,29],"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":32},"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",[],[28,98,99,100],"doc","update doc map","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":32},"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":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[112,113,100,28,25],"package","document agent smith package"]