spec-hooks

Display, create, and edit lifecycle hooks for LiveSpec slash commands.

Updated Mar 11, 2026
One-click install
npx skills add https://github.com/julien-m/livespec --skill spec-hooks-julien-m
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-hooks
Source: https://github.com/julien-m/livespec/tree/main/.agent-sync/skills/spec-hooks
Command: npx skills add https://github.com/julien-m/livespec --skill spec-hooks-julien-m

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams using LiveSpec commands lack visibility into which lifecycle hooks run before or after each command, and have no guided way to add custom hooks at global, project, or local scope. ## Core Features & Use Cases - Hook Diagnostics: Scan global, project, and local hook directories plus user integrations, then display the resolved before/after chain with extend or override modes. - Hook Creation: Generate hook files with YAML frontmatter templates, template variables, and automatic .gitignore handling for local hooks. - Hook Editing: Show existing hook content and apply user-directed modifications. - Use Case: A developer wants to inject PCI-DSS compliance checks before every /spec-plan run, so they create a project-level before-plan hook and verify the resolution chain with the verbose diagnostic view. ## Quick Start Ask the AI to run /spec-hooks plan to show the active before and after hooks for the plan command.

Frequently Asked Questions about spec-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I see which hooks run before a LiveSpec command?

Run /spec-hooks followed by the command name, such as /spec-hooks plan, to display the resolved before and after hook chain. Add --verbose to preview the first ten lines of each active hook file.

How do I create a custom hook for a spec command?

Use /spec-hooks <command> --create before or --create after to generate a hook file with YAML frontmatter and template variables. By default it targets the project level; add --global or --local to change scope.

What is the difference between extend and override hook modes?

Extend mode chains the hook with parent-level hooks, while override mode replaces all parent hooks for that event. The mode is declared in the hook file's YAML frontmatter, defaulting to extend.

Where are LiveSpec hook files stored?

Global hooks live in ~/.claude/livespec/hooks/, project hooks in .specs/hooks/, and local gitignored hooks use the .local.md suffix in the same project directory. Resolution runs global, then project, then local.

Why is my local hook not being committed to git?

Local hooks use the *.local.md naming pattern, which should be listed in .gitignore. The create mode automatically verifies and adds this entry when generating a local hook.