بنقرة واحدة
create-hook
Create a hook (.json) to enforce policy or automate agent lifecycle events.
القائمة
Create a hook (.json) to enforce policy or automate agent lifecycle events.
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting session data.
Agents window architecture — covers the agents-first app, layering, folder structure, chat widget, menus, contributions, entry points, and development guidelines. Use when implementing features or fixing issues in the Agents window.
Use when working on the Chat Customizations editor — the management UI for agents, skills, instructions, hooks, prompts, MCP servers, and plugins.
Generate or update chat customization files for AI coding agents
Audit code for memory leaks and disposable issues. Use when reviewing event listeners, DOM handlers, lifecycle callbacks, or fixing leak reports. Covers addDisposableListener, Event.once, MutableDisposable, DisposableStore, and onWillDispose patterns.
Launch Code OSS (VS Code from sources) into an isolated throwaway profile with unique debug ports so you can drive it with @playwright/cli AND attach a Node debugger via dap-cli in the same session. Use when working on VS Code itself and you want to interact with the running workbench, automate chat or UI flows, test UI features, take screenshots, set breakpoints in the renderer / extension host / main process, or combine UI driving with debugging.
| name | create-hook |
| description | Create a hook (.json) to enforce policy or automate agent lifecycle events. |
| argument-hint | What should be enforced or automated? |
| disable-model-invocation | true |
Related skill: agent-customization. Load and follow hooks.md for template and principles.
Guide the user to create a hook in .github/hooks/.
First, review the conversation history. If the user has been expressing concerns about agent behavior (e.g., "don't run this command", "always check before doing X", "inject this context"), generalize that into a hook. Extract:
If no clear policy need emerges from the conversation, clarify:
cwd defaulting to the workspace root (when a workspace folder is available); otherwise cwd falls back to the user home directory. Relative paths resolve from cwd. Absolute paths are fine when intentional — just be deliberate about which you use.Remember to follow the agent-customization guidelines to create highly effective hooks.