# Codebase Orientation: Map a Repo in 10 Tool Calls

> A cheap, deterministic procedure that gets your agent oriented in an unfamiliar repository before it spends tokens reading files or risks editing production.

Codebase Orientation: Map a Repo in 10 Tool Calls is a free AI agent skill on Agensi by Korey Dillon, in Productivity. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Korey Dillon](https://www.agensi.io/creators/korey-dillon)
- Category: [Productivity](https://www.agensi.io/skills/productivity)
- Uses: 2
- Version: 1.0
- Last updated: 2026-10-13
- Security: scan passed (2026-10-13); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/codebase-orientation-map-a-repo-in-10-tool-calls
- Tags: productivity, ai-agents, code-review, codebase, onboarding, repository, grep, agent-workflow

## About this skill

Dropping an agent into a repository it has never seen usually goes one of two ways. It reads dozens of files and burns context before doing any work, or it guesses at a file and edits the wrong thing. This skill replaces both with a short, repeatable procedure built on file listing, search, and a handful of reads.

The agent identifies the project type and stack from manifest files, captures git state, maps the tree by directory with entry points, config, tests, and the largest files, then traces imports and importers for the files the task actually touches. When the task names a concept rather than a file, a concept-to-regex reference maps "auth", "webhooks", "retries", and two dozen other ideas to search patterns that work across languages. Files are ranked by hit count and only the top few get read.

Before any change, the agent checks for production signals: framework environment variables, hosted database hosts, a stray .env file, a kube context with prod in the name. If one fires, the agent **stops and asks you to confirm** the target instead of assuming. It never prints the secret values it is checking.

The whole thing targets 8 to 15 tool calls and at most three full file reads. Example commands are given for both Unix shells and PowerShell. The output is a 40-line summary your agent can store in project memory so the next session skips the scan.

Built by Korey Dillon (LatentAxis). Source: https://github.com/koreydillon/cipher-harness

## Requires

- Python

## Known limitations

Above roughly 2,000 code files the agent scopes the scan to the subtree the task concerns and says so. Import tracing is pattern based, so dynamic imports and dependency injection can be missed. Production detection is heuristic: it catches common signals, not every possible setup. Best with an agent that can run shell commands; read-only file tools work but take more calls.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Codebase Orientation: Map a Repo in 10 Tool Calls skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill save time and tokens?

Instead of reading files one by one, the agent follows a fixed procedure: manifests for type and stack, git state, a directory map with entry points and tests, then search hits ranked by count. It targets 8 to 15 tool calls and at most three full file reads before it reports back.

### Does it work with any language or framework?

Yes. It detects the stack from manifest files such as package.json, pyproject.toml, go.mod, Cargo.toml, Gemfile, and .csproj, and the concept-to-regex search map is written to match patterns across languages.

### What does my agent need to use it?

Any agent that reads SKILL.md files and can list, search, and read files. Shell access is best, with example commands for both Unix shells and PowerShell. There are no scripts or dependencies to install.

### How does the production check work?

Before the first change, the agent looks for production signals such as framework environment variables set to production, hosted database hosts, a stray .env file, or a kube context containing prod. If one appears, it stops and asks you to confirm the target before editing. It never prints the values it checks.

### Can it handle large monorepos?

Yes. It runs the manifest step at the root and in each package directory, and above roughly 2,000 code files it scopes the scan to the subtree your task concerns and tells you it did.

### What is in the package?

SKILL.md with the seven-step procedure, a tool-call budget, and an output template, plus references/search-map.md mapping 28 concepts (auth, webhooks, retries, and more) to cross-language search patterns. It is free and MIT licensed.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
