creating-hooks

creating-hooks is a skill for Claude Code from jaktestowac/awesome-copilot-for-testers. It costs 53 tokens per session (949 once invoked), scanned A, original, MIT.

A guide for creating GitHub Copilot hooks in VS Code. Hooks are scripts that run at defined points around coding-agent tools, such as before a command or after a check.

In plain words
What is it for?
Blocking or warning about risky shell commands, validating or formatting results, recording tool use, and packaging reusable hook configurations with scripts and documentation.
Why use it?
It turns manually remembered rules into repeatable checks, warnings, or logs. The guidance also helps make those rules safer and easier to install and understand.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Good fit Blocking or warning about risky shell commands, validating or formatting results, recording tool use, and packaging reusable hook configurations with scripts and documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jaktestowac/awesome-copilot-for-testers/creating-hooks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add jaktestowac/awesome-copilot-for-testers --skill creating-hooks
Clone the repo
git clone --depth 1 https://github.com/jaktestowac/awesome-copilot-for-testers

Made for: Claude Code.

Wrote 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.

agentmods badge for creating-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks/github.svg)](https://agentmods.dev/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks)
Your own site
<a href="https://agentmods.dev/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks"><img src="https://agentmods.dev/badge/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks/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.

agentmods 80×15 button for creating-hooks

Your own site · 80×15
<a href="https://agentmods.dev/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks"><img src="https://agentmods.dev/badge/skills/jaktestowac/awesome-copilot-for-testers/creating-hooks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 949 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.00949
Opus 5 $0.00026 $0.00475
Sonnet 5 $0.00011 $0.00190
Haiku 4.5 $0.00005 $0.00095

Measured 9d ago against content hash 93cff0852730, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

creating-hooks 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 9d 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.

plugins/creating-hooks/skills/creating-hooks/SKILL.md · 120 lines

How it starts

The opening of the file, as written. The whole thing — 120 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Copilot Hooks

Use this skill when the right answer is not more advice, but deterministic behavior at a specific lifecycle point. It helps design hooks that are safe, documented, and understandable.

When to Use

Use this skill when the user asks for things like:

  • "create a Copilot hook for this policy"
  • "block dangerous commands before they run"
  • "log or validate tool usage automatically"
  • "add a reusable hook pack with docs and scripts"
  • "turn this manual guardrail into a hook"

Typical scenarios:

  • pre-tool checks for risky shell commands
  • post-tool validation or formatting triggers
  • audit or observability hooks for shared environments
  • installing a documented hook bundle for reuse across workspaces

Outcome Standard

A strong hook contribution usually includes:

  • the right lifecycle event and the smallest useful behavior
  • explicit safety defaults and clear denial or warning messages
  • a documented hooks.json configuration
  • cross-platform script guidance when Windows and Bash users both matter
  • a README or pack that explains purpose, setup, and limitations

Hook Design Rules

  • Start with observe or warn - block only when the policy is stable and the failure message is clear.
  • Keep hooks fast - long-running hooks become friction generators instead of safeguards.
  • Be explicit on denial - if a hook blocks work, explain exactly why and what to do instead.
  • Separate policy from docs - the script enforces behavior; the README explains it.
  • Prefer deterministic checks - hooks should not depend on fuzzy interpretation when avoidable.

Workflow

Phase 0: Decide whether a hook is the right primitive

Use a hook when deterministic automation is needed at a lifecycle event. If the need is guidance only, use instructions. If the need is a reusable workflow, use a skill. If the need is a user-started task, use a prompt.

Phase 1: Choose the lifecycle event

Clarify or infer:

  • what event should trigger the hook
  • whether the behavior is observe, warn, mutate, or deny
  • how quickly the hook must complete
  • whether it needs cross-platform script support

Read the full file on GitHub · 120 lines

Files

What ships with it

3 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.

Changes

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.

  1. 9d ago First seen · 120 lines · 53 tokens per session scan A 93cff0852730

Subscribe to this mod's changes

creating-hooks is a skill published in the GitHub repository jaktestowac/awesome-copilot-for-testers (113 stars, last pushed 13d ago), licensed MIT. It adds 53 tokens to every session and 949 once invoked, about $0.0003 per session on Opus 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-30.