A unified pipeline for scaffolding, building, and deploying project documentation and user guides.

Install

mkdir -p .claude/skills/docs-matteocervelli && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/9520" && unzip -o skill.zip -d .claude/skills/docs-matteocervelli && rm skill.zip

Installs to .claude/skills/docs-matteocervelli

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Build and publish project documentation — Starlight (Astro) for apps, markdown for libraries/services, with IT+EN i18n and VPS deploy. Use when writing user guides, scaffolding a docs site, or publishing docs. Trigger on "write docs", "documentation site", "user guide", "publish docs".
286 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • Scaffold documentation sites
  • Create pages from templates
  • Audit documentation for stale content
  • Translate documentation between languages
  • Publish documentation to VPS

How it works

The tool detects the project structure to choose between Starlight for apps or markdown for libraries, then manages the documentation lifecycle through a registry.

Inputs & outputs

You give it
documentation command
You get back
documentation site or markdown files

When to use docs

  • Scaffolding a new documentation site for an application
  • Creating internal user guides for libraries
  • Publishing multi-language documentation with i18n
  • Setting up automated site deployment

About this skill

/docs — Documentation Pipeline

Unified pipeline for documentation across all project types. Dual mode:

  • App mode (app-ratio, app-himalaia, app-levero) → Starlight (Astro) in site/, deploy su VPS

Mode detection: automatic from repo name and structure:

  • app-* or site/ exists → app mode (Starlight)
  • private-lib-*internal mode (library markdown)
  • Override: /docs scaffold --mode app or /docs scaffold --mode internal

Future: Atrium gets a unified Starlight site aggregating all internal docs from libs/services.

Architecture — App Mode (locked)

  • SSG: Starlight (Astro) — MIT, i18n IT+EN native, Pagefind search built-in
  • Structure: site/ folder inside each app repo (marketing + docs unified Astro project)
  • URL: {app-domain}/docs (subfolder, not subdomain) — SEO unificato
  • Auth: nginx auth_request → FastAPI /auth/verify finché l'app non è pubblica
  • Deploy: make deploy-site oggi; Forgejo Actions staging/stable in futuro
  • Language: Italiano first, i18n EN configurato da day-0

Architecture — Internal Mode

  • Output: plain markdown in docs/user-guide/ (non deployato, letto da sviluppatori e integratori)
  • Stessi template concettuali di Starlight ma senza MDX/components
  • Registry: docs/docs-registry.yaml (stesso formato, stessa skill)
  • Nessun site/, nessun npm, nessun Astro

Quick Start

/docs                          # stato docs + mode auto-detect
/docs scaffold                 # app mode: site/ | internal mode: docs/user-guide/
/docs create getting-started   # crea pagina da template (adattato al mode)
/docs audit                    # trova stale, mancanti, link rotti
/docs update                   # aggiorna pagine stale da git diff + CHANGELOG
/docs translate it             # EN→IT (solo app mode)
/docs publish                  # deploy su VPS (solo app mode)
/docs publish staging          # deploy ambiente staging (solo app mode)
/docs review-drafts            # lancia N agent paralleli per completare e verificare le draft
/docs registry                 # mostra stato registry docs del progetto
/docs features                 # estrae feature list da CHANGELOG + routes/API
/docs migrate                  # audit strutturale repo + propone migrazione a convenzione
/docs full                     # scaffold → audit → create missing → review-drafts → (translate → publish se app mode)

Subcommand: /docs (summary)

Auto-detect progetto corrente e mostra stato docs.

Steps:

  1. Auto-detect mode (app vs internal)
  2. App mode: verifica site/ + site/docs-registry.yaml + staleness + language parity Internal mode: verifica docs/user-guide/ + docs/docs-registry.yaml + staleness
  3. Output report con status per dimensione
  4. Proponi il prossimo passo concreto e chiedi se eseguirlo

Step 4 — Next action routing (obbligatorio):

Dopo il report, identifica l'azione con priorità più alta e proponi di eseguirla:

Condizione (in ordine di priorità)Prossima azione
site/docs/user-guide/ esistono"Eseguo /docs scaffold?"
scaffold esiste ma 0 pagine"Eseguo /docs create getting-started?"
pagine in status draft (anche senza placeholder)"Eseguo /docs review-drafts?" (N agent paralleli VERIFICANO accuratezza vs codice)
draft completate, modifiche non committate"Eseguo /pre-commit/ship?" (valida + commit + push + PR)
pagine stale >30 giorni"Eseguo /docs update <file più stale>?"
pagine EN mancanti (solo app mode)"Eseguo /docs translate en?"
tutto OK ma non deployato (solo app mode)"Eseguo /docs publish?"
tutto published, non video (app mode)"Video guide da esplorare — /docs video (sessione dedicata)"
tutto published, tutto deployato"Docs in ordine. Nessuna azione necessaria."

Chiedi sempre conferma con AskUserQuestion prima di eseguire. Se l'utente dice sì, esegui l'azione e poi ricicla al punto 4 (proponi il passo successivo). Questo crea un loop guidato: report → proposta → esecuzione → report → proposta → ... fino a quando tutto è PASS o l'utente dice stop.

Step 4b — Parallel draft review (quando ci sono multiple draft):

Quando ci sono ≥2 pagine draft, proponi di lanciare agent paralleli:

"Hai N pagine draft. Lancio N agent Explore in parallelo per completarle?"

