Solo Stack Kits Directory
Claude Code workflows & skills for solo consultants and freelancers

Claude Code Hooks & Automation (40)

Your First Claude Code Mod: Block Edits Outside the Task's Worktree in 30 Lines

Builds and tests a 30-line Claude Code mod (v2.1.287+) that refuses Edit and Write calls outside the task's git worktree.
@gabrielanhaia · dev.to · 2026-10-17 · Hooks & Automation · #

AI Hooks for Claude Code, Cursor, and Codex: Block Secrets Before Agents Can Use Them

GitGuardian explains using ggshield AI hooks to scan prompts, commands, file reads, MCP calls and outputs for secrets in Claude Code, Cursor and Codex.
@dwayne_mcdaniel · dev.to · 2026-10-14 · Hooks & Automation · #

With a warning, our Claude Code agent's to-automate list sat open 8.2 days. With a failing test, 6 minutes. What works for you?

An experiment showing a failing check got a Claude Code agent to clear its to-automate list far faster than a warning did.
@rulestack · dev.to · 2026-10-08 · Hooks & Automation · #

Headless Claude Code asks, exits, then resumes on the answer

A headless Claude Code pattern where the agent asks a question in a ticket, exits, and resumes with claude -p --resume once answered.
@panthpatel · dev.to · 2026-10-05 · Hooks & Automation · #

I wrote a safety mod that crashes on purpose. Claude Code ran the command anyway.

A test showing a deliberately crashing safety hook did not stop Claude Code from running the command, and what that means for guardrails.
@aidiveyt · dev.to · 2026-10-05 · Hooks & Automation · #

A Claude Code deny rule missed 5 ways to git push. A pre-push hook caught all 5, but 2 flags skip it. What guards your remote?

A Bash(git push:*) deny rule missed several push variants, while a git pre-push hook caught them all.
@rulestack · dev.to · 2026-10-04 · Hooks & Automation · #

Claude Code's Read deny rules let 4 of 11 routes through: grep -r, a Python one-liner and two CLAUDE.md @imports

A test showing Read deny rules for secrets and .env still let 4 of 11 access routes through, such as grep -r and Python one-liners.
@rulestack · dev.to · 2026-10-02 · Hooks & Automation · #

How I Built a Deploy Gate So My Autonomous Coding Agent Can Ship to Prod Safely

How the author built a deploy gate so an autonomous Claude Code agent can merge and ship to production safely.
@yureki_lab · dev.to · 2026-10-01 · Hooks & Automation · #

My agent changed `toBe(10)` to `toBe(9)` and called it done. I built hooks to stop that

Hooks the author built to stop Claude Code from "fixing" failing tests by editing the expected values.
@haoli · dev.to · 2026-09-30 · Hooks & Automation · #

Progressive Disclosure: Claude Code Hooks, Events and Telemetry

A guide to Claude Code hooks, hook events and telemetry for controlling what the agent sees and reports.
@cleverhoods · dev.to · 2026-09-30 · Hooks & Automation · #

Claude Can't Say "Done" Until the Code Is Safe: A Security Verification Loop for Claude Code

A verification loop that keeps Claude Code from declaring a task done until security checks (like no hardcoded keys) pass.
@thesnehamk · dev.to · 2026-09-28 · Hooks & Automation · #

Catching AI Workflow Failures with Executable Playbooks

Executable playbooks: a file-based delivery procedure that turns workflow preconditions into checks for Claude Code and Codex.
@srnux · dev.to · 2026-09-25 · Hooks & Automation · #

Claude Code permission rules: Bash(git push:*) stopped 8 of 14 ways to push, and 5 reached the remote

A test of how many ways to git push got past a single Bash(git push:*) deny rule in .claude/settings.json.
@rulestack · dev.to · 2026-09-24 · Hooks & Automation · #

CLAUDE.md rule vs PreToolUse hook: both held 5 of 5, then the user said 'I authorize it'

A comparison of a CLAUDE.md rule versus a PreToolUse hook for protecting files, including what happens when the user "authorizes" a bypass.
@rulestack · dev.to · 2026-09-21 · Hooks & Automation · #

Your Claude Code hooks probably don't fire on Windows — a 60-second test and the nine ways they fail open

A 60-second test for whether your Claude Code hooks actually fire on Windows, plus common reasons they don't.
@suyann · dev.to · 2026-09-17 · Hooks & Automation · #

12 Pitfalls I Hit Auto-Logging Claude Code Subagents with a Stop Hook (and How the Numbers Cut My Weekly Cost 15–20%)

Pitfalls found while auto-logging subagent runs with a Stop hook, and how the data cut weekly cost.
@bokuwalily · dev.to · 2026-09-11 · Hooks & Automation · #

Hardening a manual Claude Code review workflow in GitHub Actions

How a human-triggered "@claude review" GitHub Actions workflow was locked down to read-only, bounded reviews.
@jonesrussell · dev.to · 2026-09-02 · Hooks & Automation · #

Stop asking your AI agent to follow rules. Enforce them.

Moving grep-able coding rules from prompts into Claude Code hooks so they are enforced every time.
@toffy · dev.to · 2026-08-25 · Hooks & Automation · #

Show HN: Graft – Claude Code hooks that cut grep tokens by 42%

