[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F6789VNFG60RDFTNNK7FVN":3,"skill-same:01M7F6789VNFG60RDFTNNK7FVN":44},{"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":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M7F6789VNFG60RDFTNNK7FVN","mods",null,"Claude Code mod capabilities and limits for developing construct. Use when designing or changing a construct feature, a hook, the band, routing, a command, or a gate, to decide whether a mod (hooks\u002Fregister.js), a settings hook (hooks\u002Fscripts\u002F*.mjs), a skill, or an MCP server is the right mechanism.","carsimax\u002Fconstruct","carsimax","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F42248429?v=4","01M7F6660B38RMTKRYJ2DQM39T","Maximiliano Carsi","01M7F6661MDPBN2351WPZNV6CT",1,"MIT","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmods\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: mods\ndescription: Claude Code mod capabilities and limits for developing construct. Use when designing or changing a construct feature, a hook, the band, routing, a command, or a gate, to decide whether a mod (hooks\u002Fregister.js), a settings hook (hooks\u002Fscripts\u002F*.mjs), a skill, or an MCP server is the right mechanism.\n---\n\n# Mods in construct\n\nSource: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Foverview> (read 2026-10-23). Re-read the linked page before relying on a detail that may have changed; the docs win over this file.\n\nA mod is plugin code (JS\u002FTS) that Claude Code runs **in its own process**. `register(on)` registers handlers (\"hooks\") for events. Settings hooks (our `hooks\u002Fscripts\u002F*.mjs`, exec form in `hooks.json`) are external processes; the docs call those \"settings hooks\".\n\n## What only a mod can do\n\n- Draw UI: a pane beside the transcript or a band above the prompt, with tabs, buttons, text fields. → [interface](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Finterface.md)\n- Restyle Claude Code's own UI: tool-call rows, spinner, the question dialog. Never the permission prompt.\n- Step into a tool call or request: hold it while asking the user, answer it without running the tool, send one request to another model. → [events](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fevents.md)\n- `\u002Fcommand` that runs a function at once, with no Claude turn, even while Claude works. → [api](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fapi.md#add-a-command-or-a-tool)\n- Share state between hooks through module variables (one hook records, another shows).\n\n## Handler semantics\n\nEach handler runs **before** Claude Code acts and receives `($, e, next)`:\n\n- Observe: `return next(e)`.\n- Rewrite: `return next({ ...e, ...changes })`.\n- Answer: return a result without calling `next`; the default behavior does not run.\n\nAnything outside the handler's own code (draw, command, model call, file read, process, network) goes through `$` (the mods API). That is why `claude plugin validate` can list a mod's `hooks:` and `calls:` without running it; check that output after adding a new `$` call.\n\n## Where it runs (matters for evals and tests)\n\n| Host | Hooks run | Drawing shows |\n| :- | :- | :- |\n| `claude` terminal, JetBrains | yes | yes |\n| Desktop Code tab (not WSL) | yes | yes, except terminal-only elements |\n| VS Code panel | yes | yes, extension ≥ 2.1.299 (≥ 2.1.304 without feature-flag fetch, e.g. Bedrock) |\n| `claude -p`, Agent SDK | yes | **no** |\n| Remote Control | yes, on the local machine | local terminal only |\n| Cloud session | yes, if the plugin reaches it | no |\n\nConsequences for construct:\n\n- `scripts\u002Feval.sh` runs `claude -p`: routing hooks fire, the band never draws. Test band behavior with `claude plugin test plugins\u002Fconstruct`, not evals. → [test](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Ftest.md)\n- A drawing feature needs a fallback (a transcript line or a command's text reply) where nothing draws.\n- Minimum versions: terminal v2.1.287, Desktop v2.1.286. Keep `MIN_CLAUDE` in `hooks\u002Fstatus\u002F` consistent with any new API used.\n\n## What turns a mod off\n\n- `disableAllHooks: true`, `--safe-mode`, `--bare`, and an org's `allowManagedModsOnly` stop the mod but leave the plugin's skills, agents, commands, and MCP servers loaded. Agent frontmatter is construct's fallback for routing; any new mod feature needs an equivalent \"mod absent\" behavior.\n- `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS` is ignored from v2.1.287.\n- Built-in mods (`cc-plugin-sec-default`, `cc-plugin-diff`, ...) are not stopped by those flags. `cc-plugin-sec-default` runs first and can skip later handlers for an event.\n- Check what loaded: `\u002Fplugin` shows `N mod active · \u003Cnames>`. → [troubleshoot](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Ftroubleshoot.md)\n\n## Trust and permission limits\n\n- Mods are not sandboxed: they run as the user (files, processes, network, env secrets, every prompt and tool call, model usage).\n- A mod can approve a tool call before the user is asked. With managed settings or a Team\u002FEnterprise login, that approval does **not** pass `ask` rules or `PreToolUse` hooks by default; without them it can. Never rely on a mod approval to get past construct's own gates, and never use one to skip a gate. → [permissions precedence](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions.md#precedence-among-rules-hooks-and-mods)\n- The publication gate, surface guard, and command guard stay settings hooks: they must also work when mods are disabled.\n\n## Choosing the mechanism\n\n| Need | Use |\n| :- | :- |\n| Pane, band, spinner\u002Ftool-row restyle, instant `\u002Fcommand`, rewriting an event, per-role model\u002Feffort routing | Mod (`hooks\u002Fregister.js`) |\n| Block, allow, or log an event with a script; also usable as a git hook or from the CLI (`pre-push.mjs`) | Settings hook (`hooks\u002Fscripts\u002F`) |\n| Instructions Claude should follow | Skill |\n| Claude needs to reach an external system | MCP server |\n\n`disableAllHooks` stops settings hooks too; see [what runs under allowManagedHooksOnly](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference#what-runs-under-allowmanagedhooksonly) before claiming a mechanism survives a setting.\n\n## What construct already uses\n\n`hooks\u002Fregister.js` handles `session.start`, `turn.start`, `turn.step`, `turn.complete`, `tool.call`, `tool.check`, `agent.spawn`, `command.run` (`\u002Fconstruct`), and `ui.render` (`AbovePrompt`, the band; it composes with `await next(e)` so other mods keep their rows). It calls `$.ui.invalidate`, `$.command.register`, `$.process.run`, `$.fs.list\u002Fread`, `$.session.*`, `$.clock.now`. The band must not repeat what a user's status line already shows (model, effort, branch, diff, context, plan limits). Unused capabilities worth considering before adding a settings hook or more prompt text: spinner\u002Ftool-row restyle, holding a tool call for a user question, answering a tool call directly, and model calls from a hook.\n\n## References\n\n- Reference (events, methods, elements, limits): \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Freference.md>\n- Create: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fcreate.md>\n- Admin and policy mods: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fadmin.md>\n- Built-in mod sources (`diff`, `agents-md`, `sec-default`, `telemetry`): \u003Chttps:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Ftree\u002Fmain\u002Fmods>\n- Samples (`token-weather`, `blast-radius`, `replay-theater`): \u003Chttps:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code-playground\u002Ftree\u002Fmain\u002Fclaude-code\u002Fmods>\n","# Mods in construct\n\nSource: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Foverview> (read 2026-10-23). Re-read the linked page before relying on a detail that may have changed; the docs win over this file.\n\nA mod is plugin code (JS\u002FTS) that Claude Code runs **in its own process**. `register(on)` registers handlers (\"hooks\") for events. Settings hooks (our `hooks\u002Fscripts\u002F*.mjs`, exec form in `hooks.json`) are external processes; the docs call those \"settings hooks\".\n\n## What only a mod can do\n\n- Draw UI: a pane beside the transcript or a band above the prompt, with tabs, buttons, text fields. → [interface](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Finterface.md)\n- Restyle Claude Code's own UI: tool-call rows, spinner, the question dialog. Never the permission prompt.\n- Step into a tool call or request: hold it while asking the user, answer it without running the tool, send one request to another model. → [events](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fevents.md)\n- `\u002Fcommand` that runs a function at once, with no Claude turn, even while Claude works. → [api](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fapi.md#add-a-command-or-a-tool)\n- Share state between hooks through module variables (one hook records, another shows).\n\n## Handler semantics\n\nEach handler runs **before** Claude Code acts and receives `($, e, next)`:\n\n- Observe: `return next(e)`.\n- Rewrite: `return next({ ...e, ...changes })`.\n- Answer: return a result without calling `next`; the default behavior does not run.\n\nAnything outside the handler's own code (draw, command, model call, file read, process, network) goes through `$` (the mods API). That is why `claude plugin validate` can list a mod's `hooks:` and `calls:` without running it; check that output after adding a new `$` call.\n\n## Where it runs (matters for evals and tests)\n\n| Host | Hooks run | Drawing shows |\n| :- | :- | :- |\n| `claude` terminal, JetBrains | yes | yes |\n| Desktop Code tab (not WSL) | yes | yes, except terminal-only elements |\n| VS Code panel | yes | yes, extension ≥ 2.1.299 (≥ 2.1.304 without feature-flag fetch, e.g. Bedrock) |\n| `claude -p`, Agent SDK | yes | **no** |\n| Remote Control | yes, on the local machine | local terminal only |\n| Cloud session | yes, if the plugin reaches it | no |\n\nConsequences for construct:\n\n- `scripts\u002Feval.sh` runs `claude -p`: routing hooks fire, the band never draws. Test band behavior with `claude plugin test plugins\u002Fconstruct`, not evals. → [test](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Ftest.md)\n- A drawing feature needs a fallback (a transcript line or a command's text reply) where nothing draws.\n- Minimum versions: terminal v2.1.287, Desktop v2.1.286. Keep `MIN_CLAUDE` in `hooks\u002Fstatus\u002F` consistent with any new API used.\n\n## What turns a mod off\n\n- `disableAllHooks: true`, `--safe-mode`, `--bare`, and an org's `allowManagedModsOnly` stop the mod but leave the plugin's skills, agents, commands, and MCP servers loaded. Agent frontmatter is construct's fallback for routing; any new mod feature needs an equivalent \"mod absent\" behavior.\n- `CLAUDE_CODE_ENABLE_FUNCTION_HOOKS` is ignored from v2.1.287.\n- Built-in mods (`cc-plugin-sec-default`, `cc-plugin-diff`, ...) are not stopped by those flags. `cc-plugin-sec-default` runs first and can skip later handlers for an event.\n- Check what loaded: `\u002Fplugin` shows `N mod active · \u003Cnames>`. → [troubleshoot](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Ftroubleshoot.md)\n\n## Trust and permission limits\n\n- Mods are not sandboxed: they run as the user (files, processes, network, env secrets, every prompt and tool call, model usage).\n- A mod can approve a tool call before the user is asked. With managed settings or a Team\u002FEnterprise login, that approval does **not** pass `ask` rules or `PreToolUse` hooks by default; without them it can. Never rely on a mod approval to get past construct's own gates, and never use one to skip a gate. → [permissions precedence](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fpermissions.md#precedence-among-rules-hooks-and-mods)\n- The publication gate, surface guard, and command guard stay settings hooks: they must also work when mods are disabled.\n\n## Choosing the mechanism\n\n| Need | Use |\n| :- | :- |\n| Pane, band, spinner\u002Ftool-row restyle, instant `\u002Fcommand`, rewriting an event, per-role model\u002Feffort routing | Mod (`hooks\u002Fregister.js`) |\n| Block, allow, or log an event with a script; also usable as a git hook or from the CLI (`pre-push.mjs`) | Settings hook (`hooks\u002Fscripts\u002F`) |\n| Instructions Claude should follow | Skill |\n| Claude needs to reach an external system | MCP server |\n\n`disableAllHooks` stops settings hooks too; see [what runs under allowManagedHooksOnly](https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fsettings-reference#what-runs-under-allowmanagedhooksonly) before claiming a mechanism survives a setting.\n\n## What construct already uses\n\n`hooks\u002Fregister.js` handles `session.start`, `turn.start`, `turn.step`, `turn.complete`, `tool.call`, `tool.check`, `agent.spawn`, `command.run` (`\u002Fconstruct`), and `ui.render` (`AbovePrompt`, the band; it composes with `await next(e)` so other mods keep their rows). It calls `$.ui.invalidate`, `$.command.register`, `$.process.run`, `$.fs.list\u002Fread`, `$.session.*`, `$.clock.now`. The band must not repeat what a user's status line already shows (model, effort, branch, diff, context, plan limits). Unused capabilities worth considering before adding a settings hook or more prompt text: spinner\u002Ftool-row restyle, holding a tool call for a user question, answering a tool call directly, and model calls from a hook.\n\n## References\n\n- Reference (events, methods, elements, limits): \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Freference.md>\n- Create: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fcreate.md>\n- Admin and policy mods: \u003Chttps:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fplugins\u002Fmods\u002Fadmin.md>\n- Built-in mod sources (`diff`, `agents-md`, `sec-default`, `telemetry`): \u003Chttps:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code\u002Ftree\u002Fmain\u002Fmods>\n- Samples (`token-weather`, `blast-radius`, `replay-theater`): \u003Chttps:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-code-playground\u002Ftree\u002Fmain\u002Fclaude-code\u002Fmods>\n",{"name":5,"description":7},"main","22badcb55851e82eb81a14d18204460bd3881d4a",".claude\u002Fskills\u002Fmods","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct","https:\u002F\u002Fgithub.com\u002Fcarsimax","2026-10-30 09:50:40",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add carsimax\u002Fconstruct --skill mods",{"tool":36,"command":37},"bunx","bunx skills add carsimax\u002Fconstruct --skill mods",{"tool":39,"command":40},"pnpm","pnpm dlx skills add carsimax\u002Fconstruct --skill mods","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fmods\u002FSKILL.md",true,[],[45,52,59,66,73,80],{"skillNo":46,"name":47,"nameZh":6,"description":48,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":49,"categories":50,"keywords":51,"publishedAt":19},"01M7F69PT3SMFA4AEETFGW0WFH","workflow","The ADD protocol for every implementation request, feature plan, resume, task sizing, and the closing Risk line.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Fworkflow\u002FSKILL.md",[],[],{"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},"01M7F69J7R3HG57HMVY7QNQNX8","sources","Ground version-dependent code in official documentation. Use when you name a specific uncertainty about a library or framework API, a version-dependent pattern, or a deprecation. Skip when the repository already shows the pattern.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Fsources\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},"01M7F69CZ1YC0WHK90EV82CB1M","review","Mandatory outside review of high-risk work units, by lens agents the hooks feed and record, plus the dual blind review on request. Trigger: a unit whose Risk names an item is ready to publish, the publication gate denied a push, PR, or release, or the user asks for a review, a dual review, or an adversarial review.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Freview\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},"01M7F699XTX8F3PNZB0P86XH44","migration","Plan and verify risky migrations and removals. Use when changing a schema or stored data, removing or renaming a public API, flag, config format, or export, replacing a system, or when the task's Risk names item 1 or 3.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Fmigration\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},"01M7F6953SF387B7GX75V6MXE0","delivery","Plan commits, branches, and pull requests as reviewable units. Use when deciding commit contents, opening or preparing a PR, splitting large work into sub-branches of a feature branch, or preparing a release.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Fdelivery\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},"01M7F68YK43AQ6BM0KQPN0BVP4","delegation","When and how the ADD orchestrator delegates to construct agents: role mapping, allowed edit surfaces, parallel writers, verifier timing, handoff prompts, and relaying a subagent's blocking question or choice menu. Trigger: deciding to delegate, launching an agent, writing a handoff, or a subagent or tool returns a question, menu, or consent request.","https:\u002F\u002Fgithub.com\u002Fcarsimax\u002Fconstruct\u002Fblob\u002Fmain\u002Fplugins\u002Fconstruct\u002Fskills\u002Fdelegation\u002FSKILL.md",[],[]]