docs-writing
Standardizes documentation workflows and ensures synchronization between README and MkDocs sites.
Install
mkdir -p .claude/skills/docs-writing-devsecninja && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15056" && unzip -o skill.zip -d .claude/skills/docs-writing-devsecninja && rm skill.zipInstalls to .claude/skills/docs-writing-devsecninja
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.
Guide for writing and maintaining documentation in this repository. Use when asked to write, update, or review docs, guides, or the README.Key capabilities
- →Maintain consistency between README.md and docs/index.md
- →Use GitHub-flavoured Markdown in README.md
- →Use plain Markdown in docs/index.md
- →Add new docs/*.md files to mkdocs.yml nav
- →Format Markdown files with 4 spaces indentation
- →Use MkDocs Material admonition syntax for callouts
How it works
The skill provides guidelines for structuring and formatting documentation, ensuring consistency between GitHub-flavoured Markdown and plain Markdown for MkDocs.
Inputs & outputs
When to use docs-writing
- →Updating repository README
- →Adding new technical documentation
- →Syncing docs after code changes
About this skill
Documentation structure
| File / Path | Rendered where | Audience | Notes |
|---|---|---|---|
README.md | GitHub repo | GitHub visitors, developers | |
docs/index.md | MkDocs site | MkDocs site visitors | |
docs/*.md | MkDocs site | MkDocs site visitors | |
CHANGELOG.md | GitHub repo | Developers, release readers | Auto-generated — do not edit manually. Updated by cog bump. |
README.md and docs/index.md must be kept in sync
Both files describe the same project. When you update one, always update the other:
README.mdmay use GitHub-flavoured Markdown:<div align="center">,<img>tags, emoji, and HTML attributes likealign="center".docs/index.mdmust use plain Markdown only — no HTML tags, no inline<img>(useinstead). Raw HTML is stripped by Python-Markdown unlessmd_in_htmlis enabled, and image paths relative to the repo root will 404 in MkDocs.- Keep the content (overview, benefits, app list, dataset list) in sync. The style (emojis, HTML layout) may differ between the two.
MkDocs nav
All new docs/*.md files must be added to the nav: block in mkdocs.yml. Without this, MkDocs will warn and the page will not appear in the sidebar. New guides go under Guides: in alphabetical order by display name.
Markdown conventions
-
Indent: 4 spaces for Markdown files (enforced by
.editorconfiganddprint). -
Line endings: LF, trailing newline required.
-
Table alignment:
dprintauto-formats tables — runmise exec -- dprint fmt FILEafter editing tables rather than aligning by hand. -
Admonitions: Use MkDocs Material admonition syntax for callouts — they render as styled boxes on the site and are readable as plain text in editors.
<!-- dprint-ignore --> !!! warning "Title" Body text indented 4 spaces under the !!! line. This is required — unindented text renders outside the block. <!-- dprint-ignore --> !!! note Note without a custom title. <!-- dprint-ignore --> !!! tip Tip callout. <!-- dprint-ignore --> !!! info "Credit" Info / attribution callout.Critical: every line of the admonition body must be indented exactly 4 spaces. Text at column 0 renders as normal paragraph text outside the box.
Always prefix admonitions with
<!-- dprint-ignore -->— dprint's Markdown plugin interprets 4-space-indented text as a code block and strips the indentation, which breaks the rendering. The ignore comment tells dprint to leave the block untouched. Supported types:note,tip,warning,danger,info,success,question,failure,bug,example,quote. -
Code blocks: Always specify a language for syntax highlighting (
```sh,```yaml,```text, etc.). -
Links to other docs: Use relative paths (
[Architecture](ARCHITECTURE.md)), not absolute URLs, so they work both on GitHub and on the MkDocs site.
docs.yml workflow
The docs CI workflow (.github/workflows/docs.yml) runs mkdocs build --strict on pull requests and deploys to GitHub Pages on push to main.
--strict mode means any warning (missing nav entry, broken link, etc.) is treated as an error. Always run mkdocs build --strict locally before pushing doc changes if MkDocs is installed.
Formatting and linting
After editing any Markdown file, run:
mise exec -- dprint fmt docs/FILE.md # auto-format
mise exec -- dprint check docs/FILE.md # verify
Or format all docs at once:
mise exec -- dprint fmt
Writing pasteable shell code blocks
Shell code blocks in guides are often copy-pasted directly into a terminal. Write them defensively:
- No inline
#comments — zsh disablesinteractivecommentsby default, so# commenton its own line or after a command causeszsh: command not found: #. Move explanations into prose or a table above the block. - Explain variables in a table, not in comments. Use a Markdown table with
Variable / Example / What to setcolumns above the code block, then keep the block itself comment-free and pasteable. - Prefer variables over hardcoded values. Define all configurable values as shell variables at the top of a section (a single "set variables" block). All subsequent commands reference
${VAR}. This makes guides reusable without editing individual commands. - Use heredocs for generated config files —
cat > filename << EOF … EOFlets variable substitution happen automatically when the reader runs the block, rather than requiring manual find-and-replace in the file afterward. - Split local and remote steps clearly. If a guide switches between local machine and SSH session, make the boundary explicit in prose and re-declare required variables at the start of each remote block (don't assume the reader's shell state carries over).
When not to use it
- →When editing auto-generated files like CHANGELOG.md
- →When the documentation is not for a GitHub repository or MkDocs site
Limitations
- →CHANGELOG.md is auto-generated and should not be edited manually.
- →Raw HTML is stripped by Python-Markdown unless md_in_html is enabled.
- →New docs/*.md files must be added to the nav: block in mkdocs.yml.
How it compares
This skill provides specific conventions for Markdown syntax, file synchronization, and MkDocs configuration, which differs from generic Markdown writing by addressing platform-specific rendering and build requirements.
Compared to similar skills
docs-writing side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| docs-writing (this skill) | 0 | 4mo | Review | Beginner |
| docs-write | 22 | 6mo | No flags | Beginner |
| content-research-writer | 15 | 10mo | No flags | Beginner |
| doc-coauthoring | 16 | 8mo | No flags | Beginner |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DevSecNinja
View all by DevSecNinja →You might also like
docs-write
metabase
Write documentation following Metabase's conversational, clear, and user-focused style. Use when creating or editing documentation files (markdown, MDX, etc.).
content-research-writer
ComposioHQ
Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.
doc-coauthoring
anthropics
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
research-grants
davila7
Write competitive research proposals for NSF, NIH, DOE, and DARPA. Agency-specific formatting, review criteria, budget preparation, broader impacts, significance statements, innovation narratives, and compliance with submission requirements.
teams-channel-post-writer
daymade
Creates educational Teams channel posts for internal knowledge sharing about Claude Code features, tools, and best practices. Applies when writing posts, announcements, or documentation to teach colleagues effective Claude Code usage, announce new features, share productivity tips, or document lessons learned. Provides templates, writing guidelines, and structured approaches emphasizing concrete examples, underlying principles, and connections to best practices like context engineering. Activates for content involving Teams posts, channel announcements, feature documentation, or tip sharing.
write-docs
tldraw
Writing SDK documentation for tldraw. Use when creating new documentation articles, updating existing docs, or when documentation writing guidance is needed. Applies to docs in apps/docs/content/.