Guides

Claude Code guides

Practical, tested configuration for Claude Code. Free to read and copy.

How to stop Claude Code from running rm -rf and other dangerous commandsUse a PreToolUse hook to block rm -rf ~, git reset --hard, force-push to main, curl | sh, DROP DATABASE and more in Claude Code. Tested regexes and a copy-paste script.Running Claude Code in CI and GitHub Actions safelyRun claude -p headlessly in any CI runner, or wire up the official Claude Code GitHub Action. Covers --bare, --allowedTools, --permission-prompts none, exit codes, and keeping an unattended run from doing damage.Using Claude Code for code reviewHow to get useful code reviews from Claude Code: review local diffs and GitHub PRs, use a reviewer subagent, and get verified, severity-ranked findings with file:line instead of noise.Reducing Claude Code token usagePractical ways to cut Claude Code costs: check what's filling context with /context, clear and compact deliberately, offload noisy work to subagents and hooks, and pick cheaper models.A safe git workflow with Claude CodeA practical git workflow for Claude Code: a branch per task, small commits, diff review, git worktrees for parallel sessions, secret scanning before commits, and a PR checklist.Claude Code hooks: 6 practical examples you can copyWorking Claude Code hook examples — block dangerous commands, protect .env files, auto-format after edits, scan for secrets, and get desktop notifications. Copy-paste settings.json included.Adding and using MCP servers in Claude CodeHow to add, list and remove MCP servers with claude mcp add, the difference between local, project and user scope, and what goes in a committed .mcp.json file.Setting up Claude Code in a monorepoHow to lay out CLAUDE.md files, package-level settings.json, and scoped skills so Claude Code only loads the conventions for the package you're touching, with copy-paste examples for a multi-package repo.Claude Code permissions: stop clicking "Allow" 100 timesSet up Claude Code permission modes and allow/ask/deny rules so safe commands run automatically, secrets stay unreadable, and risky actions still prompt. Includes a starter allowlist.Claude Code settings.json explainedWhere Claude Code's settings.json files live, which one wins, and how to configure permissions, environment variables, hooks and the default model, with copy-paste examples.How to write Claude Code skills that actually triggerA practical guide to Claude Code skills: SKILL.md structure, frontmatter fields, writing descriptions that trigger reliably, and a complete free example skill.Custom slash commands in Claude Code, and how skills replaced themHow .claude/commands/*.md slash commands work, why Claude Code merged them into skills, and how to migrate a command to a SKILL.md without losing anything.Claude Code subagents: setup and three useful examplesHow to define Claude Code subagents in .claude/agents, what the frontmatter fields do, and three practical examples: a code reviewer, a test runner on Haiku, and a security auditor.Test-driven development with Claude CodeHow to do TDD with Claude Code: write a failing test first, confirm it fails, implement, then mutation-check. Copy-paste prompts, and how to stop Claude editing tests to make them pass.CLAUDE.md: a template and what actually belongs in itWhat to put in CLAUDE.md for Claude Code, what to leave out, and a copy-paste template. Covers commands, conventions, landmines, @imports and file locations.

Skip the setup: get the tested versions

Keelwork bundles 10 workflow skills, 5 tested safety hooks (including a full guard-bash and a secret scanner), 3 subagents and 5 CLAUDE.md templates, with a one-command installer that safely merges into your settings.

Get Keelwork — $24 →