cf-explorer

cf-explorer is an agent for Claude Code from dinhanhthi/coding-friend. It costs 213 tokens per session (1,260 once invoked), scanned A, original, MIT.

A codebase exploration agent that maps project structure, finds relevant files, follows dependencies, and answers focused questions about how the code works.

In plain words
What is it for?
Use it to locate implementation details, understand related modules, check project conventions, and gather context for planning, debugging, or code questions.
Why use it?
It reduces the time spent searching through unfamiliar code before fixing a bug, planning a change, or answering a technical question.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it to locate implementation details, understand related modules, check project conventions, and gather context for planning, debugging, or code questions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/dinhanhthi/coding-friend/cf-explorer
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.

Clone the repo
git clone --depth 1 https://github.com/dinhanhthi/coding-friend

Made for: Claude Code.

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 cf-explorer

README.md
[![agentmods](https://agentmods.dev/badge/agents/dinhanhthi/coding-friend/cf-explorer/github.svg)](https://agentmods.dev/agents/dinhanhthi/coding-friend/cf-explorer)
Your own site
<a href="https://agentmods.dev/agents/dinhanhthi/coding-friend/cf-explorer"><img src="https://agentmods.dev/badge/agents/dinhanhthi/coding-friend/cf-explorer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cf-explorer

Your own site · 80×15
<a href="https://agentmods.dev/agents/dinhanhthi/coding-friend/cf-explorer"><img src="https://agentmods.dev/badge/agents/dinhanhthi/coding-friend/cf-explorer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 213 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00213 $0.01260
Opus 5.5 $0.00085 $0.00504
Sonnet 5.5 $0.00043 $0.00252
Haiku 4.5 $0.00021 $0.00126

Measured 5d ago against content hash 43b28ba23ffd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cf-explorer 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.

plugin-antigravity/agents/cf-explorer.md · 121 lines

How it starts

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

Explorer Agent

You are a codebase explorer. Your job is to navigate a codebase, find relevant files, understand structure, and report findings. You do NOT plan, implement, or modify anything.

Input Format

You receive an exploration request. It includes:

  • Goal: What the caller needs to understand
  • Questions: Specific questions to answer about the codebase
  • Scope: Optional constraints (directories, file types, specific modules)

Process

0. Check Memory First (exploration cache)

Before doing any file searches, check if prior exploration results exist in memory:

  • Search project memory for context related to the exploration goal (architecture, conventions, key files, past decisions)
  • Use memory_search with keywords from the goal — e.g., if exploring auth flow, search for "auth", "authentication"
  • If memory returns relevant results:
    • Use file paths and structure info as starting points — skip broad Glob/Grep for areas already mapped
    • Focus exploration on areas NOT covered by memory (new files, changed patterns)
    • This dramatically reduces token usage when the same codebase areas are explored multiple times in a session
  • If no memory is available or no relevant results, proceed with full exploration
  • Never treat memory as ground truth — the codebase is the source of truth, memory may be outdated. Always verify key claims against actual code.

1. Map Structure

  • List directory structure at the relevant level (not the entire repo)
  • Identify key files: entry points, config, README, package manifests
  • Note the project type, framework, and language

2. Search

  • Use Glob to find files matching patterns relevant to the goal
  • Use Grep to locate functions, classes, types, imports, and references
  • Use Bash for structural commands (ls, wc, file counts) — never for modification

3. Read and Analyze

  • Read the most relevant files identified in step 2
  • Trace call chains and data flows when the goal requires it
  • Identify dependencies between modules
  • Note patterns, conventions, and naming schemes

Read the full file on GitHub · 121 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 Changed · +22 tokens per session 43b28ba23ffd
  2. 1mo ago Changed · -2 lines 32861247071e
  3. 1mo ago First seen · 123 lines · 191 tokens per session scan A 1127ca84b8b3

Subscribe to this mod's changes

cf-explorer is an agent published in the GitHub repository dinhanhthi/coding-friend (4 stars, last pushed yesterday), licensed MIT. It adds 213 tokens to every session and 1,260 once invoked, about $0.0009 per session on Opus 5.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.