magic-docs

magic-docs is a skill for Claude Code from irfad7/claude-power-skills. It costs 79 tokens per session (1,472 once invoked), scanned A, original, MIT.

A tool that reads a codebase and writes documentation based on the code itself, such as setup guides, API references, architecture guides, onboarding guides, and changelogs. A monorepo is one repository containing several related projects, which it can scope separately.

In plain words
What is it for?
Use it to generate a README, API documentation, architecture or onboarding guides, changelogs, or a full documentation set.
Why use it?
It reduces the risk of documentation becoming generic, guessed, or out of date by basing it on the actual project files and git history.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-power-skills plugin — 20 skills shipped together

Good fit Use it to generate a README, API documentation, architecture or onboarding guides, changelogs, or a full documentation set.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/irfad7/claude-power-skills/magic-docs
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.

Any agent
npx skills add irfad7/claude-power-skills --skill magic-docs
Clone the repo
git clone --depth 1 https://github.com/irfad7/claude-power-skills

Made for: Claude Code.

Or install claude-power-skills, the plugin that ships this one along with the rest of its 20 skills.

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 magic-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/irfad7/claude-power-skills/magic-docs/github.svg)](https://agentmods.dev/skills/irfad7/claude-power-skills/magic-docs)
Your own site
<a href="https://agentmods.dev/skills/irfad7/claude-power-skills/magic-docs"><img src="https://agentmods.dev/badge/skills/irfad7/claude-power-skills/magic-docs/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 magic-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/irfad7/claude-power-skills/magic-docs"><img src="https://agentmods.dev/badge/skills/irfad7/claude-power-skills/magic-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,472 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00079 $0.01472
Opus 5 $0.00039 $0.00736
Sonnet 5 $0.00016 $0.00294
Haiku 4.5 $0.00008 $0.00147

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

Security

Grade A, and why

magic-docs scanned grade A with 1 finding 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.

Makes network callslowCapability

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

[realistic curl command]
skills/magic-docs/SKILL.md · 191 lines

How it starts

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

MagicDocs — Codebase-Driven Documentation Generator

You are an automatic documentation generator. You read the actual codebase and produce accurate, useful documentation — not generic templates filled with guesses.

Activation

When invoked, ask the user what type of documentation they need:

  1. README — Project overview, setup, usage
  2. API Reference — Endpoint documentation from actual route files
  3. Architecture Guide — System design, data flow, component relationships
  4. Onboarding Guide — "New developer joins the team" walkthrough
  5. Changelog — Generate from git history
  6. All of the above — Full documentation suite

Or let them describe what they need.

Monorepo & Multi-Project Scoping

If the project contains multiple sub-projects (e.g., apps/, packages/, nested directories with their own package.json):

  1. Detect scope first: Check if the root has a workspace config (workspaces in package.json, pnpm-workspace.yaml, lerna.json, turbo.json)
  2. Ask the user: "This looks like a monorepo with [N] sub-projects. Do you want docs for the whole repo, or a specific sub-project?"
  3. If whole repo: Generate a root README with a project map, then offer to generate individual READMEs for each sub-project
  4. If specific sub-project: Scope the scan to that directory only, but note cross-project dependencies in the architecture section

The MagicDocs Process

Step 1: Deep Codebase Scan

Before writing a single word, read the codebase systematically:

1. Package manifest (package.json, pyproject.toml, Cargo.toml, go.mod)
   → Name, version, dependencies, scripts

2. Entry points (main.*, index.*, app.*, src/*)
   → What starts the application, how it bootstraps

3. Configuration (*.config.*, .env.example, docker-compose.yml)
   → Environment requirements, deployment targets

4. Directory structure (full tree, 3 levels deep)
   → Architecture pattern (MVC, feature-based, layered)

5. Route/API files (routes/*, api/*, controllers/*)
   → Endpoints, methods, request/response shapes

6. Database (migrations/*, schema/*, models/*)
   → Tables, relationships, ORM choice

7. Tests (test/*, __tests__/*, *.test.*, *.spec.*)
   → Test framework, coverage patterns

8. CI/CD (.github/workflows/*, Dockerfile, railway.*, vercel.json)
   → Deployment pipeline, environments

9. Git history (last 20 commits)
   → Recent activity, active areas, commit conventions

Read the full file on GitHub · 191 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 · 191 lines · 79 tokens per session scan A ed92380893cd

Subscribe to this mod's changes

magic-docs is a skill published in the GitHub repository irfad7/claude-power-skills (4 stars, last pushed 1mo ago), licensed MIT. It adds 79 tokens to every session and 1,472 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

import

Import a tasks.md into the coco tracker as an epic with dependencies, and create matching issues in the configured issue tracker.

skullninja/coco-workflow · 26 tokens

hotfix

Single-issue workflow for quick fixes and small changes that don't need full epic tracking. Creates a branch, implements the fix, commits with issue tracking, and closes.

skullninja/coco-workflow · 36 tokens

execute

Execute the next available tracked task with TDD, pre-commit validation, PR workflow, AI code review, and issue tracker bridge sync. Primary execution interface for multi-session feature work.

skullninja/coco-workflow · 39 tokens

council-review

Perform a rigorous Carmack Council code review. Use when explicitly asked to review code, do a "council review", "carmack review", or invoke /council-review. Carmack's philosophy chairs a council of domain experts — Troy Hunt (security), Martin Fowler (refactoring), Kent C. Dodds (frontend), Matteo Collina (Node.js)…

SamJHudson01/Carmack-Council · 166 tokens

council-plan

Architect a feature with the Carmack Council before writing code. Use when explicitly asked to plan a feature, do a "council plan", "carmack plan", or invoke /council-plan. Carmack's philosophy chairs a council of domain experts — Troy Hunt (security), Martin Fowler (refactoring), Kent C. Dodds (frontend), Matteo…

SamJHudson01/Carmack-Council · 165 tokens

test-architect

Map testable surfaces, audit existing tests for quality, and write test specifications that prevent AI shortcuts. Use when asked to "audit tests", "specify tests", "test architect", "map test coverage", or invoke /test-architect. Two modes — audit (evaluate existing tests against Beck's principles) and specify (write…

SamJHudson01/Carmack-Council · 110 tokens