Automation & Ops ✓ Microsoft · Official agent-hookspolicy-enforcementlifecycle-automationjson-configurationtool-use-governance

Hook Policy Builder

Turn agent behavior requirements into executable lifecycle hooks.

FollowSkills review · FSRS-2.0
Use with care
46/ 100 5-point scale 2.3 / 5
1 2 3 4 5 6
1Trust14 / 25 · 2.8/5

The skill scopes the target to .github/hooks/ and asks the user to clarify the event and whether behavior should block, warn, or inject context, providing some user involvement and scope control. It does not require explicit confirmation before writing, or disclose hook/script data flows, sensitive-data handling, external effects, isolation, permissions, or rollback, so points are deducted.

2Reliability7 / 20 · 1.8/5

The workflow is internally coherent across requirement extraction, clarification, drafting, and iteration. However, it depends on the unavailable agent-customization/hooks.md and provides no verifiable template, JSON validation, script failure handling, or concrete key-path tests; under static calibration it cannot exceed 10, so points are deducted.

3Adaptability9 / 15 · 3.0/5

The name, purpose, and main scenarios are clear, including PreToolUse, SessionStart, and Stop events and block, warn, or context-injection behavior. Non-fit boundaries, input/output contracts, semantic trigger precision, Chinese support, and mainland-China network fit are not specified, so points are deducted.

4Convention7 / 15 · 2.3/5

Front matter, argument hint, path conventions, and staged guidance are readable. Repository README and LICENSE provide Microsoft attribution and MIT license evidence. Versioning, changelog, maintenance ownership, update path, complete installation/dependency notes, examples, and troubleshooting are missing, so points are deducted.

5Effectiveness6 / 15 · 2.0/5

The skill can translate agent-behavior concerns into a hook draft and asks for a final summary and testing suggestions, so the core value is plausible. It supplies no ready-to-use template or representative verified output, and JSON/scripts may require substantial review; static calibration caps this at 7, so points are deducted.

6Verifiability3 / 10 · 1.5/5

The selected file is auditable, and the supplied repository material shows general tests and CI infrastructure. There are no tests, execution records, or third-party reproduction artifacts for this skill, and the key agent-customization material is absent, leaving only limited static traceability, so points are deducted.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 5b3e1be7be9e
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
Before you use it
  • Obtain explicit confirmation of the final policy, trigger events, blocking conditions, and file-change scope before writing to .github/hooks/.
  • Validate the JSON schema, command permissions, working directory, script inputs and outputs, and safe failure behavior against hooks.md; provide a recoverable rollback path.
  • Do not pass secrets, user content, or unnecessary environment data into hooks; the supplied skill does not document these data flows or sensitive-data controls.
See the full review method →

What does this skill do, and when should you use it?

This skill creates JSON hooks that enforce policy or automate agent lifecycle events. It first reviews the conversation to identify actions that should be blocked or gated, context that should be injected, and session or tool-use automation needs. When the policy is unclear, it asks about the event, the desired behavior, and any companion script. The resulting files are intended for .github/hooks/, followed by a summary of enforcement, testing ideas, and related customizations.

Reads the conversation history and extracts requirements such as prohibiting a command, requiring confirmation before an action, or injecting context at a particular point; asks for the hook event, block/warn/inject behavior, and companion-script needs when necessary; drafts and saves hook JSON and related scripts under .github/hooks/; identifies ambiguous or weak parts of the draft and asks follow-up questions; and, after finalization, summarizes the enforcement, suggests tests, and proposes related customizations.

  1. A developer wants to prevent an agent from running selected commands and uses the skill to draft a blocking or gating hook from the conversation.
  2. A team wants project context injected before the agent uses a tool and needs help defining the corresponding hook behavior.
  3. A user needs automation at session start or end and wants to specify events such as SessionStart or Stop.
  4. A user has a vague agent-governance requirement and needs clarification about the event, response type, or companion script before implementation.

What are this skill's strengths and limitations?

Pros
  • Focused on producing hook JSON and companion scripts for .github/hooks/.
  • Can derive agent-behavior constraints from the conversation instead of requiring a complete specification up front.
  • Covers blocking, gating, warning, context injection, and session or tool-use automation needs.
  • Defines working-directory and relative-path conventions and disallows environment variables for pathing outside plugin contexts.
Limitations
  • The SKILL.md does not include concrete hook JSON templates, event schemas, or script examples; it refers to hooks.md from the related agent-customization skill.
  • Its frontmatter includes disable-model-invocation, so metadata or invocation handling may need adjustment in other clients.
  • The source provides no standalone installation command, test suite, or verified platform list.
  • When the conversation does not reveal a clear policy need, the user must supply the event, response behavior, and companion-script requirement.