Graft, a set of Claude Code hooks that cut grep-related token use by about 42%.
shrishdwi · Hacker News · 2026-08-14 · Hooks & Automation · #

My Agent Orchestrator Burned 1-2M Opus Tokens Per Task. Here's the Postmortem.

A postmortem on an orchestration skill that burned 1-2M tokens per task, fixed with a budget-enforcing PreToolUse hook.
@akashy · dev.to · 2026-08-04 · Hooks & Automation · #

Show HN: A 60-line PreToolUse hook that stops Claude Code from editing your .env

A 60-line PreToolUse hook that blocks Claude Code from editing your .env file.
gaiinmaster · Hacker News · 2026-07-27 · Hooks & Automation · #

How I Auto-Resume a Rate-Limited Claude Code Session with PROGRESS.md and Retries

How the author auto-resumes rate-limited Claude Code sessions with a PROGRESS.md file and retries.
@bokuwalily · dev.to · 2026-07-17 · Hooks & Automation · #

I Made Claude Code Ding When It's Done (And It Changed My Workflow)

A five-line hook config that plays a sound when Claude Code finishes or needs your input.
@anand_rathnas_d5b608cc3de · dev.to · 2026-06-28 · Hooks & Automation · #

How I Stopped Babysitting Claude Code: 5 Patterns for 24/7 AI Workers

Five patterns for running Claude Code as a 24/7 worker without babysitting every run.
@yureki_lab · dev.to · 2026-06-15 · Hooks & Automation · #

Claude Code Hook That Engineers Every Prompt for You — Automatically

A Claude Code hook that automatically rewrites each prompt into a better-engineered one.
@bhutano · dev.to · 2026-06-13 · Hooks & Automation · #

A PreToolUse hook that sandboxes Claude Code agents by reading what they actually do

A PreToolUse hook that sandboxes Claude Code by checking what each command will actually do.
@bfxavier · dev.to · 2026-06-13 · Hooks & Automation · #

Claude Code TDD: Force Red-Green-Refactor with Hooks & CLAUDE.md (2026)

Forcing red-green-refactor TDD in Claude Code with hooks and CLAUDE.md rules.
@stacknotice · dev.to · 2026-06-11 · Hooks & Automation · #

My Claude Code hook silently ate every Korean character, and it took me an hour to figure out why

Debugging a Windows Claude Code hook that silently dropped every Korean character.
@codingjhj · dev.to · 2026-06-06 · Hooks & Automation · #

Python utility package for building Claude Code hooks

A Python utility package for building Claude Code hooks.
ankitg12 · Hacker News · 2026-05-29 · Hooks & Automation · #

Stop telling Claude Code rules. Enforce them with hooks.

Why the author moved rules out of CLAUDE.md and into hooks that enforce them.
@krisnamic · dev.to · 2026-05-24 · Hooks & Automation · #

Hooks vs Skills in Claude: the difference that defines system maturity

The difference between hooks and skills in Claude, and why enforcement belongs in hooks.
@guillermodv · dev.to · 2026-05-06 · Hooks & Automation · #

How I run Claude Code 24/7 on a 2015 MacBook — the framework that survived 6 months

A non-developer's framework for running Claude Code 24/7 on an old MacBook for six months.
@suzu · dev.to · 2026-05-03 · Hooks & Automation · #

Letting Claude Code's Routines continuously tune my CLI's performance

Using Claude Code Routines to tune an open-source CLI's performance every few hours, with the prompt and benchmark setup.
@yamadashy · dev.to · 2026-04-30 · Hooks & Automation · #

When Your AI Coding Tool Disappears Overnight: The Case for Provider-Agnostic Quality Gates

How to build provider-agnostic quality gates that survive switching away from any one AI coding tool.
@toniantunovic · dev.to · 2026-04-28 · Hooks & Automation · #

EvanFlow – A TDD driven feedback loop for Claude Code

EvanFlow, a TDD-driven feedback loop for Claude Code.
evanklem2004 · Hacker News · 2026-04-27 · Hooks & Automation · #

Putting Daily Indie Dev on Autopilot with Claude Code Schedule

Putting a solo developer's daily morning routine on autopilot with Claude Code's scheduling.
@kanta13jp1 · dev.to · 2026-04-27 · Hooks & Automation · #

TDD is the only Claude Code workflow that actually stuck for me

Why test-driven development was the one Claude Code workflow that stuck for the author.
@whoffagents · dev.to · 2026-04-25 · Hooks & Automation · #

MCP Tool Hooks in Claude Code

Calling MCP tools directly from Claude Code hooks instead of spawning a subprocess each time.
@speedy_devv · dev.to · 2026-04-24 · Hooks & Automation · #

Claude Code CI/CD Integration: How I Wired My AI Agent Directly Into My Deployment Pipeline

Wiring Claude Code directly into a CI/CD deployment pipeline.
@nextools · dev.to · 2026-04-22 · Hooks & Automation · #

66.5% of My Claude Code Tokens Were Wasted. A 200-Line Wrapper Got Them Back.

A hook-based CLI wrapper that compressed Claude Code command output and saved about two-thirds of tokens.
@ji_ai · dev.to · 2026-04-20 · Hooks & Automation · #