[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F6D73H8VGXEQY1J8BBCQJ4":3,"skill-same:01M7F6D73H8VGXEQY1J8BBCQJ4":51},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":33,"ownerHtmlUrl":34,"ownerBlogUrl":33,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M7F6D73H8VGXEQY1J8BBCQJ4","add-capability",null,"Add a Cloudhal capability (MCP tools + policy scopes + optional REST routes and Studio panel) in packages\u002Fmcp-server, packages\u002Fagent-runtime and apps\u002Fstudio. Use when adding an integration or a new set of agent tools.","cloudhal-dev\u002Fcloudhal","cloudhal-dev","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F339305508?v=4","01M7F6CBSQSXRK024DJC53T1F3","Cloudhal","01M7F6CBTBR6CZKSPTB3812R1D",1,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fadd-capability\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: add-capability\ndescription: Add a Cloudhal capability (MCP tools + policy scopes + optional REST routes and Studio panel) in packages\u002Fmcp-server, packages\u002Fagent-runtime and apps\u002Fstudio. Use when adding an integration or a new set of agent tools.\nlicense: Apache-2.0\nmetadata:\n  cloudhal.kind: \"repo-skill\"\n  cloudhal.area: \"area:agent\"\n  cloudhal.status: \"active\"\n---\n\n# Add a capability\n\nA capability is what an agent *can do*: MCP tools, the scopes they need, optional UI. A skill is *how* to do a job and never grants permission. Keep that boundary.\n\nThere is no separate capability package or manifest today (`capabilities\u002F` is still planned). A capability is added in the packages below; a significant one gets an RFC first (`write-rfc`).\n\n## Steps\n\n1. **Tools.** Add a module `packages\u002Fmcp-server\u002Fsrc\u002F\u003Carea>-tools.ts` exporting `\u003Carea>Tools(): ToolDefinition[]` (see `common.ts`), or extend an existing one, and list it in `defineTools()` in `src\u002Ftools.ts`. The order there is what agents see; update `test\u002Ftool-order.test.ts`. Each tool has JSON Schema input\u002Foutput (built from the contract schemas where they exist; same generator-safe subset as `contract-change`), honest `annotations` (`readOnlyHint`\u002F`destructiveHint`\u002F`idempotentHint`), its `scopes`, and a handler over `SiteGraphStore` or the package's store. Errors are `ToolError`s with stable codes and the next step in the text.\n2. **Scopes.** Reuse an existing scope where it fits. A new one goes in `packages\u002Fagent-runtime\u002Fsrc\u002Fpolicy.ts`: `KEY_SCOPES` if a key may carry it, `PERSON_SCOPES` if only people hold it, plus its implications (`IMPLIES`), then in the roles' sets in `src\u002Froles.ts` and, if agents should have it by default, `defaultScopes`. Scope names follow `area:verb` (`content:write`, `site:publish`), with an `:own` variant when it is limited to one's own nodes.\n3. **Approval.** Anything that publishes, deletes or rolls back is `destructiveHint: true` or `requiresApproval: true`, so the policy engine returns `approval-required` and the server asks a person (`input_required`; ADR-0014, ADR-0015 for modes).\n4. **REST and Studio** (if people need it too). Routes in `packages\u002Fapi` (shared suite in `src\u002Ftesting.ts`), the typed client in `apps\u002Fstudio\u002Fsrc\u002Flib\u002Fapi\u002F\u003Carea>.ts`, and a screen or settings section built only from `@cloudhal\u002Fui` (load `studio-ui` and `kumo-design`). Add the tool's label to Studio's `tools` messages so Activity and Approvals name it.\n5. **Secrets** are never committed (AGENTS.md rule 9); they come from the deployment's bindings and environment (`cloudhal deploy`), with test values in `.env.example`.\n6. **Tests.** A test file in `packages\u002Fmcp-server\u002Ftest\u002F` that runs the tools through `runTool` (policy → audit → handler) on a fake or sqlite store, including a call outside the declared scopes being denied and an approval-gated call stopping for approval.\n7. **Docs.** Run `node scripts\u002Fmcp-tools-doc.ts` to regenerate the tool reference in `packages\u002Fmcp-server\u002FREADME.md` (`pnpm check` fails when it is stale). If agents need a playbook for the job, add a skill under `skills\u002Fofficial\u002F`.\n\n## References\n- `docs\u002Fadr\u002F0005-skills-format.md` — capability vs skill boundary\n- `docs\u002Fadr\u002F0011-agent-layer.md`, `packages\u002Fmcp-server\u002FREADME.md`\n- `packages\u002Fagent-runtime\u002FREADME.md` — scopes and roles\n","# Add a capability\n\nA capability is what an agent *can do*: MCP tools, the scopes they need, optional UI. A skill is *how* to do a job and never grants permission. Keep that boundary.\n\nThere is no separate capability package or manifest today (`capabilities\u002F` is still planned). A capability is added in the packages below; a significant one gets an RFC first (`write-rfc`).\n\n## Steps\n\n1. **Tools.** Add a module `packages\u002Fmcp-server\u002Fsrc\u002F\u003Carea>-tools.ts` exporting `\u003Carea>Tools(): ToolDefinition[]` (see `common.ts`), or extend an existing one, and list it in `defineTools()` in `src\u002Ftools.ts`. The order there is what agents see; update `test\u002Ftool-order.test.ts`. Each tool has JSON Schema input\u002Foutput (built from the contract schemas where they exist; same generator-safe subset as `contract-change`), honest `annotations` (`readOnlyHint`\u002F`destructiveHint`\u002F`idempotentHint`), its `scopes`, and a handler over `SiteGraphStore` or the package's store. Errors are `ToolError`s with stable codes and the next step in the text.\n2. **Scopes.** Reuse an existing scope where it fits. A new one goes in `packages\u002Fagent-runtime\u002Fsrc\u002Fpolicy.ts`: `KEY_SCOPES` if a key may carry it, `PERSON_SCOPES` if only people hold it, plus its implications (`IMPLIES`), then in the roles' sets in `src\u002Froles.ts` and, if agents should have it by default, `defaultScopes`. Scope names follow `area:verb` (`content:write`, `site:publish`), with an `:own` variant when it is limited to one's own nodes.\n3. **Approval.** Anything that publishes, deletes or rolls back is `destructiveHint: true` or `requiresApproval: true`, so the policy engine returns `approval-required` and the server asks a person (`input_required`; ADR-0014, ADR-0015 for modes).\n4. **REST and Studio** (if people need it too). Routes in `packages\u002Fapi` (shared suite in `src\u002Ftesting.ts`), the typed client in `apps\u002Fstudio\u002Fsrc\u002Flib\u002Fapi\u002F\u003Carea>.ts`, and a screen or settings section built only from `@cloudhal\u002Fui` (load `studio-ui` and `kumo-design`). Add the tool's label to Studio's `tools` messages so Activity and Approvals name it.\n5. **Secrets** are never committed (AGENTS.md rule 9); they come from the deployment's bindings and environment (`cloudhal deploy`), with test values in `.env.example`.\n6. **Tests.** A test file in `packages\u002Fmcp-server\u002Ftest\u002F` that runs the tools through `runTool` (policy → audit → handler) on a fake or sqlite store, including a call outside the declared scopes being denied and an approval-gated call stopping for approval.\n7. **Docs.** Run `node scripts\u002Fmcp-tools-doc.ts` to regenerate the tool reference in `packages\u002Fmcp-server\u002FREADME.md` (`pnpm check` fails when it is stale). If agents need a playbook for the job, add a skill under `skills\u002Fofficial\u002F`.\n\n## References\n- `docs\u002Fadr\u002F0005-skills-format.md` — capability vs skill boundary\n- `docs\u002Fadr\u002F0011-agent-layer.md`, `packages\u002Fmcp-server\u002FREADME.md`\n- `packages\u002Fagent-runtime\u002FREADME.md` — scopes and roles\n",{"name":5,"license":15,"metadata":24,"description":7},{"cloudhal.area":25,"cloudhal.kind":26,"cloudhal.status":27},"area:agent","repo-skill","active","main","35f66894fd3fc24dbb5f630b9b8e5fb46b2f60ff",".agents\u002Fskills\u002Fadd-capability",0,"https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal","https:\u002F\u002Fcloudhal.com","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev","Open-source, agent-native site platform. Sites your agents can build, safely.","2026-11-15 16:43:04",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add cloudhal-dev\u002Fcloudhal --skill add-capability",{"tool":43,"command":44},"bunx","bunx skills add cloudhal-dev\u002Fcloudhal --skill add-capability",{"tool":46,"command":47},"pnpm","pnpm dlx skills add cloudhal-dev\u002Fcloudhal --skill add-capability","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fadd-capability\u002FSKILL.md",true,[],[52,59,66,73,80,87],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M7F6HKXT8V2ERN4YQX8ZJQPT","stale-review","Review a few published articles that have not been updated for a long time, make small safe fixes in drafts, and leave them as one proposed release for a person to schedule - never publishing anything. Built for a weekly scheduled agent task (begin_run, then end_run) that does not read visitor text. Use for a periodic content review or when asked which old articles need attention.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Fstale-review\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7F6HE4N308FAQSWYFVHPGFD","site-design","Design or redesign Cloudhal pages that look modern and follow the site's own design rules (DESIGN.md). Use when asked to build, design, restyle or improve a page, a landing page or a home page, or to write the site's design rules.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Fsite-design\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7F6HAJD269MKDJ07XH8R538","site-bootstrap","Set up a new Cloudhal site's first pages and navigation from a short brief. Use when a site is empty or the user asks to \"set up\", \"scaffold\" or \"bootstrap\" a site.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Fsite-bootstrap\u002FSKILL.md",[],[],{"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":19},"01M7F6H3CV8KXHTT3FN919WSEX","safe-edit","Make a reviewable change to an existing page or article - snapshot first, edit, preview, report the diff. Use for any edit request on existing content, including re-filing an article under other categories or tags.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Fsafe-edit\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7F6GP12RFE32BQT1D4JCSJY","rollback","Restore a site to an earlier snapshot after confirming the target with the user. Use when something published is wrong and the user asks to revert, undo or roll back.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Frollback\u002FSKILL.md",[],[],{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M7F6G593PWRV1KKKG448S74W","publish-article","Check a draft article, file it under the site's categories and tags, produce a preview and submit it for publication now or at a set time, optionally under an embargo or with an expiry. Use when the user asks to publish, release, schedule or go live with an article.","https:\u002F\u002Fgithub.com\u002Fcloudhal-dev\u002Fcloudhal\u002Fblob\u002Fmain\u002Fskills\u002Fofficial\u002Fpublish-article\u002FSKILL.md",[],[]]