gen-claude

gen-claude is a command for coding agents from sgaunet/claude-plugins. It costs 19 tokens per session (6,129 once invoked), scanned A, original, MIT.

A command that creates or improves a CLAUDE.md file, which is a project guide read by the Claude Code coding assistant. It analyzes the repository and documents its tools, structure, and development practices within a stated size limit.

In plain words
What is it for?
Use it to generate missing guidance, improve an existing CLAUDE.md, detect formatter and linter settings, organize supporting docs, and preserve existing custom instructions.
Why use it?
It gives the assistant reliable project-specific context and avoids making developers write or maintain the guide entirely by hand.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the software-engineering plugin — 4 skills, 12 commands, 7 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 commands/sgaunet/claude-plugins/gen-claude
Clone the repo
git clone --depth 1 https://github.com/sgaunet/claude-plugins

Or install software-engineering, the plugin that ships this one along with the rest of its 4 skills, 12 commands, 7 agents.

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 gen-claude

README.md
[![agentmods](https://agentmods.dev/badge/commands/sgaunet/claude-plugins/gen-claude.svg)](https://agentmods.dev/commands/sgaunet/claude-plugins/gen-claude)
Your own site
<a href="https://agentmods.dev/commands/sgaunet/claude-plugins/gen-claude"><img src="https://agentmods.dev/badge/commands/sgaunet/claude-plugins/gen-claude.svg" alt="Measured on agentmods" height="20"></a>
Per session 19 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,129 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.00019 $0.06129
Opus 5 $0.00010 $0.03064
Sonnet 5 $0.00004 $0.01226
Haiku 4.5 $0.00002 $0.00613

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

Security

Grade A, and why

gen-claude 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 5d 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.

plugins/software-engineering/commands/gen-claude.md · 631 lines

How it starts

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

Generate CLAUDE.md Command

Automatically generate or enhance a project-specific CLAUDE.md file following 2025-2026 best practices. This command performs deep codebase analysis to create comprehensive project documentation that stays within the 2500 token limit.

Why This Command Exists

Problem: Projects often lack CLAUDE.md files or have poorly structured ones, forcing Claude to operate without project-specific context.

Solution: Automated generation that:

  • Analyzes codebase comprehensively
  • Auto-detects linter/formatter configs (avoids duplication)
  • Creates docs/ folder for progressive disclosure
  • Merges/enhances existing CLAUDE.md (preserves customizations)
  • Optimizes for 2500 token limit

Content Generation Rules

CRITICAL: When generating any content (CLAUDE.md, docs/, commit messages, descriptions, or any other output):

  • NEVER add Claude Code attribution or co-authorship
  • NEVER include phrases like "Generated by Claude", "Created with Claude Code", or similar
  • NEVER add "Co-Authored-By: Claude" in commit messages or documentation
  • All generated content should appear as if written by a human developer
  • Focus on technical accuracy and project-specific details, not tool attribution

Process (5 Phases)

Phase 1: Parallel Discovery (4 Sonnet Agents)

Launch 4 independent agents concurrently to analyze different aspects of the project:

Agent #1: Project Structure Analyzer

Task(subagent_type: "Explore", model: "sonnet", prompt: "
Analyze project structure and return JSON:
{
  languages: [list of detected languages from file extensions],
  frameworks: [frameworks/libraries detected from imports/configs],
  buildTool: string (npm/go/cargo/maven/gradle/make/task/etc),
  buildCommands: {build: '', test: '', lint: '', run: ''},
  structure: {
    source: path,
    tests: path,
    docs: path,
    config: path
  }
}

Detection strategy:
- Languages: Glob for *.go, *.js, *.py, *.rs, *.java, *.rb, *.php
- Build tools: Look for package.json, go.mod, Cargo.toml, requirements.txt, pom.xml, build.gradle, Makefile, Taskfile.yml
- Extract commands from: npm scripts, Makefile targets, Taskfile tasks, go.mod for go commands
- Map directory structure: src/, test/, docs/, internal/, cmd/, pkg/
")

Read the full file on GitHub · 631 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. 5d ago First seen · 631 lines · 19 tokens per session scan A 0413ddd25886

Subscribe to this mod's changes

gen-claude is a command published in the GitHub repository sgaunet/claude-plugins (16 stars, last pushed 3d ago), licensed MIT. It adds 19 tokens to every session and 6,129 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-30.