
Create Hook
This walks you through creating git hooks for Claude Code by analyzing your project setup and suggesting relevant automations. It detects your tooling (TypeScript, Prettier, ESLint) and recommends hooks like type-checking after edits or blocking commits with lint errors. The workflow asks targeted questions about timing, scope, and whether Claude should auto-fix issues, then generates the hook script with proper permissions and testing. The real value is in the decision tree that matches hooks to your actual project configuration, plus the emphasis on testing both success and failure scenarios. Worth noting it's opinionated about JSON response formats and using additionalContext for Claude integration, which keeps you from fighting with stdin parsing.
- skills.sh installs
- 1.2K
- GitHub stars
- 1.8K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add neolabhq/context-engineering-kit --skill create-hook --agent claude-codeInstalls into .claude/skills of the current project.
Files
Create Hook Command
Analyze the project, suggest practical hooks, and create them with proper testing.
Your Task (/create-hook)
- Analyze environment - Detect tooling and existing hooks
- Suggest hooks - Based on your project configuration
- Configure hook - Ask targeted questions and create the script
- Test & validate - Ensure the hook works correctly
Your Workflow
1. Environment Analysis & Suggestions
Automatically detect the project tooling and suggest relevant hooks:
When TypeScript is detected (tsconfig.json):
- PostToolUse hook: "Type-check files after editing"
- PreToolUse hook: "Block edits with type errors"
When Prettier is detected (.prettierrc, prettier.config.js):
- PostToolUse hook: "Auto-format files after editing"
- PreToolUse hook: "Require formatted code"
When ESLint is detected (.eslintrc.*):
- PostToolUse hook: "Lint and auto-fix after editing"
- PreToolUse hook: "Block commits with linting errors"
When package.json has scripts:
testscript → "Run tests before commits"buildscript → "Validate build before commits"
When a git repository is detected:
Sponsors
Details
- Repository
- github.com/neolabhq/context-engineering-kit
- Categories
- Frontend Development, Testing & QA, Git & Pull Requests, Automation & Workflows
- First seen
- Jun 3, 2026
More from neolabhq/context-engineering-kit
All 63- Create Pr1.2K
- Setup Codemap Cli1.2K
- Actualize1.2K
- Git Worktrees1.2K
- Decay1.2K
- Attach Review To Pr1.2K
- Git Notes1.2K
- Setup Arxiv Mcp1.2K
- Propose Hypotheses1.2K
- Build Mcp1.2K
- Load Issues1.2K
- Create Workflow Command1.2K
- Query1.2K
- Status1.2K
- Reset1.2K
- Setup Context7 Mcp1.2K
- Prompt Engineering1.5K
- Context Engineering1.5K
- Thought Based Reasoning1.4K
- Reflect1.4K
- Write Concisely1.4K
- Kaizen1.4K
- Multi Agent Patterns1.4K
- Memorize1.3K