Cheatsheet: Self-Maintaining Context for Coding Agents
A self-maintaining collection of cheatsheets that give Claude Code current context for the tools I use, grounded in how I actually use them.
Overview
A Claude Code skill plus scheduled workflows that generate and maintain cheatsheets encoding my preferences. Each sheet is grounded in my GitHub usage and reconciled against current docs, then imported into CLAUDE.md so the agent codes the way I do.
Problem
Off-the-shelf tooling encodes other people's preferences, not mine. Its defaults reflect how others work, and its guidance lags current APIs. I end up rewriting plausible code to match how I actually build.
Approach
A `/cheatsheet` skill mines my GitHub repos for usage patterns, grounds them in official docs, and writes a sheet with snippets, patterns, and agent rules. An install script imports the collection into `~/.claude/CLAUDE.md`, and scheduled GitHub Actions keep it fresh and suggest gaps to fill.
Constraints
- Private repo content must never be disclosed by name or verbatim, only generalized patterns
- Nothing auto-merges; every generated or refreshed sheet needs human review
- Sheets must stay concise enough to load cheaply into context at every session start
Key Decisions
Ground sheets in my own GitHub usage, not just docs
Docs capture what a tool can do, not how I use it. Mining real repos produces patterns the agent can copy directly.
Scheduled self-maintenance with human-in-the-loop
A monthly refresh re-mines repos and opens PRs; a weekly recommender suggests new sheets. Review keeps quality high while automation prevents staleness.
Generalize, never leak, private repo content
Private code is reduced to generalized patterns and never quoted or named, so the collection is safe to keep public.
Result & Impact
Less time correcting off-pattern agent output, since it now starts with current context for tools like uv, Pydantic, Astro, and Ruff. The workflows keep sheets fresh on their own, and the public repo doubles as a sharable reference.
Learnings
- A few real patterns from your own code are worth more to an agent than pages of generic docs.
- Self-maintaining context still needs a human gate: refreshes keep sheets fresh, review keeps them trustworthy.
- Privacy is a design constraint when context is shared across repos and public surfaces.