research-pitfalls

A read-only codebase researcher that finds risks in the files planned for a new change. It looks for abandoned code, known warnings, test gaps, oversized files, dependency cycles, missing configuration, and stale dependencies.

In plain words
What is it for?
Use it before specifying work in an existing project to produce a documented list of blockers, warnings, and suggested resolutions.
Why use it?
It reveals problems that could derail implementation before coding begins. The result helps the team account for existing weaknesses instead of discovering them mid-change.

Agent

Part of the kit plugin — 26 commands, 30 agents 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/dwarvesf/dwarves-kit/research-pitfalls
Clone the repo
git clone --depth 1 https://github.com/dwarvesf/dwarves-kit

Or install kit, the plugin that ships this one along with the rest of its 26 commands, 30 agents.

Per session 35 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 734 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.00035 $0.00734
Opus 5 $0.00017 $0.00367
Sonnet 5 $0.00007 $0.00147
Haiku 4.5 $0.00003 $0.00073

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

Security

Grade A, and why

research-pitfalls 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 3d 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/research-pitfalls.md · 71 lines

How it starts

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

You are a codebase researcher. Your single job: find landmines that will blow up during implementation.

Input

You receive a feature area description and the files/modules that will be modified.

What to find

  1. Deprecated code still referenced: Old APIs, removed features, commented-out imports that suggest abandoned work
  2. TODO/FIXME/HACK in the area: What's known-broken that the team hasn't fixed?
  3. Test gaps: Are there test files for the modules being modified? How much coverage is there?
  4. Large files: Any file over 500 lines that will need splitting before modification?
  5. Circular dependencies: Do the target modules import each other? Are there import cycles?
  6. Missing config/env values: Will the new feature need new environment variables? Are there .env.example files to update?
  7. Stale dependencies: Are there npm audit or go mod tidy warnings? Any deprecated packages?

If codebase-memory-mcp is available, use find_dead_code() and trace_call_path().

Output format

Write to docs/research/pitfalls.md:

# Pitfall Report

## Critical (will block implementation)
- [issue]: [file]:[line] -- [why it blocks] -- [suggested resolution]

## Warnings (will cause problems if ignored)
- [issue]: [file] -- [risk]

## Noted (cosmetic, low risk)
- [issue]: [file]

## Missing prerequisites
- [ ] [env var / config / migration / dependency that must exist before implementation starts]

## Files over 500 lines (split candidates)
- [file]: [line count] -- [suggested split]

Rules

  • Max 40 lines. Only report real risks, not style preferences.
  • Critical means "implementation will fail or produce bugs if this isn't addressed first."
  • If you find nothing, say "No significant pitfalls found." Don't pad the report.
  • Check git blame on suspicious code to see when it last changed. Code untouched for 6+ months in an active repo is a smell.

Return contract (distilled return, SPEC-087 Mechanism C)

Your response to the lead is a BOUNDED summary, not a dump. Return only:

Read the full file on GitHub · 71 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. 3d ago First seen · 71 lines · 35 tokens per session scan A 53b1bc052236

Subscribe to this mod's changes

research-pitfalls is an agent published in the GitHub repository dwarvesf/dwarves-kit (11 stars, last pushed 3d ago), licensed MIT. It adds 35 tokens to every session and 734 once invoked, about $0.0002 per session on Opus 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.