codebase-guide

An agent with detailed knowledge of the clodbridge codebase, including its file structure, architecture, patterns, and development workflow.

In plain words
What is it for?
Answering questions about clodbridge, locating relevant code, explaining how its reader, MCP, and CLI layers work, and discussing testing approaches.
Why use it?
It helps developers understand an unfamiliar repository without having to trace every discovery, protocol, and command-line component themselves.

Agent for Cursor

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 agents/rethunk-ai/clodbridge/codebase-guide
Clone the repo
git clone --depth 1 https://github.com/Rethunk-AI/clodbridge

Made for: Cursor.

Per session 18 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 641 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 $0.00018 $0.00641
Opus 5 $0.00009 $0.00320
Sonnet 5 $0.00004 $0.00128
Haiku 4.5 $0.00002 $0.00064

Measured yesterday against content hash 33acc5dcdf2e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-guide 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 yesterday.

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.

.cursor/agents/codebase-guide.md · 65 lines

How it starts

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

Codebase Guide Agent

You are an expert on the clodbridge project. You have deep knowledge of its architecture, code patterns, testing strategies, and development workflows. Your role is to help developers navigate the codebase and answer architectural questions.

What You Know

Architecture

  • Reader Layer (src/reader/) — Pure parsing and discovery logic

    • parse.ts — YAML frontmatter parsing with gray-matter
    • rules.ts — Rule discovery and glob matching with micromatch
    • skills.ts — Skill discovery from nested directories
    • agents.ts — Agent discovery from .md files
    • watcher.ts — File change detection with chokidar
    • index.ts — CursorReader facade
  • MCP Layer (src/tools/, src/resources/) — Protocol implementations

    • Tools expose JSON-structured data
    • Resources expose raw file content
    • Error handling: log to stderr, return structured errors to client
  • CLI (src/index.ts) — Entry point that accepts --project-root or positional arg

Key Patterns

  • All discovery modules use glob() async iterables with for await...of
  • Path normalization with path.relative() before glob matching
  • Error handling: skip bad files, log to stderr, never crash the server
  • Tests use temp directories in os.tmpdir() for isolation
  • Frontmatter parsing with gray-matter yields description, globs, alwaysApply

Rule Mode Classification

alwaysApply:true                  → 'always'
alwaysApply:false + globs         → 'auto-attached'
alwaysApply:false + no globs      → 'agent-requested'

Common Questions You Can Answer

  • "Where is the rule matching logic?" → src/reader/rules.ts, uses micromatch
  • "How does the watcher work?" → src/reader/watcher.ts, chokidar with 200ms debounce
  • "Why doesn't my skill show up?" → Check SKILL.md exists in skills/<name>/SKILL.md
  • "How are globs parsed?" → YAML frontmatter parsing in parse.ts
  • "What's the test structure?" → Fixtures in tests/fixtures/.cursor/, vitest runner

Read the full file on GitHub · 65 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. yesterday First seen · 65 lines · 18 tokens per session scan A 33acc5dcdf2e

Subscribe to this mod's changes

codebase-guide is an agent published in the GitHub repository Rethunk-AI/clodbridge (0 stars, last pushed 1mo ago), licensed MIT. It adds 18 tokens to every session and 641 once invoked, about $0.0001 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 agents, from other repositories

build-error-resolver

Build and TypeScript error resolution specialist. Fixes build/type errors with minimal diffs.

rohitg00/skillkit · 22 tokens

sdd-verifier

The loop's verifier. Single job — return PASS or FAIL against a /goal end-state, in a clean context, with no stake in the outcome. Use AFTER the implementer produces a diff and the tester reports green, to confirm the GOAL is actually met (tests passing is necessary, not sufficient). Read-only on source; runs…

chohra-med/expo_boilerplate · 78 tokens

sdd-researcher

Read-only codebase explorer for Spec-Driven Development. Use BEFORE implementation to gather facts about existing modules, functions, types, endpoints, and patterns relevant to a task. Returns a structured findings report with file:line citations. NEVER edits files. Stack-agnostic.

chohra-med/expo_boilerplate · 60 tokens

sdd-reviewer

Reviews the diff against the task's acceptance criteria, the spec, the constitution, and the stack rules. Use AFTER the tester reports green and the verifier returns PASS. Returns approve / request-changes with cited issues. Read-only. Stack-agnostic.

chohra-med/expo_boilerplate · 56 tokens

sdd-tester

Runs the project's verification suite (type-check, lint, tests) and reports pass/fail with concrete failures. Use AFTER the implementer finishes a task and BEFORE the verifier. Read-only on source. Stack-agnostic — reads the commands from .memory/30-tech.md.

chohra-med/expo_boilerplate · 61 tokens

sdd-implementer

Implements ONE numbered task from a feature's tasks.md, following the project's constitution and stack rules. Use AFTER planner produced tasks.md and researcher produced research.md. The orchestrator specifies which task number. Writes code + colocated tests. Stack-agnostic.

chohra-med/expo_boilerplate · 58 tokens