Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/Poorgramer-Zack/copilot-cli-thingsnpx agentmods add skills/poorgramer-zack/copilot-cli-things/hook-developmentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/poorgramer-zack/copilot-cli-things/hook-development)<a href="https://agentmods.dev/skills/poorgramer-zack/copilot-cli-things/hook-development"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/copilot-cli-things/hook-development/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/poorgramer-zack/copilot-cli-things/hook-development"><img src="https://agentmods.dev/badge/skills/poorgramer-zack/copilot-cli-things/hook-development.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00048 | $0.03444 |
| Opus 5.5 | $0.00019 | $0.01378 |
| Sonnet 5.5 | $0.00010 | $0.00689 |
| Haiku 4.5 | $0.00005 | $0.00344 |
Grade A, and why
Hook Development scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 665 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Hook Development for Copilot CLI Plugins
Create event-driven hooks that validate operations, enforce policies, add context, and integrate external tools into Copilot CLI workflows.
- Validate tool calls before execution (preToolUse)
- React to tool results (postToolUse)
- Enforce completion standards (agentStop, subagentStop)
- Load project context (sessionStart)
- Automate workflows across the development lifecycle
Hook Types
Command Hooks
Execute commands for deterministic checks:
{
"type": "command",
"command": "bash hooks/scripts/validate.sh",
"timeout": 60000
}
Use for:
- Fast deterministic validations
- File system operations
- External tool integrations
- Performance-critical checks
Hook Configuration Formats
Plugin hooks.json Format
For plugin hooks in hooks/hooks.json, use wrapper format:
{
"description": "Brief explanation of hooks (optional)",
"hooks": {
"preToolUse": [...],
"agentStop": [...],
"sessionStart": [...]
}
}
Key points:
descriptionfield is optionalhooksfield is required wrapper containing actual hook events- This is the plugin-specific format
Example:
{
"description": "Validation hooks for code quality",
"hooks": {
"preToolUse": [
{
"matcher": "edit",
"hooks": [
{
"type": "command",
"command": "hooks/scripts/validate.sh"
}
]
}
]
}
}
Settings Format (Direct)
For user settings in .github/settings.json, use direct format:
{
"preToolUse": [...],
"agentStop": [...],
"sessionStart": [...]
}
Key points:
- No wrapper - events directly at top level
- No description field
- This is the settings format
Important: The examples below show the hook event structure that goes inside either format. For plugin hooks.json, wrap these in {"hooks": {...}}.
Hook Events
preToolUse
Execute before any tool runs. Use to approve, deny, or modify tool calls.
What ships with it
10 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- examples/load-context.sh 1.6 KB runs code
- examples/validate-bash.sh 1.1 KB runs code
- examples/validate-write.sh 981 B runs code
- references/advanced.md 10 KB
- references/migration.md 8.4 KB
- references/patterns.md 7.2 KB
- scripts/hook-linter.sh 4.2 KB runs code
- scripts/README.md 3.6 KB
- scripts/test-hook.sh 5.3 KB runs code
- scripts/validate-hook-schema.sh 5.1 KB runs code
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 665 lines · 0 tokens per session scan A b320e210ee6f
Hook Development is a skill published in the GitHub repository Poorgramer-Zack/copilot-cli-things (2 stars, last pushed 7mo ago), licensed MIT. It adds 48 tokens to every session and 3,444 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
speckit-init
Scaffold a Spec Kit (spec-driven development) project for GitHub Copilot by running specify init --integration copilot --integration-options="--skills". USE FOR: starting a new spec-kit project, bootstrapping spec-driven development in an existing repo, installing spec-kit templates/scripts/commands for Copilot. DO…
speckit-extension
Manage Spec Kit extensions via specify extension. USE FOR: listing installed extensions as text or JSON, installing/removing/updating extensions, searching the extension catalog, showing extension info, enabling/disabling extensions, setting resolution priority, or managing extension catalogs. DO NOT USE FOR: artifact…
speckit-preset
Manage Spec Kit presets via specify preset. USE FOR: listing installed presets as text or JSON, installing/removing presets, searching the preset catalog, showing preset info, resolving which template a preset name maps to, enabling/disabling presets, setting resolution priority, or managing preset catalogs. DO NOT…
speckit-artifact
Inspect the effective Spec Kit artifact inventory and composition stacks via specify artifact. USE FOR: listing commands/templates/scripts/hooks, explaining which preset or extension layer supplies an artifact, inspecting resolution precedence and hidden layers, checking hook registration, or resolving a stack…
speckit-bundle
Discover, install, and author Spec Kit bundles via specify bundle. USE FOR: searching/showing/listing bundles, installing/updating/removing a bundle (a curated set of extensions/presets/integrations/workflows), validating a bundle manifest, building a distributable bundle artifact, initializing a project and…
speckit-workflow
Manage and run Spec Kit automation workflows via specify workflow. USE FOR: running a workflow by ID or local YAML, resuming a paused/failed run, checking run status, listing/installing/removing workflows, searching the workflow catalog, showing a workflow step graph. DO NOT USE FOR: extensions (use…