doc-generation

doc-generation is a skill for Claude Code, Codex from medy-gribkov/arcana. It costs 35 tokens per session (1,646 once invoked), scanned A, original, Apache-2.0.

A documentation workflow for turning code and project history into API descriptions, diagrams, README files, and changelogs. OpenAPI describes how a web API works so people and tools can use it; GraphQL is another way to request data from an API.

In plain words
What is it for?
Use it to document API endpoints, create GraphQL documentation, draw Mermaid or C4 architecture diagrams, start READMEs from a project structure, and summarize changes from commits.
Why use it?
It reduces the manual work of keeping technical documentation complete and aligned with the code. It also helps catch API entries that lack useful explanations or examples.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to document API endpoints, create GraphQL documentation, draw Mermaid or C4 architecture diagrams, start READMEs from a project structure, and summarize changes from commits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/medy-gribkov/arcana/doc-generation
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 medy-gribkov/arcana --skill doc-generation
Clone the repo
git clone --depth 1 https://github.com/medy-gribkov/arcana

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin doc-generation/plugin install doc-generation after adding the marketplace above.

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 doc-generation

README.md
[![agentmods](https://agentmods.dev/badge/skills/medy-gribkov/arcana/doc-generation/github.svg)](https://agentmods.dev/skills/medy-gribkov/arcana/doc-generation)
Your own site
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/doc-generation"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/doc-generation/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 doc-generation

Your own site · 80×15
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/doc-generation"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/doc-generation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,646 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00035 $0.01646
Opus 5 $0.00017 $0.00823
Sonnet 5 $0.00007 $0.00329
Haiku 4.5 $0.00003 $0.00165

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

Security

Grade A, and why

doc-generation 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 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.

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.

skills/doc-generation/SKILL.md · 301 lines

How it starts

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

Act as a documentation engineer. Generate specs from annotated code, scaffold READMEs from project structure, automate changelogs from commits, and produce Mermaid diagrams that render natively on GitHub.

OpenAPI Spec Generation

Follow this workflow for every API documentation task.

  1. Identify the framework (tsoa, swaggo, FastAPI, NestJS)
  2. Add annotations to every endpoint with summary, description, tags, examples
  3. Generate the spec file
  4. Lint with Spectral
  5. Verify all endpoints have descriptions and response examples

BAD, missing descriptions and examples:

paths:
  /users/{id}:
    get:
      summary: Get user

GOOD, complete documentation:

paths:
  /users/{id}:
    get:
      summary: Get user by ID
      description: |
        Retrieves detailed user information including profile data,
        preferences, and account status.
      tags: [users]
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          example: 42
      responses:
        '200':
          description: User found
          content:
            application/json:
              example:
                id: 42
                name: "John Doe"
                email: "[email protected]"

TypeScript (tsoa)

@Route('users')
export class UserController extends Controller {
  /**
   * Retrieves a user by ID
   * @param userId The user's unique identifier
   */
  @Get('{userId}')
  public async getUser(@Path() userId: number): Promise<User> {
    return { id: userId, name: 'John', email: '[email protected]' };
  }
}
npx tsoa spec        # outputs swagger.json

Go (swaggo)

// @Summary Get user by ID
// @Description Retrieves user information
// @Tags users
// @Produce json
// @Param id path int true "User ID"
// @Success 200 {object} User
// @Router /users/{id} [get]
func getUser(c *gin.Context) {}
swag init             # outputs docs/swagger.json

Read the full file on GitHub · 301 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 301 lines · 35 tokens per session scan A 2f8f84a8c014

Subscribe to this mod's changes

doc-generation is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 1,646 once invoked, about $0.0002 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.