agentworks-cli
How to scaffold, validate, build, test, run, export, import, and publish this project's agents, skills, MCP servers, and hooks with the agentworks CLI. Use whenever asked to add, change, check, ship, or import an artifact in this project.
- License 许可
- MIT
- 最近更新
- 2026-10-07
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agentworks-cli
- description
- How to scaffold, validate, build, test, run, export, import, and publish this project's agents, skills, MCP servers, and hooks with the agentworks CLI. Use whenever asked to add, change, check, ship, or import an artifact in this project.
03 SKILL.md 正文
Using the agentworks CLI
This project is managed by AgentWorks. Prefer
these commands over hand-writing or hand-editing files under agents/, skills/,
mcp/, or hooks/ directly. For what to put inside each kind, load the
matching agentworks-author-<kind> skill.
Authoring
agentworks new <kind> [name] --description "..."— scaffold an artifact (kindisagent/skill/mcp/hook). Omitname/descriptionin an interactive terminal to get a wizard. Flags:--from-template <id>(start from a built-in template),--version <v>(default0.1.0),--target <id>(repeatable). A namespaced name liketeam-a/csv-analyzerlands atskills/team-a/csv-analyzer/.agentworks templates [kind]— list built-in starter templates.agentworks list [kind]— table of discovered artifacts.agentworks validate [path]— structural checks (required fields, kind-specific rules, eval file syntax, field types) plus description-quality warnings, and a warning for any unrecognized frontmatter key (ignored on export, so usually a typo; prefix your own keysx-).--strictmakes warnings fail. Run after every hand edit.
Verifying
agentworks build [path]— run thebuild:command an artifact declares.agentworks test [path]— run thetest:command an artifact declares. An mcp server with notest:gets a smoke check (start it, MCP handshake, list tools).agentworks doctor [path]— static preflight: are the declaredcommand:/test:/build:/eval_runner:binaries on PATH, does theentrypoint:exist, are an mcp server'sauth:env vars set. Never executes anything.--strictfails on missing env vars.agentworks run <mcp-path>— start a local mcp server and inspect it interactively (interactive terminal only; actually executes the command).agentworks eval [path] [--case <name>]— run behavior-eval cases underevals/. See theagentworks-evalsskill.
With no path, build, test, doctor, and eval cover every artifact that declares
something to run.
Shipping
agentworks targets— matrix of which vendor targets support which kinds, and whether a real exporter exists for the combination.agentworks export [path...]— bundle to each target inagentworks.yaml'stargets:(override with--target <id>).--namespace <ns>bundles one plugin per namespace (.= your own un-namespaced artifacts).--format skills.zip/--format skillexport every skill as one zip or as individual.skillfiles, no target needed. Export first runs every exported artifact'sbuild:command and aborts if any fails (--no-buildskips this), so bundled output is always fresh. Output goes todist/, which is gitignored. Targets are project-level; artifacts don't declare their own.agentworks status [path]— offline drift check ofdist/againstagentworks.lock:in sync,modified(exported output was hand-edited; re-export discards it),stale(source changed since export), ormissing.agentworks marketplace— publish the whole project as a plugin marketplace repo: committedplugins/directories plus.claude-plugin/marketplace.jsonand.github/plugin/marketplace.json.--singlefor one plugin total.
Importing
agentworks add <url>— import a published Agent Skill or a Claude Code or GitHub Copilot plugin. Acceptsowner/repo, a repo/tree/blob URL, an archive URL,npm:@scope/name, or any git remote over https/ssh (https://gitlab.com/owner/repo, optionally#ref:path). Filed under a namespace (GitHub owner by default,--namespaceto override). Also imports a plugin's MCP servers and hooks (script files it references come along; a literal credential in a server's env or headers is never imported). Pins the source and exact commit inagentworks.lock(commit that file). Any declared shell command asks for confirmation; read it first.--forcereplaces an artifact that already exists. With no argument in an interactive terminal, opens the plugin browser.agentworks update [path...]— compare imported artifacts against upstream. Reports drift only;--diffshows what would change;--applyoverwrites local copies with the fresh upstream content, but not one you have edited since importing it unless--force.
Other
agentworks graph [--dot]— which artifactsrequires:which. Any artifact may declarerequires: [skill:csv-analyzer, mcp:jira-fetch](kind:nameorkind:namespace/name) andbins: [python3, node>=20];validaterejects a dangling reference or cycle,doctorchecksbins, andexportrefuses a bundle that would leave a requirement out.agentworks tui— full-screen browser for all of the above.agentworks version.- Global flags:
-p, --project <path>(any path inside the project; resolved upward likegit),-v, --verbose,-l, --log-level.
Workflow for a typical change
agentworks new <kind> <name> --description "...", or edit an existing artifact.- Fill in the kind-specific fields (see the
agentworks-author-<kind>skill). agentworks validate, then fix errors and heed description warnings.agentworks build <path>(export also runs it) /agentworks test <path>if declared;agentworks doctor <path>if either can't find a binary.agentworks export(rebuilds first; a failed build stops it). Never hand-edit the output indist/— re-export instead.
04 同仓库更多 Skills
agentworks-evals
How to write and run behavior-eval cases for a skill or agent in this AgentWorks project: the evals/*.yaml format, text, tool-call, and activation assertions, trigger cases, rubrics and a judge, runner protocols (text and json), repeated runs, and agentworks eval. Use when asked to test, evaluate, or regression-check how a skill or agent responds, or whether its description makes a model choose it.
agentworks-author-skill
How to write or edit a skill in this AgentWorks project: skill.md frontmatter, the description that decides when it triggers, entrypoint/scripts/tests layout, and build/test commands. Use when creating or changing anything under skills/.
agentworks-author-mcp
How to write or edit an MCP server in this AgentWorks project: mcp.md frontmatter, local (stdio) versus remote (http/sse) servers, command, args, env and auth, source and tests layout, and the build, test, doctor, and run loop. Use when creating or changing anything under mcp/.
agentworks-author-hook
How to write or edit a lifecycle hook in this AgentWorks project: hook.md frontmatter, choosing vendor-specific event names, matchers and timeouts, the command it runs, and safety review. Use when creating or changing anything under hooks/.
agentworks-author-agent
How to write or edit an agent (subagent) in this AgentWorks project: agent.md frontmatter, portable tools and model settings, writing the instructions, and resources. Use when creating or changing anything under agents/.
csv-analyzer
Analyze a CSV file and flag rows that stand out.