grok-codebase

grok-codebase is a skill for Claude Code, Codex from hg-pyun/claude-code-marketplace. It costs 276 tokens per session (3,788 once invoked), scanned A, original, MIT.

A guided way to understand an unfamiliar codebase through prediction and verification. It asks you to predict how a selected part works, then checks and explains your understanding.

In plain words
What is it for?
Use it when joining a project, learning unfamiliar structure, tracing callers or execution flow, or preparing to make a change.
Why use it?
It helps developers build their own mental map of a codebase instead of relying on a summary they may quickly forget.

Skill for Claude CodeCodex

Part of the buddy plugin — 1 skill shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/hg-pyun/claude-code-marketplace/grok-codebase
Any agent
npx skills add hg-pyun/claude-code-marketplace --skill grok-codebase
Clone the repo
git clone --depth 1 https://github.com/hg-pyun/claude-code-marketplace

Made for: Claude Code, Codex.

Or install buddy, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for grok-codebase

README.md
[![agentmods](https://agentmods.dev/badge/skills/hg-pyun/claude-code-marketplace/grok-codebase.svg)](https://agentmods.dev/skills/hg-pyun/claude-code-marketplace/grok-codebase)
Your own site
<a href="https://agentmods.dev/skills/hg-pyun/claude-code-marketplace/grok-codebase"><img src="https://agentmods.dev/badge/skills/hg-pyun/claude-code-marketplace/grok-codebase.svg" alt="Measured on agentmods" height="20"></a>
Per session 276 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,788 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00276 $0.03788
Opus 5 $0.00138 $0.01894
Sonnet 5 $0.00055 $0.00758
Haiku 4.5 $0.00028 $0.00379

Measured 5d ago against content hash 19b0db1333ae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

grok-codebase scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/buddy/skills/grok-codebase/SKILL.md · 139 lines

How it starts

The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<Use_When>

  • The developer just joined a codebase, or must modify code they don't yet understand, and wants the structure to stick rather than get an AI summary they'll forget in ten minutes.
  • They can feel themselves about to skim an AI explanation and want to be forced to build the model themselves instead.
  • They would rather confront where their intuition about the code is wrong than be told how it works.
  • Trigger phrases (EN): "grok this code", "help me understand this codebase", "read this code with me", "quiz me on this code".
  • Trigger phrases (KO): "코드 이해 도와줘", "낯선 코드 파악 같이 해줘", "이 코드베이스 익히게 도와줘", "코드 같이 읽자", "예측하며 코드 읽기". </Use_When>

<Do_Not_Use_When>

  • The developer just wants a fast summary or a direct answer ("그냥 요약해줘", "just tell me what this does") — answer directly, without a predict loop.
  • They need to ship a fix right now and understanding is not the goal — help them fix it.
  • It is a simple factual lookup (one signature, one line, where a symbol is defined) — answer it directly (or hand off to explorer-style search).
  • They already understand the code and only execution remains.
  • The developer explicitly says the outcome matters more than building the model themselves — respect that choice. </Do_Not_Use_When>

<Why_This_Exists> Asking the AI to explain unfamiliar code produces understanding today, but it quietly atrophies the muscle that makes someone an engineer: building a mental model of a system from its parts — tracing control and data flow, forming expectations, and correcting them against reality. An AI summary is convenient precisely because it skips that work, which is exactly why the structure never lodges: you read it, you agree, and an hour later you couldn't redraw it. This skill exists to keep that muscle working. The purest way to build a model is to read the code cold — but developers stall or skim, because a wall of unfamiliar code offers no handhold. So this skill trades passive reading for an active prediction: it picks a spot, makes the developer commit to what they think is true, then shows reality — and the surprise at the gap is what makes the model stick. On the spots that carry the design, it makes them teach it back until it holds. The prediction lowers the friction of engaging; it does not do the understanding. </Why_This_Exists>

<Design_Note_Accepted_Tradeoffs> This mechanic was chosen with its costs understood, not by accident — these were decided in a design interview. Honor them; do not silently "fix" them back into a helpful summary:

  • The partner judges the mode, and that relaxes buddy's usual "the developer decides everything." Unlike socratic-interview, here the partner picks predict-vs-explain-back per spot by difficulty. This is a deliberate relaxation of buddy's core principle at this one point — accepted because in a learning moment the newcomer doesn't yet know what's core, so the partner pointing at the right difficulty raises learning efficiency. The cost is a slice of buddy's "pen stays entirely in the developer's hand" purity, given up on purpose. Do not extend this license: the partner chooses where to look and in which mode, never the answer.
  • Success is measured by learning, not accuracy. The metric is not "did the developer predict correctly" — it is "what did they learn from the prediction→reality gap." A wrong prediction is worth more, not less, because the surprise is where the model updates. The accepted cost is that this signal is less quantitative than a hit-rate, so progress is fuzzier to read — that fuzziness was chosen over a metric that would reward safe, uninformative guesses.
  • The real success metric is "did a real mental model form?" — not how many spots got covered or how smoothly the session ran. Coverage and smoothness are easily-inflated proxies. Judge by whether the developer can now reconstruct the flow unaided. </Design_Note_Accepted_Tradeoffs>

Read the full file on GitHub · 139 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 139 lines · 276 tokens per session scan A 19b0db1333ae

Subscribe to this mod's changes

grok-codebase is a skill published in the GitHub repository hg-pyun/claude-code-marketplace (2 stars, last pushed 2mo ago), licensed MIT. It adds 276 tokens to every session and 3,788 once invoked, about $0.0014 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

hr-onboarding

A new-hire onboarding plan as a single page — first week schedule, buddy + manager intro, learning track, equipment checklist, and "you're set when…" outcomes. Use when the brief mentions "onboarding", "new hire", "first week plan", or "入职".

nexu-io/open-design · 62 tokens

book-mirror

Take any book (EPUB/PDF), produce a personalized chapter-by-chapter analysis. Each chapter is preserved in detail (The Chapter) and mirrored back to the reader's actual life (The Mirror) using brain context. The mirror observes and resonates — a friend pointing out parallels, NOT a consultant rearranging the reader's…

garrytan/gbrain · 138 tokens

miniapp

Build a tiny interactive HTML playground only when someone asks to see, play with, or step through a mechanism.

yc-software/qm · 25 tokens

eli5

Explain research, papers, or technical ideas in plain English with minimal jargon, concrete analogies, and clear takeaways. Use when the user says "ELI5 this", asks for a simple explanation of a paper or research result, wants jargon removed, or asks what something technically dense actually means.

companion-inc/feynman · 63 tokens

deck-course-module

暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.

nexu-io/html-anything · 25 tokens

best-practices

Searchable knowledge base of 152+ programming best practices across 30+ languages and frameworks. BM25-powered search over curated resources from industry leaders (Google, Airbnb, Uber, Mozilla, Shopify, OWASP).

dereknguyen269/programing-best-practices · 0 tokens