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-code

Installs 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)

  1. Analyze environment - Detect tooling and existing hooks
  2. Suggest hooks - Based on your project configuration
  3. Configure hook - Ask targeted questions and create the script
  4. 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:

  • test script → "Run tests before commits"
  • build script → "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
1kostja94 avatarblog-page-generatorkostja94/marketing-skillsWhen the user wants to create, optimize, or audit blog index or listing page structure (not a single post). Also use when the user mentions "blog page," "blog i1.2Kskills.sh installs
2antvis avatarantv-g6-graphantvis/chart-visualization-skillsUse this skill whenever the user wants to create, customize, or troubleshoot G6 v5 graph/network visualizations. Triggers include: any mention of 'G6', 'antv g61.2Kskills.sh installs
3uniswap avatarv4-security-foundationsuniswap/uniswap-aiSecurity-first Uniswap v4 hook development. Use when user mentions "v4 hooks", "hook security", "PoolManager", "beforeSwap", "afterSwap", or asks about V4 hook 1.2Kskills.sh installs
4yeachan-heo avatarhudyeachan-heo/oh-my-claudecodeConfigure HUD display options (layout, presets, display elements)1.2Kskills.sh installs
5wshuyi avatartranslate-pdfwshuyi/translate-pdf-skillTranslate PDF documents to any language while preserving original structure, layout, and styling (colors, backgrounds, positions). Use when user wants to: (1) t1.2Kskills.sh installs
6zsyggg avatarpaper-analyzerzsyggg/paper-craft-skills将学术论文转化为深度HTML长文。6轮强制工作流、代码仓库搜索、公式渲染、Mermaid图表。 3种写作风格,输出可直接分享的精美HTML页面。1.2Kskills.sh installs