Se l'utente conferma:

  1. Per ogni pagina draft, lancia un Agent (subagent_type: general-purpose, model: sonnet):

    • Input: il file draft + CHANGELOG.md + codice sorgente rilevante (backend/, app/, src/)
    • Istruzioni: "Leggi il template, sostituisci tutti i placeholder con contenuto reale basato sul codice e CHANGELOG. Mantieni la struttura del template. Non inventare funzionalità — documenta solo ciò che esiste."
    • Output: il file completato
  2. Dopo che tutti gli agent finiscono:

    • Mostra diff per ogni file modificato
    • Chiedi conferma: "Marco tutte come published?"
    • Se sì: /docs registry update <page> status=published per ognuna

Questo parallelizza il lavoro più pesante (compilare N draft) senza richiedere intervento umano per ogni singola pagina.

Output example:


Mode         internal   private-lib-* library → markdown
user-guide/  [MISS]     docs/user-guide/ assente
Registry     [MISS]     docs/docs-registry.yaml assente
Staleness    [WARN]     code 19 giorni più recente dei docs

───────────────────────────────────
Prossimo passo: /docs scaffold (crea docs/user-guide/ + registry)
Eseguo?

Subcommand: /docs scaffold

Inizializza la struttura docs nel repo corrente. Dual mode.

Pre-condizioni:

  • Siamo nella root del repo (pyproject.toml o package.json presente)
  • Mode auto-detect: app-* → app mode, private-lib-* o services → internal mode
  • Override: --mode app o --mode internal

App Mode (Starlight)

Condizione: repo name app-* oppure --mode app

Stack locked (2026-03-17): Starlight 0.32 + Astro 5 + pnpm workspace. Il locale default IT va alla root di docs/ (NON in it/ subdir) — vedi sotto.

Steps:

  1. Crea struttura directory:
site/
├── src/
│   ├── content/
│   │   └── docs/
│   │       ├── index.md         ← homepage IT (root locale = IT)
│   │       ├── getting-started.md
│   │       ├── features/        ← feature guides IT
│   │       └── en/              ← SOLO EN in subdir
│   │           ├── getting-started.md
│   │           └── features/
│   └── content.config.ts        ← OBBLIGATORIO in Astro 5
├── public/
└── docs-registry.yaml

CRITICO — Struttura i18n corretta per Starlight 0.32 + Astro 5:

  • Locale default (IT) = root: i file IT vivono direttamente in docs/ (NO it/ subdirectory)
  • Locale EN = en/: i file EN vivono in docs/en/
  • Se metti IT in docs/it/ il build genera solo 1 pagina — il sito non funziona
  1. Genera site/package.json:
{
  "name": "app-{name}-site",
  "type": "module",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "dev": "astro dev --port 4321",
    "build": "astro build",
    "preview": "astro preview",
    "astro": "astro"
  },
  "dependencies": {
    "@astrojs/starlight": "^0.32.0",
    "astro": "^5.4.0"
  },
  "devDependencies": {
    "sharp": "^0.33.0"
  }
}
  1. Genera site/src/content.config.tsOBBLIGATORIO in Astro 5, senza questo le pagine non vengono trovate:
import { defineCollection } from "astro:content";
import { docsLoader } from "@astrojs/starlight/loaders";
import { docsSchema } from "@astrojs/starlight/schema";

export const collections = {
  docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
  1. Genera site/astro.config.mjs:
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";

export default defineConfig({
  base: "/docs",
  integrations: [
    starlight({
      title: "{APP_NAME} — Guida Utente",
      description: "Documentazione ufficiale di {APP_NAME}",
      defaultLocale: "root", // 'root' = IT a root level, NON 'it'
      locales: {
        root: { label: "Italiano", lang: "it" },
        en: { label: "English", lang: "en" },
      },
      sidebar: [
        {
          label: "Inizia qui",
          translations: { en: "Start here" },
          items: [{ slug: "getting-started" }],
        },
        {
          label: "Funzionalità",
          translations: { en: "Features" },
          autogenerate: { directory: "features" },
        },
      ],
    }),
  ],
});

Nota sidebar slugs: con docsLoader() i slug NON hanno prefisso locale. { slug: 'getting-started' } punta a docs/getting-started.md (IT root) E a docs/en/getting-started.md (EN) — Starlight gestisce l'i18n internamente.

  1. Genera site/src/content/docs/index.md — homepage IT (template splash)

  2. Genera site/docs-registry.yaml vuoto

  3. Aggiorna pnpm-workspace.yaml nella root (se il progetto usa pnpm):

packages:
  - "frontend"
  - "site" # ← aggiungere
  1. Aggiorna package.json root per permettere build scripts di esbuild/sharp (richiesti da Astro):
{
  "pnpm": {
    "onlyBuiltDependencies": ["esbuild", "sharp"]
  }
}

Poi esegui pnpm install per aggiornare il lockfile.

  1. Aggiungi a .gitignore root:
site/dist/
site/.astro/
  1. Aggiungi target Makefile

Content truncated.

When not to use it

  • When the project does not require documentation
  • When the documentation mode cannot be auto-detected

Limitations

  • App mode requires specific repository naming conventions
  • Internal mode does not support deployment

How it compares

It provides a unified, automated pipeline for documentation that handles i18n, deployment, and staleness checks instead of manual documentation maintenance.

Compared to similar skills

docs side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
docs (this skill)02moReviewIntermediate
site-contentlayer-authoring05moNo flagsIntermediate
fumadocs-mdx-structure27moNo flagsBeginner
update-release-notes129dReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry