ijfw-pattern-mapper

ijfw-pattern-mapper is an agent for Claude Code from FerroxLabs/ijfw. It costs 32 tokens per session (772 once invoked), scanned A, original, MIT.

A planning-time agent that finds existing files resembling each new file in a plan and records those matches in PATTERNS.md.

In plain words
What is it for?
Use it before implementation to identify which existing files new code should follow, based on location, filename pattern, or role.
Why use it?
It removes the need for every coding agent to explore the codebase separately to learn its conventions. Agents can start from nearby examples instead.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: model in frontmatter; mentions subagents.

Part of the ijfw plugin — 34 skills, 22 commands, 37 agents, 6 hooks shipped together

Good fit Use it before implementation to identify which existing files new code should follow, based on location, filename pattern, or role.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/ferroxlabs/ijfw/ijfw-pattern-mapper
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/FerroxLabs/ijfw

Made for: Claude Code.

Or install ijfw, the plugin that ships this one along with the rest of its 34 skills, 22 commands, 37 agents, 6 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 ijfw-pattern-mapper

README.md
[![agentmods](https://agentmods.dev/badge/agents/ferroxlabs/ijfw/ijfw-pattern-mapper/github.svg)](https://agentmods.dev/agents/ferroxlabs/ijfw/ijfw-pattern-mapper)
Your own site
<a href="https://agentmods.dev/agents/ferroxlabs/ijfw/ijfw-pattern-mapper"><img src="https://agentmods.dev/badge/agents/ferroxlabs/ijfw/ijfw-pattern-mapper/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 ijfw-pattern-mapper

Your own site · 80×15
<a href="https://agentmods.dev/agents/ferroxlabs/ijfw/ijfw-pattern-mapper"><img src="https://agentmods.dev/badge/agents/ferroxlabs/ijfw/ijfw-pattern-mapper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 772 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.00032 $0.00772
Opus 5.5 $0.00013 $0.00309
Sonnet 5.5 $0.00006 $0.00154
Haiku 4.5 $0.00003 $0.00077

Measured 1mo ago against content hash 3112e4fc5866, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ijfw-pattern-mapper 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 1mo 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.

claude/agents/ijfw-pattern-mapper.md · 81 lines

How it starts

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

Map every new file in the current plan to the closest existing analog in the codebase. Write PATTERNS.md so subagents can onboard in one read instead of five minutes of codebase spelunking.

ROLE

Onboarding accelerator. In v1.4.4 each W*-A subagent spent ~5 min reading the codebase to discover conventions. This agent front-loads that work once at plan-time so every subagent reads PATTERNS.md and immediately knows which existing file to emulate.

PROCESS

  1. Read the plan — find .planning/<phase>/plan.md (or accept explicit task list). Extract every new file path listed (lines matching NEW or + prefixes, or explicit file paths in task descriptions).

  2. For each new file, find the closest analog:

    • Match by directory: a new file in mcp-server/src/orchestrator/ → look at existing files in that directory first.
    • Match by name pattern: *-checker.js → grep for existing *-checker.js or *-verifier.js files.
    • Match by role: if name contains test-, find an existing test file with similar subject matter.
    • Tie-break: prefer the file most recently touched (use Glob with mtime if available, else pick alphabetically last).
  3. Read the closest analog — extract its top-level structure: imports, exported symbols, class/function names, comment style.

  4. Write .planning/<phase>/PATTERNS.md:

    # Pattern Map — <phase>
    
    | new_file | closest_analog | reason | key_shape_to_match |
    |---|---|---|---|
    | path/to/new.js | path/to/existing.js | same dir + role | exports, fn sigs |
    

    One row per new file. key_shape_to_match is a ≤10-word description of what the subagent must replicate (e.g. "default export async fn, gate-result return").

INPUTS

  • phase (required): e.g. 1.4.4.
  • plan_path (optional): explicit path to plan.md; defaults to .planning/<phase>/plan.md.
  • new_files (optional): explicit list of new file paths; overrides plan scan.

OUTPUT CONTRACT

Read the full file on GitHub · 81 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. 1mo ago First seen · 81 lines · 32 tokens per session scan A 3112e4fc5866

Subscribe to this mod's changes

ijfw-pattern-mapper is an agent published in the GitHub repository FerroxLabs/ijfw (214 stars, last pushed 5d ago), licensed MIT. It adds 32 tokens to every session and 772 once invoked, about $0.0001 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-30.