analyze_project

A project scanner that creates or refreshes a project's CLAUDE.md file with its tools, commands, folder structure, and working conventions. CLAUDE.md is a project instruction file that guides Claude Code sessions.

In plain words
What is it for?
Use it when starting work in an unfamiliar project or when the project's toolchain, commands, or structure has changed.
Why use it?
It removes the need to document the project setup by hand and keeps the instructions aligned with the files the project actually contains.

Command

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 commands/blendsdk/claude-codeops/analyze_project
Clone the repo
git clone --depth 1 https://github.com/blendsdk/claude-codeops
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,730 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.00054 $0.02730
Opus 5 $0.00027 $0.01365
Sonnet 5 $0.00011 $0.00546
Haiku 4.5 $0.00005 $0.00273

Measured yesterday against content hash 7b589d64eb5e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

analyze_project 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 yesterday.

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.

commands/analyze_project.md · 199 lines

How it starts

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

analyze_project — generate/refresh this project's CLAUDE.md

Detect this project's toolchain and conventions and write them to a project-level CLAUDE.md so every Claude Code session (and every CodeOps skill) adapts to this project. A non-flag $ARGUMENTS value is the target root (otherwise the current working directory); the flags --compact and --dry-run select the leaning mode described under Compact mode below.

This replaces the old CodeOps MCP analyze_project tool, which wrote .clinerules/project.md. The Claude Code equivalent is the project's CLAUDE.md.

Step 1 — Detect (read-only)

Inspect manifests and structure. Look for and read whichever exist: package.json, pnpm-workspace.yaml/turbo.json/nx.json (monorepo), tsconfig.json, Cargo.toml, go.mod, pyproject.toml/setup.cfg/requirements.txt, composer.json, Gemfile, pom.xml/build.gradle, docker-compose.yml/Dockerfile, Makefile, CI configs under .github/workflows/, and the lockfile (to infer the package manager).

From these, determine: project name, type (web-app / api / library / cli / mobile / infrastructure / compiler / monorepo), language(s), framework(s), package manager, test framework, and the build / test / verify / clean commands. Map the top-level directory structure and where source vs. test files live. Detect whether it is a monorepo.

Use only facts you can verify from the files — never invent commands. If something can't be determined, leave a clearly-marked TODO: placeholder.

Step 2 — Route by branch (parallel-worktree safety)

CLAUDE.md is one repo-wide file, so two agents refreshing it on different branches collide at merge time. Its Toolchain / Commands / Project structure are derived from the tree and can always be regenerated, so treat CLAUDE.md like a derived artifact: concentrate writes on one branch. Skip this whole step and just write normally if git is unavailable.

Determine:

  • current branchgit rev-parse --abbrev-ref HEAD
  • integration branchintegrationBranch from codeops/.codeops.yml if present, else the repo default (git symbolic-ref refs/remotes/origin/HEAD, else main/master)
  • parallel? — whether git worktree list shows more than one worktree

Read the full file on GitHub · 199 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. yesterday First seen · 199 lines · 54 tokens per session scan A 7b589d64eb5e

Subscribe to this mod's changes

analyze_project is a command published in the GitHub repository blendsdk/claude-codeops (4 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 2,730 once invoked, about $0.0003 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-31.