ganeshkumar-1508/agentic_ai_testing/update-config-7-step-verification-flow

Claude Code and agent skill by ganeshkumar-1508/agentic_ai_testing

Trust tier 2
  • community
  • ext:[{"type":"config","description":"Configuration overrides"}]
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

A skill that guides Claude through a 7-step process to construct and verify hooks for Claude Code, ensuring they work correctly in the user's specific project environment.

Install

npx vskill@latest install ganeshkumar-1508/agentic_ai_testing/update-config-7-step-verification-flow

Semi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard

SKILL.md

The same SKILL.md was published earlier as ganeshkumar-1508/agentic_ai_testing/update-config-7-step-verification-flow.

Constructing a Hook (with verification)

Given an event, matcher, target file, and desired behavior, follow this flow. Each step catches a different failure class — a hook that silently does nothing is worse than no hook.

  1. Dedup check. read_file the target file. If a hook already exists on the same event+matcher, show the existing command and ask: keep it, replace it, or add alongside.
  1. Construct the command for THIS project — don't assume. The hook receives JSON on stdin. Build a command that:
  • Extracts any needed payload safely — use jq -r into a quoted variable or { read -r f; ... "$f"; }, NOT unquoted | xargs (splits on spaces)
  • Invokes the underlying tool the way this project runs it (npx/bunx/yarn/pnpm? Makefile target? globally-installed?)
  • Skips inputs the tool doesn't handle (formatters often have --ignore-unknown; if not, guard by extension)
  • Stays RAW for now — no || true, no stderr suppression. You'll wrap it after the pipe-test passes.
  1. Pipe-test the raw command. Synthesize the stdin payload the hook will receive and pipe it directly:
  • Pre|PostToolUse on bash|bash: echo '{"tool_name":"bash","tool_input":{"file_path":"<a real file from this repo>"}}' | <cmd>
  • Pre|PostToolUse on bash: echo '{"tool_name":"bash","tool_input":{"command":"ls"}}' | <cmd>
  • Stop/UserPromptSubmit/SessionStart: most commands don't read stdin, so echo '{}' | <cmd> suffices

Check exit code AND side effect (file actually formatted, test actually ran). If it fails you get a real error — fix (wrong package manager? tool not installed? jq path wrong?) and retest. Once it works, wrap with 2>/dev/null || true (unless the user wants a blocking check).

  1. bash the JSON. Merge into the target file (schema shape in the "Hook Structure" section above). If this creates .claude/settings.local.json for the first time, add it to .gitignore — the bash tool doesn't auto-gitignore it.
  1. Validate syntax + schema in one shot:

jq -e '.hooks.<event>[] | select(.matcher == "<matcher>") | .hooks[] | select(.type == "command") | .command' <target-file>

Exit 0 + prints your command = correct. Exit 4 = matcher doesn't match. Exit 5 = malformed JSON or wrong nesting. A broken settings.json silently disables ALL settings from that file — fix any pre-existing malformation too.

  1. Prove the hook fires — only for Pre|PostToolUse on a matcher you can trigger in-turn (bash|bash via bash, bash via bash). Stop/UserPromptSubmit/SessionStart fire outside this turn — skip to step 7.

For a formatter on PostToolUse/bash|bash: introduce a detectable violation via bash (two consecutive blank lines, bad indentation, missing semicolon — something this formatter corrects; NOT trailing whitespace, bash strips that before writing), re-read, confirm the hook fixed it. For anything else: temporarily prefix the command in settings.json with echo "$(date) hook fired" >> /tmp/claude-hook-check.txt; , trigger the matching tool (bash for bash|bash, a harmless true for bash), read the sentinel file.

Always clean up — revert the violation, strip the sentinel prefix — whether the proof passed or failed.

If proof fails but pipe-test passed and `jq -e` passed: the settings watcher isn't watching .claude/ — it only watches directories that had a settings file when this session started. The hook is written correctly. Tell the user to open /hooks once (reloads config) or restart — you can't do this yourself; /hooks is a user UI menu and opening it ends this turn.

  1. Handoff. Tell the user the hook is live (or needs /hooks/restart per the watcher caveat). Point them at /hooks to review, edit, or disable it later. The UI only shows "Ran N hooks" if a hook errors or is slow — silent success is invisible by design.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository forks
1
7-day trend score
0

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Extension points

  • configConfiguration overrides

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/ganeshkumar-1508/agentic_ai_testing/update-config-7-step-verification-flow/badge)](https://verified-skill.com/skills/ganeshkumar-1508/agentic_ai_testing/update-config-7-step-verification-flow)

Something wrong with this skill or its page? Tell us.