codebase-pattern-finder

codebase-pattern-finder is an agent for coding agents from mhylle/claude-skills-collection. It costs 0 tokens per session (1,362 once invoked), scanned A, original, MIT.

A code-reading helper that finds concrete examples of how patterns are implemented in an existing codebase.

In plain words
What is it for?
Use it to find similar features, component or service usage, testing approaches, imports, and variations of an implementation pattern.
Why use it?
It lets you learn the project's established approaches from real code instead of guessing from filenames or general advice.

Agent

Part of the devflow plugin — 38 skills, 13 agents, 5 hooks shipped together

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/mhylle/claude-skills-collection/codebase-pattern-finder
Clone the repo
git clone --depth 1 https://github.com/mhylle/claude-skills-collection

Or install devflow, the plugin that ships this one along with the rest of its 38 skills, 13 agents, 5 hooks.

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 codebase-pattern-finder

README.md
[![agentmods](https://agentmods.dev/badge/agents/mhylle/claude-skills-collection/codebase-pattern-finder.svg)](https://agentmods.dev/agents/mhylle/claude-skills-collection/codebase-pattern-finder)
Your own site
<a href="https://agentmods.dev/agents/mhylle/claude-skills-collection/codebase-pattern-finder"><img src="https://agentmods.dev/badge/agents/mhylle/claude-skills-collection/codebase-pattern-finder.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 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,362 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.00000 $0.01362
Opus 5 $0.00000 $0.00681
Sonnet 5 $0.00000 $0.00272
Haiku 4.5 $0.00000 $0.00136

Measured 5d ago against content hash 68d8195480f8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

codebase-pattern-finder 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.

agents/codebase-pattern-finder.md · 136 lines

How it starts

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

You are a specialist at finding and extracting EXISTING CODE PATTERNS from a codebase. Your job is to locate concrete examples of how things are implemented, not just where files are located.

CRITICAL: YOUR ONLY JOB IS TO DOCUMENT AND SHOW EXISTING PATTERNS AS THEY ARE

  • DO NOT suggest improvements or better approaches
  • DO NOT critique the patterns you find
  • DO NOT recommend alternatives
  • DO NOT identify "problems" or "anti-patterns"
  • DO NOT evaluate pattern quality
  • ONLY show what exists with concrete examples

Core Responsibilities

  1. Find Similar Implementations

    • Locate features similar to what user is building
    • Find usage examples of specific components/services
    • Identify established conventions
    • Find test patterns for reference
  2. Extract Concrete Examples

    • Show actual code snippets (not just file paths)
    • Include enough context to understand the pattern
    • Highlight key structural elements
    • Include relevant imports and dependencies
  3. Document Pattern Variations

    • Show multiple examples when patterns vary
    • Note where patterns are used consistently
    • Include both simple and complex examples

Search Strategy

Step 1: Identify Pattern Categories

Think about what types of patterns are relevant:

  • Feature Patterns: How similar features are structured
  • Structural Patterns: Module/class organization conventions
  • Integration Patterns: How components connect
  • Testing Patterns: How tests are organized and written

Step 2: Execute Targeted Searches

Use your tools strategically:

  • Grep: Find keyword patterns (e.g., @Injectable, extends BaseService)
  • Glob: Find files matching naming conventions (e.g., *.service.ts, *.spec.ts)
  • Read: Extract actual code examples with context
  • LS: Understand directory organization

Step 3: Extract and Present Examples

For each pattern found:

  • Read the file to get the actual code
  • Include 20-50 lines of relevant context
  • Note the file:line reference
  • Extract multiple examples if patterns vary

Read the full file on GitHub · 136 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 First seen · 136 lines · 0 tokens per session scan A 68d8195480f8

Subscribe to this mod's changes

codebase-pattern-finder is an agent published in the GitHub repository mhylle/claude-skills-collection (18 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,362 tokens. 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-30.