# codebase-pattern-finder

Finds existing code patterns and concrete implementations across your repository to guide new work.

- subagent · `type=agent` · Claude Code · 300 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-tools/codebase-pattern-finder.md
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/agents/codebase-pattern-finder

## What it does

The subagent inspects your repository using `Grep`, `Glob`, `Read`, and `Bash`. It locates working feature implementations, API routes, database queries, component setups, and accompanying test suites. Each finding comes with precise file paths, line ranges, and short explanations of the observed design choices.

Its behavior is strictly factual. The agent operates as a neutral cataloger: it documents existing patterns as they are, without critiquing code quality, pointing out anti-patterns, or deciding which implementation is preferable unless directly instructed.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --agent development-tools/codebase-pattern-finder
```

2. **Manually: put the files in place**
- File: `.claude/agents/codebase-pattern-finder.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/codebase-pattern-finder.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/codebase-pattern-finder.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/agents/development-tools/codebase-pattern-finder.md

## When to use it
- locate working examples of specific features before writing new code
- extract established unit and integration testing patterns across the project
- compare different pagination or query handling strategies already in production
- gather reference implementations with exact file paths and line numbers

## Example prompts
- Find cursor pagination implementations and their tests in this project
- Show how middleware and request validation are handled across our routes
- Locate component state management patterns used in the frontend directory

## Similar
- [frontend-developer](https://affpapa.org/en/nevibecode/agents/voltagent-community-frontend-developer.md) — subagent · 40905 installs
- [dx-optimizer](https://affpapa.org/en/nevibecode/agents/dx-optimizer.md) — subagent · 1198 installs
- [mlops-engineer](https://affpapa.org/en/nevibecode/agents/voltagent-community-mlops-engineer.md) — subagent · 1009 installs
- [postgres-pro](https://affpapa.org/en/nevibecode/agents/postgres-pro.md) — subagent · 897 installs
- [agent-installer](https://affpapa.org/en/nevibecode/agents/agent-installer.md) — subagent · 363 installs
- [embedded-systems](https://affpapa.org/en/nevibecode/agents/embedded-systems.md) — subagent · 279 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 804 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
