gen-docs

A command that creates project documentation such as a README, architecture guide, API reference, deployment guide, contribution guide, or user manual.

In plain words
What is it for?
It helps generate Markdown or Docusaurus documentation, including local setup instructions, troubleshooting details, deployment notes, and API information.
Why use it?
It reduces the work of documenting an existing project and gives developers and users a shared explanation of how it works.

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/alphaaiservice/cortex/gen-docs
Clone the repo
git clone --depth 1 https://github.com/alphaaiservice/cortex
Per session 60 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 15,983 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00060 $0.15983
Opus 5 $0.00030 $0.07991
Sonnet 5 $0.00012 $0.03197
Haiku 4.5 $0.00006 $0.01598

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

Security

Grade B, and why

gen-docs scanned grade B with 2 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo yum update -y && sudo yum install docker docker-compose-plugin -y

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:[port]/health
commands/gen-docs.md · 2,045 lines

How it starts

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

Comprehensive Documentation Generator

Generate production-quality documentation for this project based on: $ARGUMENTS

Parse $ARGUMENTS to determine:

  • Type: --type=readme (default if not specified), --type=architecture, --type=api, --type=deployment, --type=local (LOCAL_DEV.md), --type=contributing, --type=manual, or --type=all (generates everything)
  • Format: --format=markdown (default) or --format=docusaurus (generates Docusaurus-compatible docs site structure)

--type=local (also part of all) generates LOCAL_DEV.md per commands/references/LOCAL_DEV_STANDARD.md §4: one-command quickstart, prerequisites + pinned versions, ports table, seed credentials, common make commands, hybrid native-hot-reload mode, the make verify boot check, and the full Troubleshooting matrix. Whenever the README is generated it MUST carry a top-level "## Run Locally" section (the 3-line quickstart, linking LOCAL_DEV.md).

If no arguments are provided, default to --type=all --format=markdown (generate all documentation in standard Markdown).


Step 1: Analyze Project for Documentation

Before generating any documentation, perform a deep project scan. Run all detection tasks in parallel using the Agent tool.

1A: Discover Project Identity

# Project name and metadata
cat package.json 2>/dev/null | grep -E '"name"|"version"|"description"|"license"|"author"'
cat pyproject.toml 2>/dev/null | head -30
cat setup.py 2>/dev/null | head -30
cat Cargo.toml 2>/dev/null | head -20
cat go.mod 2>/dev/null | head -5

Extract:

  • Project name (from package.json name, pyproject.toml project.name, or directory name)
  • Version (from package.json version, pyproject.toml version, or git tags)
  • Description (from metadata or README first line)
  • License (from LICENSE file or metadata)
  • Author/Team (from metadata, CODEOWNERS, or git log)

1B: Scan Project Structure

# Map the full directory tree (excluding noise)
find . -not -path "*/node_modules/*" -not -path "*/.git/*" -not -path "*/venv/*" \
       -not -path "*/__pycache__/*" -not -path "*/.next/*" -not -path "*/dist/*" \
       -not -path "*/.mypy_cache/*" -not -path "*/.ruff_cache/*" -not -path "*/.pytest_cache/*" \
       -type f | head -300

Read the full file on GitHub · 2,045 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 · 2,045 lines · 60 tokens per session scan B 02af30161be2

Subscribe to this mod's changes

gen-docs is a command published in the GitHub repository alphaaiservice/cortex (1 stars, last pushed 25d ago), licensed MIT. It adds 60 tokens to every session and 15,983 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.