Karvey docs
Skill MauricioQuezadaHaintech/karvey/plugins/karvey/skills/karvey-docs
Documentation engineer for the Karvey method. Generates Diataxis docs (tutorial/how-to/reference/explanation) from code, updates stale project docs to match what shipped, and exports markdown to publication-quality PDF. Triggers include "karvey docs", "documentación", "documentation", "diataxis", "actualizar docs", "update docs", "generar documentación", "generate documentation", "exportar PDF", "export PDF", "README".From its SKILL.md
npx -y skills add MauricioQuezadaHaintech/karvey --skill karvey-docsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
6.6 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it
karvey-docs — Doc Engineer (Karvey™ Method)
Purpose
A cross-cutting skill of the Karvey Method: a support layer, NOT a phase. It does NOT modify spec.json:phase and does not advance the flow. It can be invoked at any point in the cycle, as many times as needed.
Role: Doc Engineer. Inspired by gstack /document-generate, /document-release, and /make-pdf. Its job is to produce and maintain project / user documentation at publication quality.
Critical distinction — two universes of documentation:
| Type | What it is | Where it lives | Owned by |
|---|---|---|---|
| PROJECT / USER docs | Tutorials, guides, references, and explanations for whoever uses/maintains the product | Wherever the project keeps them (typically the repo's docs/) | This skill |
| Internal method specs | Karvey cycle artifacts (requirements, architecture, tasks, etc.) | docs/spec/ | The rest of the Karvey skills (phases) — NOT this one |
This skill never touches docs/spec/. If it detects that the user wants to edit internal specs, it redirects to the corresponding phase.
Available modes (based on the first argument): generate, release, pdf.
generate mode — Diataxis documentation from code
Generates (or completes) the documentation of a feature following the Diataxis framework, based on the code that exists in the repo. Four quadrants, distinct purposes, never mixed:
| Quadrant | Oriented to | Answers | Tone |
|---|---|---|---|
| Tutorial | Learning | "Walk me through it the first time" | Step by step, guaranteed result |
| How-to (guide) | A concrete task | "How do I achieve X?" | Recipe, assumes context |
| Reference | Information | "What parameters/contracts/errors does it have?" | Exhaustive, dry, exact |
| Explanation | Understanding | "Why does it work this way?" | Context, decisions, trade-offs |
Steps
- Resolve the target. Take the second argument (
<feature or file>). If not provided, ask which feature to document or infer it from the latest relevant change (git log,git diff). - Read the actual source code. Use Glob/Grep/Read over the feature's files: functions, signatures, endpoints, parameters, types, errors, side effects. The documentation describes what the code does, not what was intended. Zero invention.
- Locate the destination. Detect the project's docs folder (
docs/,documentation/, etc.). If there's no convention, proposedocs/and respect the structure already in place. Never write todocs/spec/. - Decide which quadrants apply. Not every feature needs all four. An internal utility may only need reference + explanation; a user-facing feature usually needs tutorial + how-to.
- Write each quadrant respecting its tone and purpose. Real, verifiable code snippets; copy-paste commands; tables for parameters and errors.
- Link. Index/README for the section with links to the generated quadrants. Maintain coherent navigation.
- Report the absolute paths of each file created or modified.
release mode — Update stale docs after the deploy
Detects and fixes stale documentation so it reflects what was just deployed. It's the post-release cleanup pass.
Steps
- Determine the delta of what was deployed. Review what changed:
git log/git diffsince the last release or tag, CHANGELOG, new/moved/deleted files. - Inventory candidate docs. Look for READMEs and project docs that likely went stale (Glob of
**/README.md,docs/**/*.md). Excludedocs/spec/. - Detect concrete staleness. Search and cross-check against the repo's reality:
- File paths mentioned that no longer exist or were moved.
- Command / script lists (npm scripts, CLI, Makefile) that changed.
- Structure tree of the project (
treeblocks / folder listings) that no longer matches. - Snippets and examples that reference modified APIs/signatures.
- Versions, badges, links that are broken or outdated.
- Update with Edit each doc so it matches the real state. Only changes backed by the current code/structure; do not rewrite sections that are still correct.
- Report a summary of which docs were updated and what staleness was fixed, with absolute paths.
pdf mode — Export markdown to publication-quality PDF
Converts a markdown file into a PDF with professional presentation.
Steps
- Resolve the input markdown (second argument or the doc just generated).
- Detect available tooling (in this order of preference):
pandoc(with a LaTeX engine such asxelatex/tectonic), or alternatives likemd-to-pdf/weasyprint/prince. Verify withcommand -vbefore using. - Configure output quality:
- Reasonable margins and legible typography.
- Page numbers.
- Clickable table of contents (TOC) with internal links.
- Mermaid / Excalidraw diagrams rendered as vectors (not blurry bitmaps) when the toolchain allows it.
- Generate the PDF next to the markdown (or wherever the user indicates).
- Degrade with a warning. If no PDF tool is available, do not fail silently: explicitly warn the user what's missing (e.g., "
pandocnot found; install withbrew install pandoc") and offer the best possible alternative (e.g., self-contained HTML). Never produce a degraded PDF without warning. - Report the absolute path of the PDF (or the fallback) and the tool used.
Hook into the Karvey cycle
- Does not advance the phase. Invocable at any time without altering
spec.json:phase. - Hooks into
karvey-archive(PHASE 12): post-release documentation is part of the closeout. After archiving, usekarvey-docs releaseto bring the user docs in line with what shipped, and optionallykarvey-docs pdffor deliverables. - The internal specs (
docs/spec/) are the responsibility of the phase skills, not this one.
Part of the Karvey™ Method — © HainTech, by Mauricio Quezada Ibáñez · Apache 2.0 · see karvey/LICENSE and karvey/TRADEMARK.md.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.