[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EBA943WS5WP0N31Z0B58V0":3,"skill-same:01M7EBA943WS5WP0N31Z0B58V0":46},{"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":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EBA943WS5WP0N31Z0B58V0","plugin-authoring",null,"Write or debug a Claude Code plugin made of function hooks (a hooks module exporting register(on, options), hooks ($, e, next) on events like tool.call, prompt.submit, ui.render, session.start). Load it before writing or changing such a plugin; it says where the exact types come from, how to run a plugin under development, and where the engine reports what it refused.","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F02-厂商系统提示词\u002Fsystem_prompts_leaks\u002FAnthropic\u002Fclaude-code\u002Fskills\u002Fplugin-authoring\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: plugin-authoring\ndescription: Write or debug a Claude Code plugin made of function hooks (a hooks module exporting register(on, options), hooks ($, e, next) on events like tool.call, prompt.submit, ui.render, session.start). Load it before writing or changing such a plugin; it says where the exact types come from, how to run a plugin under development, and where the engine reports what it refused.\n---\n\nYou are about to write, extend or debug a plugin made of function hooks.\nThis note is orientation: what such a plugin is, where its exact contract\nis written down for the build you are running in, and where to look when\nsomething does not take. The API is early access and moves between\nreleases, so treat the generated declarations as the authority and this\nnote as the map to them.\n\n## What a plugin of function hooks is\n\nA plugin is a folder with a `.claude-plugin\u002Fplugin.json` manifest. Its\nfunction hooks live in one hooks module: a TypeScript or JavaScript file\nthat `hooks\u002Fhooks.json` names under `modules` (one path, relative to that\nfile), exporting `register(on, options)`. `on(event, matcher?, hook)` adds a\nhook; `options` holds the values of the fields the manifest's `userConfig`\ndeclares. Every hook has the shape `($, e, next)`: `$` is the engine\ninterface (display, model, session, prompt, tools, filesystem, store,\nclock, network, host commands, settings, environment, the config menu's rows and the rest), `e` is the event's input as a plain value,\nand `next(e)` continues to the other plugins and then the engine's own\nbehaviour, resolving to the event's result. A hook that returns without\ncalling `next` answers for itself; one that calls `next({ ...e, ... })`\nrewrites what the rest of the chain sees, within what that event allows.\nThe module runs in an environment of its own, with no DOM and no Node:\neverything outside it is reached through `$`. JSX is available with `h` as\nthe factory.\n\nThe events cover tool calls and their descriptions, the prompt as submitted, the system prompt's sections and the first message's context blocks, what the interface\ndraws, the turn's start, steps and completion, the session's start and deliveries, each hooks module's admission, skills, subagents and attribution text. Which of them a\nfeature is, and what it needs from `$`, are the two questions worth settling before writing. One event streams: `turn.step`, a model request of the turn, whose hook is an\nasync generator (`async function* ($, e, next) {}`, the one form that loads there); `next(e)` is the stream beneath, `yield* next(e)` forwards it and evaluates to the\nstep's result, `for await` over it rewrites the chunks (`TurnStepChunk`) one at a time, yielding without `next` answers alone, and a chunk once yielded stays, so a hook\nthat fails mid-stream is left where it stood and the rest of the response comes from beneath it.\n\n## The types are the reference\n\nDo not guess at an event's input, a method on `$`, or an element's props.\nRun `\u002Fplugin-types` in the session (it takes an optional directory and\ndefaults to `.claude\u002Ftypes`). It writes two files from the running build:\n`claude-code.d.ts`, which declares the module `claude-code` (import types\nfrom it; at run time the import is empty), the globals a hooks module has,\nand the inputs of this build's built-in tools; and `claude-code-mcp.d.ts`,\nthe inputs of the MCP tools connected right now, so `e` narrows per tool.\nThe header of `claude-code.d.ts` carries a `tsconfig.json` that fits a hooks\nmodule and shows how to type `register` against `Register`.\n\nRead that file for every event's input and result, every noun and method on\n`$` with its doc comment and example, every element each surface draws and\nthe props each element accepts, and the limits it states. Shapes there are\nthe engine's own, not the Messages API's: `$.session.messages()`, for one,\nanswers `SessionMessage` rows of `{ role, text, toolUses }`, not `content`\nblocks. When the build updates, regenerate rather than edit.\n`claude plugin validate \u003Cpath>` reads a plugin's manifest and its hooks\nmodule's source and reports what the module hooks and calls, which is the\nquickest check that the engine sees what you meant.\n\n## Developing one\n\n`claude --plugin-dir \u003Cfolder>` loads the plugin from disk for that session\nonly (repeat the flag for several). In an interactive session the folder is\nwatched: saving a file reloads the hooks module, so `register` runs again in\na fresh environment and the previous environment's timers are dropped.\nOptions for a plugin loaded this way are read from settings under\n`pluginConfigs`, keyed by the plugin's `\u003Cname>` (or `\u003Cname>@inline`); each non-secret `userConfig` field is a row in the config menu too, and a change there reloads the module with the new `options`.\n\nRun with `claude --debug` while developing. A hook that fails is skipped and\nthe chain continues without it, unless its registration's `.catch` handler\nanswers in its place; the transcript says so once, in a dim line naming the\nplugin, the event and the reason, as it names a module that did not load. The debug log has every occurrence and each result the engine\nrefused, so a plugin that seems to do nothing has usually been told why.\n\n## Drawing: ui.render\n\nA `ui.render` hook receives one component instance. `e.component` says\nwhich component, `e.surface` where it is drawn (`terminal`, `desktop` or\n`mobile`), `e.requestId` which instance (the tool_use_id for a tool row or\ndialog, the message id for a message, the agent id for a spinner), `e.props`\nthe component's plain-data props, and `e.viewport`, when the surface has\nmeasured, the size it draws into in character cells: `columns` and `rows`.\nA change of width re-runs every hooked site once the resize settles, so a\ntree sized to `columns` stays right; a change of height alone re-draws\nnothing. `$.ui.invalidate` asks for a redraw when the hook's own state\nchanged.\n\nBuild trees from the table `$.ui.resolve(e)` returns: the surface's element\nconstructors, destructured into the hook's JSX tags (a module has no element\nglobals). Tables differ per surface, see `Elements` (`mobile` has no `Input`,\n`Select` or `Client`, `terminal` no `Svg`); narrowing `e.surface` narrows the\ntable. Return a tree, or `next({ ...e, props })` to change what the engine\ndraws, or `next(e)` to leave it. A tree that does not validate (an element\nthe surface lacks, a prop it does not take, a child where none goes) is not\ndrawn: the engine draws its own instead and writes to the debug log a line\nbeginning `ui.render (\u003CComponent>): a hook returned a tree that does not\nvalidate`, followed by the reason. When a drawing silently falls back,\nthat line and the element's props type are the two things to read. Buttons,\ntext fields and selects keep their handlers in the plugin and raise\n`ui.press`, `ui.input` and `ui.select`; keys reach one only while it has\nfocus, Esc returns to the prompt. A keyed `Box` scopes `hover` styles.\n\n## Work that outlives a dispatch\n\nA hook runs inside one dispatch with a budget, and `next.signal` aborts\nwhen that dispatch is abandoned (the user interrupted, another hook settled\nfirst, the budget ran out); anything started for the dispatch should stop\non it. Work meant to outlive a dispatch belongs elsewhere: start it from a\n`session.start` hook, which fires once when the session is ready and is\nawaited before the first prompt (so a `$.tool.register` awaited there is\nlisted by turn one), and keep it going with `$.clock.every` and\n`$.clock.after`, whose timers run until cancelled or until the module\nreloads. `$.prompt.submit` hands the session a prompt once it is idle, so\nbackground work can wake a quiet session. `$.ui.status`, `$.ui.toast` and\n`$.ui.log` show state without starting a turn, `$.store` keeps values\nacross sessions, and `$.process.run` runs a host command by argv.\n\n## Tools the model can call\n\n`$.tool.register` declares a tool: its name, the description the model\nreads and its input schema; the tool is listed as `mcp__\u003Cplugin>__\u003Cname>`.\nThe plugin serves it by hooking `tool.call` with the matcher\n`{ tool: 'mcp__\u003Cplugin>__\u003Cname>' }` and returning the result, and a call\nno hook answers fails saying so. Registering the same name again replaces\nthe tool, and a plugin may register several, each listed as it lands.\n","You are about to write, extend or debug a plugin made of function hooks.\nThis note is orientation: what such a plugin is, where its exact contract\nis written down for the build you are running in, and where to look when\nsomething does not take. The API is early access and moves between\nreleases, so treat the generated declarations as the authority and this\nnote as the map to them.\n\n## What a plugin of function hooks is\n\nA plugin is a folder with a `.claude-plugin\u002Fplugin.json` manifest. Its\nfunction hooks live in one hooks module: a TypeScript or JavaScript file\nthat `hooks\u002Fhooks.json` names under `modules` (one path, relative to that\nfile), exporting `register(on, options)`. `on(event, matcher?, hook)` adds a\nhook; `options` holds the values of the fields the manifest's `userConfig`\ndeclares. Every hook has the shape `($, e, next)`: `$` is the engine\ninterface (display, model, session, prompt, tools, filesystem, store,\nclock, network, host commands, settings, environment, the config menu's rows and the rest), `e` is the event's input as a plain value,\nand `next(e)` continues to the other plugins and then the engine's own\nbehaviour, resolving to the event's result. A hook that returns without\ncalling `next` answers for itself; one that calls `next({ ...e, ... })`\nrewrites what the rest of the chain sees, within what that event allows.\nThe module runs in an environment of its own, with no DOM and no Node:\neverything outside it is reached through `$`. JSX is available with `h` as\nthe factory.\n\nThe events cover tool calls and their descriptions, the prompt as submitted, the system prompt's sections and the first message's context blocks, what the interface\ndraws, the turn's start, steps and completion, the session's start and deliveries, each hooks module's admission, skills, subagents and attribution text. Which of them a\nfeature is, and what it needs from `$`, are the two questions worth settling before writing. One event streams: `turn.step`, a model request of the turn, whose hook is an\nasync generator (`async function* ($, e, next) {}`, the one form that loads there); `next(e)` is the stream beneath, `yield* next(e)` forwards it and evaluates to the\nstep's result, `for await` over it rewrites the chunks (`TurnStepChunk`) one at a time, yielding without `next` answers alone, and a chunk once yielded stays, so a hook\nthat fails mid-stream is left where it stood and the rest of the response comes from beneath it.\n\n## The types are the reference\n\nDo not guess at an event's input, a method on `$`, or an element's props.\nRun `\u002Fplugin-types` in the session (it takes an optional directory and\ndefaults to `.claude\u002Ftypes`). It writes two files from the running build:\n`claude-code.d.ts`, which declares the module `claude-code` (import types\nfrom it; at run time the import is empty), the globals a hooks module has,\nand the inputs of this build's built-in tools; and `claude-code-mcp.d.ts`,\nthe inputs of the MCP tools connected right now, so `e` narrows per tool.\nThe header of `claude-code.d.ts` carries a `tsconfig.json` that fits a hooks\nmodule and shows how to type `register` against `Register`.\n\nRead that file for every event's input and result, every noun and method on\n`$` with its doc comment and example, every element each surface draws and\nthe props each element accepts, and the limits it states. Shapes there are\nthe engine's own, not the Messages API's: `$.session.messages()`, for one,\nanswers `SessionMessage` rows of `{ role, text, toolUses }`, not `content`\nblocks. When the build updates, regenerate rather than edit.\n`claude plugin validate \u003Cpath>` reads a plugin's manifest and its hooks\nmodule's source and reports what the module hooks and calls, which is the\nquickest check that the engine sees what you meant.\n\n## Developing one\n\n`claude --plugin-dir \u003Cfolder>` loads the plugin from disk for that session\nonly (repeat the flag for several). In an interactive session the folder is\nwatched: saving a file reloads the hooks module, so `register` runs again in\na fresh environment and the previous environment's timers are dropped.\nOptions for a plugin loaded this way are read from settings under\n`pluginConfigs`, keyed by the plugin's `\u003Cname>` (or `\u003Cname>@inline`); each non-secret `userConfig` field is a row in the config menu too, and a change there reloads the module with the new `options`.\n\nRun with `claude --debug` while developing. A hook that fails is skipped and\nthe chain continues without it, unless its registration's `.catch` handler\nanswers in its place; the transcript says so once, in a dim line naming the\nplugin, the event and the reason, as it names a module that did not load. The debug log has every occurrence and each result the engine\nrefused, so a plugin that seems to do nothing has usually been told why.\n\n## Drawing: ui.render\n\nA `ui.render` hook receives one component instance. `e.component` says\nwhich component, `e.surface` where it is drawn (`terminal`, `desktop` or\n`mobile`), `e.requestId` which instance (the tool_use_id for a tool row or\ndialog, the message id for a message, the agent id for a spinner), `e.props`\nthe component's plain-data props, and `e.viewport`, when the surface has\nmeasured, the size it draws into in character cells: `columns` and `rows`.\nA change of width re-runs every hooked site once the resize settles, so a\ntree sized to `columns` stays right; a change of height alone re-draws\nnothing. `$.ui.invalidate` asks for a redraw when the hook's own state\nchanged.\n\nBuild trees from the table `$.ui.resolve(e)` returns: the surface's element\nconstructors, destructured into the hook's JSX tags (a module has no element\nglobals). Tables differ per surface, see `Elements` (`mobile` has no `Input`,\n`Select` or `Client`, `terminal` no `Svg`); narrowing `e.surface` narrows the\ntable. Return a tree, or `next({ ...e, props })` to change what the engine\ndraws, or `next(e)` to leave it. A tree that does not validate (an element\nthe surface lacks, a prop it does not take, a child where none goes) is not\ndrawn: the engine draws its own instead and writes to the debug log a line\nbeginning `ui.render (\u003CComponent>): a hook returned a tree that does not\nvalidate`, followed by the reason. When a drawing silently falls back,\nthat line and the element's props type are the two things to read. Buttons,\ntext fields and selects keep their handlers in the plugin and raise\n`ui.press`, `ui.input` and `ui.select`; keys reach one only while it has\nfocus, Esc returns to the prompt. A keyed `Box` scopes `hover` styles.\n\n## Work that outlives a dispatch\n\nA hook runs inside one dispatch with a budget, and `next.signal` aborts\nwhen that dispatch is abandoned (the user interrupted, another hook settled\nfirst, the budget ran out); anything started for the dispatch should stop\non it. Work meant to outlive a dispatch belongs elsewhere: start it from a\n`session.start` hook, which fires once when the session is ready and is\nawaited before the first prompt (so a `$.tool.register` awaited there is\nlisted by turn one), and keep it going with `$.clock.every` and\n`$.clock.after`, whose timers run until cancelled or until the module\nreloads. `$.prompt.submit` hands the session a prompt once it is idle, so\nbackground work can wake a quiet session. `$.ui.status`, `$.ui.toast` and\n`$.ui.log` show state without starting a turn, `$.store` keeps values\nacross sessions, and `$.process.run` runs a host command by argv.\n\n## Tools the model can call\n\n`$.tool.register` declares a tool: its name, the description the model\nreads and its input schema; the tool is listed as `mcp__\u003Cplugin>__\u003Cname>`.\nThe plugin serves it by hooking `tool.call` with the matcher\n`{ tool: 'mcp__\u003Cplugin>__\u003Cname>' }` and returning the result, and a call\nno hook answers fails saying so. Registering the same name again replaces\nthe tool, and a plugin may register several, each listed as it lands.\n",{"name":5,"description":7},"main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","02-厂商系统提示词\u002Fsystem_prompts_leaks\u002FAnthropic\u002Fclaude-code\u002Fskills\u002Fplugin-authoring",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill plugin-authoring",{"tool":38,"command":39},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill plugin-authoring",{"tool":41,"command":42},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill plugin-authoring","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F02-厂商系统提示词\u002Fsystem_prompts_leaks\u002FAnthropic\u002Fclaude-code\u002Fskills\u002Fplugin-authoring\u002FSKILL.md",true,[],[47,55,60,67,74,81],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":54},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":56,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":54},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":54},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":54},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":54},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":54},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]