Skip to content

anipotts/claude-code-tips

Repository files navigation

claude-code-tips

CI GitHub stars last commit tested with license

practical patterns for agentic coding -- hooks, agents, automation. built from 4,000+ claude code sessions, applicable to any AI coding tool.

this repo maintains itself using the patterns it teaches. 12 CI workflows, 11 hooks, 10 agents, 9 commands -- all running on this repo. see how →

mine stats showing sessions, tokens, costs, and projects


install the plugin

claude plugin add anipotts/claude-code-tips

you get mine -- session mining to sqlite. costs, search, error memory, pattern detection. all data stays local at ~/.claude/mine.db.

/mine                     today's sessions, cost, top tools
/mine search "websocket"  full-text search across all conversations
/mine mistakes            error patterns claude keeps repeating
/mine hotspots            most-edited files across sessions
/mine loops               repeated patterns across sessions

start with mine + the safety-guard hook. add more as you go. mine docs →


hooks

copy one, wire it up, done. each hook is a standalone bash script. hooks reference →

hook event what it does
safety-guard PreToolUse blocks force push, rm -rf /, DROP TABLE, curl-pipe-sh
no-squash PreToolUse blocks squash merges
panopticon PostToolUse logs every tool call to sqlite
context-save PreCompact saves context before compression
notify Notification routes to macOS, Slack, ntfy
commit-nudge PostToolUse reminds you to commit after N edits
replay-capture PostToolUse captures file changes for VHS replays
version-stamp SessionEnd auto-updates "tested with" stamps
stale-branch SessionStart warns about gone tracking branches
md-lint-fix PostToolUse auto-fixes markdown lint on save
knowledge-builder PostToolUse builds a codebase knowledge graph

safety-guard blocking a dangerous command

agents

drop these in .claude/agents/ and invoke with /agent <name>.

agent what it does
explorer parallel worktree exploration -- try risky changes safely
analyst free-form SQL against mine.db
test-writer generates edge case tests you missed
guardian watches your project, proposes fixes
code-sweeper finds dead code, unused imports
pr-narrator writes PR descriptions from your diff
vibe-check quick architecture review
changelog-writer generates changelogs from merged PRs
link-checker validates all internal links before committing
dep-checker scans deps for outdated, vulnerable, conflicting

commands

command what it does
/mine usage data -- costs, sessions, search
/ship stage, commit, push, open PR
/sweep clean dead code, unused imports
/quicktest find and run tests for current file
/deps dependency updates and security audit
/improve propose CLAUDE.md updates from git history
/stats project health dashboard
/replay generate a VHS tape replay of session changes
/mine:help what /mine can do

docs

what who it's for
concepts subagent patterns, automation, cost optimization anyone using agentic coding tools
claude code guide, hooks, plugins, MCP, CLI, agent teams, ecosystem claude code users
comparisons vs cursor, vs codex, vs gemini, vs antigravity, pricing choosing a tool
tips why hooks matter, my stack, mistakes i made, cost reality, session workflow my personal takes

concepts/ is tool-agnostic. tips/ is me.


examples


how this repo works

this repo is its own best example. what's running →

  • 12 CI workflows -- upstream watcher, competitive intel, community digest, docs audit, freshness, stale cleanup, dependabot, releases, plugin smoke test, PR quality gate, validation, claude responder
  • 11 hooks, 10 agents, 9 commands -- all running on this repo
  • 0 manual maintenance -- everything that doesn't require taste is automated
  • <$1/month -- CI uses haiku for the AI-powered workflows

MIT · built by anipotts from 4,000+ sessions

Packages

 
 
 

Contributors