llamafarm: Command for Claude Code

.agents/commands/research.md

research is a command for Claude Code from llama-farm/llamafarm. It costs 0 tokens per session (1,488 once invoked), scanned A, original, Apache-2.0.

A checklist for understanding a software repository before changing its code. A monorepo is one repository containing several related projects.

In plain words
What is it for?
Use it to investigate an issue, map affected projects, find entry points, identify risks, and plan verification.
Why use it?
It helps locate the right code, tests, dependencies, and validation commands before implementation begins.

Command for Claude Code

Written for Claude Code: a Claude Code command (commands/*.md). Also seen: installed under .agents/ (shared by several agents).

This is llama-farm/llamafarm's own configuration. It tells Claude Code how to work on llamafarm itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything llamafarm configures →

Reuse

Borrowing it

Nothing to install: this file belongs to llama-farm/llamafarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/llama-farm/llamafarm/main/.agents/commands/research.md
Clone the repo
git clone --depth 1 https://github.com/llama-farm/llamafarm

Made for: Claude Code.

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 research

README.md
[![agentmods](https://agentmods.dev/badge/commands/llama-farm/llamafarm/research/github.svg)](https://agentmods.dev/commands/llama-farm/llamafarm/research)
Your own site
<a href="https://agentmods.dev/commands/llama-farm/llamafarm/research"><img src="https://agentmods.dev/badge/commands/llama-farm/llamafarm/research/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 research

Your own site · 80×15
<a href="https://agentmods.dev/commands/llama-farm/llamafarm/research"><img src="https://agentmods.dev/badge/commands/llama-farm/llamafarm/research.svg" alt="Reviewed on agentmods" width="80" 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,488 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.00000 $0.01488
Opus 5 $0.00000 $0.00744
Sonnet 5 $0.00000 $0.00298
Haiku 4.5 $0.00000 $0.00149

Measured 9d ago against content hash acb8b031775c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

research 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 9d 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/commands/research.md · 134 lines

How it starts

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

Codebase Research Playbook

A fast, reliable way for agents to understand this monorepo before implementing an issue. Follow this checklist to map scope, find the right code, and de‑risk changes.

Objectives

  • Understand the issue: clarify scope, inputs/outputs, and success criteria.
  • Locate the code path: find entry points, flows, configs, and tests.
  • De‑risk: identify edge cases, cross‑project impacts, and verification steps.

Quickstart Checklist (15–30 min)

  • Read the issue: capture user story, acceptance criteria, affected area(s), and constraints.
  • Identify project(s): server, cli, rag, models, docs. If unsure, start with Nx graph.
  • Skim module entry points:
    • server/main.py and server/api/**
    • cli/main.go and cli/cmd/**
    • rag/cli.py and rag/**
    • docs/website/**
  • Find existing tests near the suspected code.
  • Collect commands to run (build/test/dev) so you can validate later.

Workspace-first view (Nx preferred)

If Nx tools are available, prefer them to map dependencies and tasks.

  • Graph: visualize projects and edges.
    • Example: run a project graph or open the visualization tool to see producers/consumers.
  • Show project details: inspect target configurations (build/test/lint/dev).
  • Docs: consult relevant Nx docs for generators/tasks if needed.

If Nx tools are not available, manually inspect:

  • nx.json, project.json files at repo and project roots
  • package.json scripts (if present in subprojects)
  • server/project.json, server/pyproject.toml
  • cli/go.mod, cli/project.json
  • rag/pyproject.toml, rag/default_strategies.yaml

How to search effectively

  • Start semantic, then go exact:
    • Use semantic search for “how/where” questions (endpoints, flows, responsibilities).
    • Use exact search (ripgrep/grep) for symbols, function names, routes, or constants.
  • Good semantic queries:
    • “Where is user authentication handled?”
    • “How are CLI commands registered?”
    • “Where is RAG document ingestion triggered?”
  • Good exact searches (ripgrep examples):
rg --hidden --glob '!**/dist/**' --glob '!**/node_modules/**' "uvicorn|FastAPI" server | cat
rg --hidden "cobra\.Command" cli | cat
rg --hidden "pytest|conftest\.py" server | cat
rg --hidden "project\.json" -n | cat
  • Trace the flow: when you find a hit, read nearby files; follow imports, routes, and callers.
    • Expand outward until you can explain inputs, transformations, side effects, and outputs.

Read the full file on GitHub · 134 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. 9d ago First seen · 134 lines · 0 tokens per session scan A acb8b031775c

Subscribe to this mod's changes

research is a command published in the GitHub repository llama-farm/llamafarm (838 stars, last pushed 3mo ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,488 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.