[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CX2EVMY1M34F4RXAR03639":3,"skill-same:01M7CX2EVMY1M34F4RXAR03639":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":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7CX2EVMY1M34F4RXAR03639","agentworks-author-hook",null,"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\u002F.","mtfuller\u002Fagentworks","mtfuller","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F8827772?v=4","01M7CX14Y5SM1380QNFB135MSH","Thomas Fuller","01M7CX14YTMWAKKZ743XPPP1RJ",0,"MIT","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-hook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: agentworks-author-hook\ndescription: >\n  How to write or edit a lifecycle hook in this AgentWorks project: hook.md frontmatter,\n  choosing vendor-specific event names, matchers and timeouts, the command it runs, and\n  safety review. Use when creating or changing anything under hooks\u002F.\n---\n\n# Authoring a hook\n\nA hook runs a shell command automatically on a harness lifecycle event (before a tool runs,\nat session start, after a file edit, ...).\n\n## Create it\n\n```bash\nagentworks new hook \u003Cname> --description \"What it enforces or reports, and on which event\"\n```\n\nOr `--from-template \u003Cid>` (`pre-commit-lint`, `notify-webhook`).\n\n```\nhooks\u002F\u003Cname>\u002Fhook.md\n```\n\n## hook.md frontmatter\n\n```yaml\n---\nkind: hook\nname: pre-commit-lint         # required; matches directory\ndescription: Runs the linter before a tool use proceeds, blocking on failure.\nversion: 0.1.0\nevents: [PreToolUse]          # required together with command\ncommand: .\u002Fscripts\u002Flint.sh\n---\n```\n\nThat `events` + `command` form is shorthand for one handler per event. For a matcher, a\ntimeout, or different commands per event, list `handlers` instead:\n\n```yaml\nhandlers:\n  - event: PreToolUse\n    matcher: Bash               # optional filter; a regex for tool events on most vendors\n    command: .\u002Fscripts\u002Fcheck-bash.sh\n    timeout: 30                 # optional, seconds\n  - event: SessionStart\n    command: .\u002Fscripts\u002Fhello.sh\n```\n\nRules:\n\n- Use **either** `handlers` **or** the `events` + `command` shorthand, never both. The\n  shorthand's two fields must be **set together**; validate fails if only one is set, and\n  export fails if the hook declares no handlers at all. Every handler needs an `event` and\n  a `command`; `timeout` is seconds and never negative.\n- `events` values are passed through to the target **unchanged**, so use that vendor's own\n  names:\n  - Claude Code and GitHub Copilot: `PreToolUse`, `PostToolUse`, `SessionStart`, ... (Copilot\n    accepts PascalCase or camelCase).\n  - Cursor: `beforeShellExecution`, `afterFileEdit`, `preToolUse`, ...\n  - Gemini CLI: its own set. Check the vendor docs.\n  A hook meant for several vendors may need one hook artifact per vendor.\n- A `matcher` filters when a handler fires; without one it fires for every occurrence of the\n  event. All four hook-capable targets support `matcher` and `timeout` (AgentWorks converts\n  seconds to Gemini CLI's milliseconds). Cursor honors `matcher` only on some events; see its\n  docs.\n- A hook can bundle a script: put it in the hook's directory and refer to it as\n  `\"${ARTIFACT_DIR}\"\u002Fscripts\u002Fcheck.sh` in the command. claude-code ships the files and\n  resolves the path; other targets skip such a hook with a warning (they have no documented\n  way to locate a plugin's files), so use an inline command for a hook meant for them.\n- If several hooks share an event, all run; none replaces another.\n\n## Safety\n\n`command` runs on every trigger with the user's permissions. `agentworks validate` flags\npatterns like `curl | sh`, `base64 -d`, `eval $(...)`, `\u002Fdev\u002Ftcp`, `nc -e`, `chmod +s`, and\n`sudo`; treat each warning as a real review item. Keep commands short, call a script kept\nin the repo, and never inline secrets — reference env vars.\n\n## Body\n\nExplain what the hook does, why, and how to disable it. Nothing in the body is executed.\n\n## Finish\n\n`agentworks doctor hooks\u002F\u003Cname>` (is the command's binary on PATH?), `agentworks validate`,\n`agentworks export`.\n","# Authoring a hook\n\nA hook runs a shell command automatically on a harness lifecycle event (before a tool runs,\nat session start, after a file edit, ...).\n\n## Create it\n\n```bash\nagentworks new hook \u003Cname> --description \"What it enforces or reports, and on which event\"\n```\n\nOr `--from-template \u003Cid>` (`pre-commit-lint`, `notify-webhook`).\n\n```\nhooks\u002F\u003Cname>\u002Fhook.md\n```\n\n## hook.md frontmatter\n\n```yaml\n---\nkind: hook\nname: pre-commit-lint         # required; matches directory\ndescription: Runs the linter before a tool use proceeds, blocking on failure.\nversion: 0.1.0\nevents: [PreToolUse]          # required together with command\ncommand: .\u002Fscripts\u002Flint.sh\n---\n```\n\nThat `events` + `command` form is shorthand for one handler per event. For a matcher, a\ntimeout, or different commands per event, list `handlers` instead:\n\n```yaml\nhandlers:\n  - event: PreToolUse\n    matcher: Bash               # optional filter; a regex for tool events on most vendors\n    command: .\u002Fscripts\u002Fcheck-bash.sh\n    timeout: 30                 # optional, seconds\n  - event: SessionStart\n    command: .\u002Fscripts\u002Fhello.sh\n```\n\nRules:\n\n- Use **either** `handlers` **or** the `events` + `command` shorthand, never both. The\n  shorthand's two fields must be **set together**; validate fails if only one is set, and\n  export fails if the hook declares no handlers at all. Every handler needs an `event` and\n  a `command`; `timeout` is seconds and never negative.\n- `events` values are passed through to the target **unchanged**, so use that vendor's own\n  names:\n  - Claude Code and GitHub Copilot: `PreToolUse`, `PostToolUse`, `SessionStart`, ... (Copilot\n    accepts PascalCase or camelCase).\n  - Cursor: `beforeShellExecution`, `afterFileEdit`, `preToolUse`, ...\n  - Gemini CLI: its own set. Check the vendor docs.\n  A hook meant for several vendors may need one hook artifact per vendor.\n- A `matcher` filters when a handler fires; without one it fires for every occurrence of the\n  event. All four hook-capable targets support `matcher` and `timeout` (AgentWorks converts\n  seconds to Gemini CLI's milliseconds). Cursor honors `matcher` only on some events; see its\n  docs.\n- A hook can bundle a script: put it in the hook's directory and refer to it as\n  `\"${ARTIFACT_DIR}\"\u002Fscripts\u002Fcheck.sh` in the command. claude-code ships the files and\n  resolves the path; other targets skip such a hook with a warning (they have no documented\n  way to locate a plugin's files), so use an inline command for a hook meant for them.\n- If several hooks share an event, all run; none replaces another.\n\n## Safety\n\n`command` runs on every trigger with the user's permissions. `agentworks validate` flags\npatterns like `curl | sh`, `base64 -d`, `eval $(...)`, `\u002Fdev\u002Ftcp`, `nc -e`, `chmod +s`, and\n`sudo`; treat each warning as a real review item. Keep commands short, call a script kept\nin the repo, and never inline secrets — reference env vars.\n\n## Body\n\nExplain what the hook does, why, and how to disable it. Nothing in the body is executed.\n\n## Finish\n\n`agentworks doctor hooks\u002F\u003Cname>` (is the command's binary on PATH?), `agentworks validate`,\n`agentworks export`.\n",{"name":5,"description":7},"main","03ffb239e6bb33e8070459c735e3dcdf9c4ed7a3","internal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-hook","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks","https:\u002F\u002Fgithub.com\u002Fmtfuller","https:\u002F\u002Fthomasfuller.codes","Software Developer • Interested in FinTech, Cloud, and Cryptography • Mandolin Novice • Follower of Christ","2026-10-07 02:40:35",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add mtfuller\u002Fagentworks --skill agentworks-author-hook",{"tool":38,"command":39},"bunx","bunx skills add mtfuller\u002Fagentworks --skill agentworks-author-hook",{"tool":41,"command":42},"pnpm","pnpm dlx skills add mtfuller\u002Fagentworks --skill agentworks-author-hook","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-hook\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"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":19},"01M7CX3086H3TA8RE2GBAJABVS","agentworks-evals","How to write and run behavior-eval cases for a skill or agent in this AgentWorks project: the evals\u002F*.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.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-evals\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M7CX2VJVECW2YVR25G6ZNK71","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.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-cli\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M7CX2Q2N4MXXYDGZGPJXDS2F","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\u002Fscripts\u002Ftests layout, and build\u002Ftest commands. Use when creating or changing anything under skills\u002F.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-skill\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M7CX2JEP9SFCS2XFYD3596NN","agentworks-author-mcp","How to write or edit an MCP server in this AgentWorks project: mcp.md frontmatter, local (stdio) versus remote (http\u002Fsse) 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\u002F.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-mcp\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M7CX2C1E06Y85KAYX6X7HD1Z","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\u002F.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Finternal\u002Fproject\u002Fembedded\u002Fskills\u002Fagentworks-author-agent\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7CX2A0NZY6KZMB3VZDVJ0CF","csv-analyzer","Analyze a CSV file and flag rows that stand out.","https:\u002F\u002Fgithub.com\u002Fmtfuller\u002Fagentworks\u002Fblob\u002Fmain\u002Fexamples\u002Fstarter-project\u002Fskills\u002Fcsv-analyzer\u002Fskill.md",[],[]]