cursor/plugins/local/cheese-grok/skills/grok-codebase/SKILL.md
Use when the user wants deep, multi-session internalization of an unfamiliar codebase — not just an orientation, but the goal of being able to explain it on a whiteboard and answer "what breaks if I change X" without re-checking. Triggers on "grok this repo", "onboard me", "memorize this project", "lock this codebase into memory", "quiz me on this repo", "help me understand this codebase deeply". Runs a four-pillar march (Building Blocks → Entry Points → Infrastructure → Egress) plus a trace-one-request exercise and an adaptive Socratic quiz; persists artifacts to .cheese/grok/<repo>/. Read-only stance — DO NOT propose edits unless explicitly asked. For a quick single-session orientation ("tour this repo", "trace how X works"), use `/tour` instead. Especially tuned for TS/JS monorepos and Next.js / Express / NestJS / Fastify apps; methodology is stack-agnostic. Do NOT use for single-file scripts, repos under 500 LOC, or editing tasks.
npx skillsauth add paulnsorensen/dotfiles grok-codebaseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are about to help the user grok this codebase: not just read it, but
internalize it well enough to explain it on a whiteboard in five minutes and
answer "what breaks if I change X" without re-checking. You will work the
four-pillar model in order, persist artifacts under
.cheese/grok/<repo>/, and finish with an adaptive Socratic quiz.
mcp__code-review-graph__get_minimal_context_tool FIRST on any new repo
(~100 tokens). Then prefer mcp__serena__get_symbols_overview,
mcp__tilth__tilth_read (outline mode), and mcp__tilth__tilth_grok over
reading whole files. Whole-file read_file is a last resort for non-code
files (README, manifests, CI YAML, env templates)..cheese/grok/<repo-name>/<pillar-slug>.md. Pillar slugs:
01-building-blocks, 02-entry-points, 03-infrastructure,
04-egress, 05-trace.md, summary.md, quiz-results.md. The user can
review artifacts later; re-runs read them first.GUIDE.md §6 when you hit a stack you don't recognize.read_file,
codebase_search, find_symbol, mcp__serena__*, mcp__tilth__*
except tilth_edit, @codebase, @docs, @web). Edits are forbidden
until the user explicitly invites them.QUIZ.md — don't improvise the question selection.Goal: enough context to confirm scope with the user.
Run in parallel where possible:
git log --oneline -10 && git status — recent activity, branch state.mcp__code-review-graph__get_minimal_context_tool(task="initial onboarding")
if the graph exists. If not, ask the user to run code-review-graph build
then re-invoke. Don't proceed without the graph for repos >500 files —
you'll burn tokens.README.md, the primary manifest (package.json / pyproject.toml /
go.mod / Cargo.toml / pom.xml), and any AGENTS.md / CLAUDE.md /
.cursor/rules/ at the repo root.tokei for a rough LOC-per-language breakdown.Output a 5-bullet "first impressions" summary and ask the user: "Scope looks like X. Proceed with full four-pillar grok, or focus on <area>?" Wait for confirmation.
Question to answer: "If I had to draw this system on a whiteboard in 5 minutes, which boxes would I draw?"
Workflow:
mcp__code-review-graph__get_architecture_overview_tool and
mcp__code-review-graph__list_communities_tool — Leiden-clustered
modules are the closest thing to an automated C4 Component diagram.mcp__serena__get_symbols_overview(relative_path=<dir>).package.json workspaces, exports, and
tsconfig.json paths/baseUrl. These define the intended module
boundaries — compare against the graph's de facto communities. When
they diverge, that's a smell worth surfacing.User, Order, Tenant, …) and
call mcp__tilth__tilth_grok(target=<symbol>) on each.mcp__code-review-graph__find_large_functions_tool and
mcp__code-review-graph__get_hub_nodes_tool. Flag any function >150 LOC
or any module with >25 inbound edges.Write .cheese/grok/<repo>/01-building-blocks.md with a table:
Block | Path | Public API | Key types | God-nodes?.
Question to answer: "Every way control flow can begin." If no entry point leads to a piece of code, that code is dead.
Workflow (TS/JS-first; other stacks in GUIDE.md §6):
package.json → main, module, bin, scripts.start,
scripts.dev. Each is an entry point.mcp__tilth__tilth_files(patterns=["**/app/**/route.ts", "**/app/**/page.tsx", "**/pages/api/**"]).mcp__tilth__tilth_search(query="app.get,app.post,router.get,router.post", kind="content").mcp__tilth__tilth_search(query="@Controller,@Get,@Post,@Put,@Delete,@Patch", kind="content").mcp__tilth__tilth_search(query="fastify.get,fastify.post,fastify.register", kind="content").process.argv usages, commander / yargs / oclif
registrations.node-cron, BullMQ Worker, AWS Lambda handlers
(exports.handler), Inngest functions, Cloudflare Workers.socket.io, tRPC routers, gRPC services.mcp__code-review-graph__get_affected_flows_tool(target=<entry>) to
trace the downstream flow.Write .cheese/grok/<repo>/02-entry-points.md with one line per entry
point: <method> <path> → <handler file:line>. For each, also note
SLA? and who calls this? — if either can't be answered, that's
a doc gap.
Questions to answer: "What does it take to run this locally?" and "What does it take to ship a change to production?" If you can answer both in <2 minutes after the grok, the grok was good.
Workflow:
engines.node, .nvmrc, Dockerfile FROM.tsc, swc, esbuild, vite, webpack,
turbopack, rollup, nx, turbo.vitest.config.*, jest.config.*, playwright.config.*,
.spec.ts / .test.ts count..eslintrc*, eslint.config.*, biome.json,
.prettierrc*..github/workflows/*.yml, .gitlab-ci.yml,
.circleci/config.yml.Dockerfile, docker-compose.yml, k8s/, helm/,
terraform/, vercel.json, netlify.toml, serverless.yml,
sst.config.*.mcp__tilth__tilth_files(patterns=["**/.env*"])
and mcp__tilth__tilth_search(query="process.env", kind="content").
List every env var referenced.mcp__code-review-graph__query_graph_tool(action="importers_of", target=<pkg>). For the top 3, use mcp__context7__query-docs.Write .cheese/grok/<repo>/03-infrastructure.md. Also explicitly scan
for arc42 §8 crosscutting concerns: logging, error handling, auth,
i18n, feature flags, observability.
Question to answer: "Where does this system reach out or mutate the world?" Egress is the Feathers seam surface — and most production incidents originate here.
Workflow:
mcp__tilth__tilth_search(query="fetch,axios,got,ky,node-fetch", kind="content")..create/.update/.delete/.upsert, Drizzle
db.insert/update/delete, TypeORM repository.save/remove, Knex
.insert/.update/.del, raw INSERT/UPDATE/DELETE.bullmq, kafkajs, amqplib,
@aws-sdk/client-sqs, nats.fs.writeFile, fs.appendFile, @aws-sdk/client-s3
PutObject, @google-cloud/storage.package.json dependencies for stripe,
@sendgrid/mail, resend, @sentry/*, posthog-js, mixpanel,
twilio, auth0, @clerk/*.webhook / signature patterns.Write .cheese/grok/<repo>/04-egress.md as a table:
Egress | Caller | Mechanism (lib) | Seam (where to fake) | Has characterization test?.
Pick the entry point with the largest get_affected_flows_tool output
(or whatever the user's focus area points at). Walk it end-to-end:
entry → middleware → handler → service → repository → DB → response
Name every file:line. Use mcp__tilth__tilth_grok per hop. This single
exercise tests all four pillars at once and is the strongest grok
artifact.
Write .cheese/grok/<repo>/05-trace.md with the path and a one-line
gloss per hop. Then write summary.md containing:
Only start if the user confirms. Ask: "Pillars mapped. Want me to quiz you to lock it in?"
If yes, load QUIZ.md and follow its protocol. Maintain an internal
confidence[pillar] map and update it after every answer per the rules
in QUIZ.md §Confidence rules. Escalate Bloom level on strength,
descend on hedging or partial recall. Mark a pillar "locked" after
three consecutive strong answers. End when all four pillars are locked
OR the user says "stop" OR ~30 minutes have elapsed.
On end, write .cheese/grok/<repo>/quiz-results.md — strong areas,
weak areas, suggested next-session focus.
After each pillar phase, post a Markdown section in chat with:
.cheese/grok/<repo>/<file>.mdFor the quiz, post each question as a numbered prompt; on each answer, post the detected confidence change and the next question — don't hide the adaptive state from the user.
The skill is designed to re-run weekly. On re-invocation:
.cheese/grok/<repo>/ artifacts; read them first.mcp__code-review-graph__detect_changes_tool and
mcp__tilth__tilth_diff to find what's changed since the last grok.For methodology depth (why four pillars, why this order, stack-specific
cheatsheets, glossary), see GUIDE.md. For the question banks and
adaptive protocol, see QUIZ.md.
tools
Reconstruct what a past coding-agent session was doing so you can resume it — goal, files touched, last verified state, and the next step — by querying the session logs. Use when the user says "what was I working on", "recover that session", "reconstruct where I left off", "resume my last session", "what did that session change", "rebuild context from logs", or invokes /work-recovery. Report-only — it never scores or judges. Do NOT use for usage scoring (that is /skill-improver, /tool-efficiency, /prompt-analytics) or one-off interactive log queries (that is /session-analytics).
development
Curate this repo's hallouminate wiki (.hallouminate/wiki/, the repo:dotfiles:wiki corpus) — add or update architecture pages, per-harness docs, and gotchas. Use when the user says "update the wiki", "document this in the wiki", "refresh the harness docs", "add a wiki page", "curate the wiki", "the wiki is stale", or invokes /wiki-curator. Also use at session end to write back a non-obvious decision or gotcha worth preserving. Grounds the existing wiki first, follows one-topic-per-file conventions, verifies every external doc URL before writing, and reindexes. Do NOT use for general code search (that is cheez-search) or for editing AGENTS.md command reference.
tools
Audit how a tool, command, or MCP server is actually used across coding-agent sessions and produce calibrated recommendations — tool-vs-task fit, error forensics, fix recommendations, permission friction, MCP health, and token economics. Use when the user says "tool efficiency", "am I using X efficiently", "audit tool usage", "why does X keep failing", "how do I fix this error", "what should I change", "permission friction", "is this MCP worth it", "tool error rate", "fix recommendations", or invokes /tool-efficiency. Do NOT use for auditing a skill or agent definition (that is /skill-improver) or for one-off interactive log queries (that is /session-analytics).
tools
Analyze how prompts and skill routing behave across coding-agent sessions and produce calibrated recommendations — prompt-pattern analysis, routing accuracy, and knowledge gaps. Use when the user says "analyze my prompts", "prompt patterns", "is routing working", "which skill should have fired", "knowledge gaps", "what do I keep asking", or invokes /prompt-analytics. Do NOT use for auditing a single skill/agent definition (that is /skill-improver), tool/MCP efficiency (that is /tool-efficiency), or one-off interactive log queries (that is /session-analytics).