Codebase Analysis logo

Codebase Analysis

Community
robbyt
codebase-analysis

Codebase analysis via the Codex MCP server with a read-only sandbox. Trigger when user needs architecture overview ("analyze this codebase with Codex", "have Codex map dependencies"), onboarding to unfamiliar code, understanding legacy systems, or identifying technical debt.

Overview

Publisherrobbyt
Repositoryclaude-skills
Skill namecodebase-analysis
Stars
42
Forks
2
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by robbyt on GitHub. Read the source before you install it.

Installation

Install the Codebase Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/robbyt/claude-skills/tree/main/plugins/codex/skills/codebase-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/robbyt/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/plugins/codex/skills/codebase-analysis .claude/skills/codebase-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Codebase Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Codebase Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Codebase Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Codebase Analysis via Codex

Use Codex to get a second-opinion architectural read of the current project, with the sandbox locked to read-only. Codex consults; Claude writes.

Transport

Always use the MCP tool. The plugin's MCP server (scripts/codex-mcp-server.mjs, started from .mcp.json) runs codex exec for each call. Tool name: mcp__plugin_codex_cli__codex. If the example below errors with an unknown-tool error, run /mcp and substitute the actual prefix (e.g., mcp__codex_cli__codex). Shell fallback is a last resort (see ../references/commands.md).

Model

Pin model: "gpt-6-sol" with config: { "model_reasoning_effort": "medium" } on the opening call. Codebase analysis benefits from the flagship's reasoning across many files — don't downgrade to gpt-6-luna here. Set both on the first codex call only; codex-reply reuses them unless you escalate. Honor an explicit user-named model if given. See ../references/patterns.md → Models and Reasoning effort. Escalate to gpt-6-astra (pass model + config on the codex-reply) from round 3, when a disagreement survives a round, or when re-reviewing the same area in a fresh thread — see ../references/patterns.md → Escalating to gpt-6-astra.

Basic call

mcp__plugin_codex_cli__codex({
  "prompt": "<task>\nAnalyze this project's architecture: entry points, major modules, component relationships, and notable dependencies.\n</task>\n\n<compact_output_contract>\nStructured sections, one per topic. Cite the files each claim is based on.\n</compact_output_contract>\n\n<grounding_rules>\nGround claims in files you read. Label inferences, and list what you could not determine.\n</grounding_rules>",
  "sandbox": "read-only",
  "model": "gpt-6-sol",
  "config": { "model_reasoning_effort": "medium" }
})

The response includes a threadId. Use mcp__plugin_codex_cli__codex-reply with that id to drill in without re-establishing context.

When to Use

  • Onboarding to an unfamiliar codebase
  • Understanding legacy systems
  • Mapping component relationships
  • Finding hidden dependencies
  • Architecture documentation
  • Technical debt assessment

Examples

Full project analysis:

mcp__plugin_codex_cli__codex({
  "prompt": "Analyze this project. Report on:\n- Overall architecture\n- Key dependencies\n- Component relationships\n- Potential issues",
  "sandbox": "read-only",
  "model": "gpt-6-sol",
  "config": { "model_reasoning_effort": "medium" }
})

Flow mapping:

mcp__plugin_codex_cli__codex({
  "prompt": "Map the authentication flow. Identify every component involved from request to session creation.",
  "sandbox": "read-only",
  "model": "gpt-6-sol",
  "config": { "model_reasoning_effort": "medium" }
})

Dependency analysis:

mcp__plugin_codex_cli__codex({
  "prompt": "Analyze dependencies: direct vs transitive, outdated packages, circular dependencies, bundle-size impact.",
  "sandbox": "read-only",
  "model": "gpt-6-sol",
  "config": { "model_reasoning_effort": "medium" }
})

Iterative workflow (prefer codex-reply)

When you're still working on the same area of the codebase, continue the existing thread rather than starting a new codex call. Codex retains context between rounds; fresh calls force it to re-read files and drift from its prior reasoning.

Typical loop:

  1. Initial consult → save the threadId from the response.
  2. Claude reads related files / runs a query / makes a change.
  3. codex-reply with new findings or a follow-up question.
  4. Repeat — but cap at 3–4 rounds total, and run round 3 onward on gpt-6-astra. If the thread isn't converging, stop and bring the current state back to the user.

threadId is an MCP argument — pass it as the threadId field of codex-reply, not in the prompt text. See ../references/mcp-schema.md for wrong-vs-right examples.

Example — three rounds on the same architecture thread:

# Round 1 — initial map (opening call pins model + effort)
mcp__plugin_codex_cli__codex({
  "prompt": "Map the auth flow end-to-end.",
  "sandbox": "read-only",
  "model": "gpt-6-sol",
  "config": { "model_reasoning_effort": "medium" }
})
# → threadId: "019da14b-..."  /  flags: uncertainty about session rotation

# Round 2 — Claude reads src/session/ and reports back
mcp__plugin_codex_cli__codex-reply({
  "threadId": "019da14b-...",
  "prompt": "src/session/rotate.ts shows a 15m rotation window, not the 1h you assumed. Does that change anything in your flow map?"
})

# Round 3 — drill into a specific layer; escalate to gpt-6-astra (the thread keeps its history)
mcp__plugin_codex_cli__codex-reply({
  "threadId": "019da14b-...",
  "prompt": "Focus on the data layer. What invariants does this flow depend on and where are they enforced?",
  "model": "gpt-6-astra",
  "config": { "model_reasoning_effort": "medium" }
})

Start a fresh thread when: the user switches topic, the threadId is no longer in context, or Claude has made substantial code changes that would be cleaner to re-prime than to patch incrementally. See ../references/patterns.md.

After the analysis

Codex's read is a second opinion, not authoritative — it can misread structure or miss context it never saw.

  • Relay the findings to the user and attribute them to Codex, rather than presenting them as verified fact.
  • Spot-check claims against the actual code before acting on them (see ../references/patterns.md → Validation) — especially dependency, impact, and "nothing else uses this" claims.
  • Surface uncertainty or disagreement to the user instead of smoothing it over into a confident-sounding summary.
  • For broad analyses, consider running the codex:consult agent in the background. For prompt blocks and recipes, see ../references/prompting.md.

Safety

  • Always sandbox: "read-only". Codex must not modify files.
  • Never use workspace-write or danger-full-access.
  • Never use --dangerously-bypass-approvals-and-sandbox.

Fallback (rare)

If the MCP server is unavailable (plugin disabled, server crashed), see ../references/commands.md for the Bash equivalent. Requires dangerouslyDisableSandbox: true because Codex writes its own session state.

Frequently asked questions

What does the Codebase Analysis AI skill do?

Codebase analysis via the Codex MCP server with a read-only sandbox. Trigger when user needs architecture overview ("analyze this codebase with Codex", "have Codex map dependencies"), onboarding to unfamiliar code, understanding legacy systems, or identifying technical debt.

Why use Codebase Analysis on TypingMind?

Because you install it once and use it with any model. Codebase Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Codebase Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/robbyt/claude-skills/tree/main/plugins/codex/skills/codebase-analysis. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Codebase Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Codebase Analysis?

As many as you like. As long as a model supports skills, you can use Codebase Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Codebase Analysis AI skill free?

It is published on GitHub by robbyt. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