How do you install this skill?

The skill is located at extensions/copilot/assets/prompts/skills/create-hook/SKILL.md in the microsoft/vscode repository. The README provides no separate installation command. To use the full skill collection, obtain the repository from https://github.com/microsoft/vscode and preserve this relative path. Client-specific installation or registration steps are not documented in the source.

How do you use this skill?

In an Agent Skills-compatible client, invoke “create-hook” and describe the behavior to enforce or automate, for example: “Do not run database deletion commands unless I confirm first.” The skill reviews the conversation first; if it cannot infer a clear policy, it asks about the triggering event, whether to block, warn, or inject context, and whether a companion script is needed. Generated content should be saved under .github/hooks/ in the workspace.

FAQ

Will it create a hook automatically for every request?
No. It first reviews the conversation. If no clear policy need emerges, it asks for the triggering event, whether the hook should block, warn, or inject context, and whether a companion script is required.
Where are the generated files placed?
The guide directs the skill to create hooks in .github/hooks/. Hook commands and companion scripts use the workspace root as their default working directory when available, otherwise the user's home directory; relative paths resolve from that directory.
What permissions or runtime dependencies does it require?
It requires filesystem access to create and save files, and the resulting hooks may run commands or companion scripts. The source does not specify a requirement for network access, MCP, Node.js, Python, or another named dependency.
Does it have a separate price?
The source provides no separate pricing information. The skill is part of the microsoft/vscode repository, whose README states that the repository source code is available under the MIT license.

More skills from this repository

All from microsoft/vscode

Dev & Engineering ✓ Microsoft · Official

Custom Agent Builder

Create a focused .agent.md agent from a job description and the user’s conversation context.

Dev & Engineering ✓ Microsoft · Official

VS Code Configuration Policy Maintainer

Standardize VS Code policy registration, export, and validation.

Dev & Engineering ✓ Microsoft · Official

Local VS Code Web Workbench

Validate VS Code workbench and Agents window changes in a local vscode.dev instance.

Dev & Engineering ✓ Microsoft · Official

Tool Rename Compatibility Check

Protect existing prompts and tool configurations when built-in tools are renamed.

Dev & Engineering ✓ Microsoft · Official

Copilot Chat OpenTelemetry Instrumentation

A repository-specific guide for consistent OpenTelemetry instrumentation in Copilot Chat.

Dev & Engineering ✓ Microsoft · Official

Agent Host E2E Test Assistant

Maintain VS Code Agent Host end-to-end tests with strict replay fixtures.

Dev & Engineering ✓ Microsoft · Official

Commit Assistant

Creates repository-style commit messages and safely commits code changes.

Dev & Engineering ✓ Microsoft · Official

VS Code Integrated Browser Architecture

A practical architecture guide for safely changing VS Code's cross-process integrated browser.

Dev & Engineering ✓ Microsoft · Official

VS Code Agent Customization Assistant

Create, repair, and troubleshoot VS Code Agent customization files and their loading behavior.

Dev & Engineering ✓ Microsoft · Official

Agent Host Log Investigator

Trace session, transport, and host failures in Agent Host debug exports.

Dev & Engineering ✓ Microsoft · Official

Code OSS Launch & Debug

Launch a built-from-source VS Code with isolated profiles, Playwright control, and multi-process debugging ports.

Dev & Engineering ✓ Microsoft · Official

Memory Leak Audit

Systematically find and fix listener, lifecycle, and disposable leaks in VS Code code.

Dev & Engineering ✓ Microsoft · Official

Code OSS Development Log Viewer

Locate and inspect the latest Code OSS development logs.

Dev & Engineering ✓ Microsoft · Official

Project Instruction Builder

Turn conversation patterns and preferences into a durable project instruction file.

Dev & Engineering ✓ Microsoft · Official

Copilot Session Troubleshooter

Explain unexpected Copilot CLI behavior from session-log evidence.

Dev & Engineering ✓ Microsoft · Official

Workflow Skill Builder

Turns a conversation's working method into a reusable SKILL.md.

Dev & Engineering ✓ Microsoft · Official

Copilot Chat Troubleshooter

Explain unexpected agent behavior, latency, and tool failures from Copilot Chat debug logs.

Dev & Engineering ✓ Microsoft · Official

Run Command Builder

Configure and update commands shown in a VS Code Agent Session's Run button.

Dev & Engineering ✓ Microsoft · Official

VS Code Hygiene Checks

Catch VS Code commit-blocking style and hygiene issues before the work is declared complete.

Dev & Engineering ✓ Microsoft · Official

VS Code Insiders UI Automation

Automate VS Code Insiders and Copilot Chat through Playwright and CDP.

Related skills