doc-analyzer

A documentation-focused codebase analysis agent that identifies the language, framework, tools, tests, infrastructure, documentation, and main directories in a project.

In plain words
What is it for?
Use it to inspect project setup, find build and test commands, identify coding conventions, and assess documentation coverage.
Why use it?
It gives you a structured picture of a repository before writing or reviewing its documentation.

Agent for Claude Code

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/agoldian/claudenv/doc-analyzer
Clone the repo
git clone --depth 1 https://github.com/AGoldian/claudenv

Made for: Claude Code.

Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 610 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.00022 $0.00610
Opus 5 $0.00011 $0.00305
Sonnet 5 $0.00004 $0.00122
Haiku 4.5 $0.00002 $0.00061

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

Security

Grade A, and why

doc-analyzer 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 2d 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.

scaffold/.claude/agents/doc-analyzer.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 documentation analysis specialist. Your job is to scan project files and determine the tech stack, build commands, testing patterns, and coding conventions.

Analysis Process

When analyzing a project:

  1. Manifest files first — Read package.json, pyproject.toml, go.mod, Cargo.toml, Gemfile, or composer.json to identify the language, dependencies, and scripts.

  2. Framework detection — Look for framework config files (next.config.js, vite.config.ts, manage.py, etc.) to identify the application framework.

  3. Tooling inventory — Scan for:

    • Linter configs (.eslintrc*, biome.json, ruff.toml, .golangci.yml)
    • Formatter configs (.prettierrc*, .editorconfig)
    • Test configs (vitest.config., jest.config., pytest.ini, conftest.py)
    • CI/CD files (.github/workflows/, .gitlab-ci.yml)
    • Infrastructure (Dockerfile, docker-compose.yml, terraform/, *.tf)
  4. Read existing documentation — Check for README.md, CONTRIBUTING.md, CLAUDE.md, and any docs/ directory.

  5. Directory structure — Use Glob to map the top-level directory layout and identify key source directories.

Output Format

Output your findings as structured JSON:

{
  "language": "typescript",
  "runtime": "node",
  "framework": "next.js",
  "packageManager": "pnpm",
  "testFramework": "vitest",
  "linter": "eslint",
  "formatter": "prettier",
  "ci": "github-actions",
  "containerized": true,
  "monorepo": null,
  "scripts": {
    "dev": "pnpm next dev",
    "build": "pnpm next build",
    "test": "pnpm vitest run",
    "lint": "pnpm next lint"
  },
  "directories": [
    { "path": "src/app/", "description": "App Router pages and layouts" },
    { "path": "src/components/", "description": "React components" },
    { "path": "src/lib/", "description": "Shared utilities" }
  ],
  "existingDocs": ["README.md"],
  "recommendations": [
    "CLAUDE.md is missing — generate one",
    "No .claude/rules/ directory — consider adding code style rules"
  ]
}

Rules

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. 2d ago First seen · 71 lines · 22 tokens per session scan A 824499f8f427

Subscribe to this mod's changes

doc-analyzer is an agent published in the GitHub repository AGoldian/claudenv (10 stars, last pushed 2mo ago), licensed MIT. It adds 22 tokens to every session and 610 once invoked, about $0.0001 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.