About code-sample-documentation
A skill for creating and reviewing useful, accurate, copyable, and maintainable code samples. It guides developers and technical writers through sample design, review, and verification.
Key features
- 01Classify code sample types
- 02Evaluate clarity and usability
- 03Route reviews to relevant guidance
- 04Recommend testing when feasible
- 05Document unverified assumptions
Use cases
- 01Reviewing API examples and CLI commands
- 02Preparing copyable configuration snippets
- 03Designing request and response examples
Install
Copy the command and run it in a terminal.
npx skills add https:/ / github.com/ lvtd-llc/ skills --skill code-sample-documentationAfter installing, type/code-sample-documentationin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
guidelines.mdreferences/core/knowledge.mdworkflows/review-code-sample.mdDetails
From the project READMECode Sample Documentation
Use this skill to create and review code samples that are useful, accurate, copyable, and maintainable. It applies to executable examples, explanatory snippets, API request/response pairs, CLI commands, config files, and generated references.
This skill is derived from Docs for Developers: An Engineer's Field Guide to Technical Writing, especially Chapter 5, "Integrating code samples." The guidance is transformed and paraphrased; do not copy book prose into user outputs. Source: https://link.springer.com/book/10.1007/978-1-4842-7217-6
Quick Start
- Load
guidelines.mdto choose the smallest useful reference set. - Classify the sample as executable, explanatory, or paired request/response.
- Check whether the sample is explained, concise, clear, usable, and trustworthy.
- Use
workflows/review-code-sample.mdfor a full sample review. - Prefer running or testing samples when feasible; otherwise mark what remains unverified.
Default Output
When reviewing or designing code samples, return:
- Sample purpose - what the reader should learn or accomplish.
- Sample type - executable, explanatory, request/response, CLI, config, or generated.
- Issues or design notes - ordered by reader risk.
- Revised sample - concise and copyable when requested.
- Testing plan - how to verify runtime behavior, outputs, and version assumptions.
- Maintenance notes - source of truth, owner, and generated/manual boundary.
Contents
| Need | Start Here |
|---|---|
| Understand sample types | references/core/knowledge.md |
| Apply sample rules | references/core/knowledge.md |
| See before/after examples | references/core/knowledge.md |
| Review or design a sample | workflows/review-code-sample.md |
| Route by task | guidelines.md |
Core Posture
- A sample is documentation and software; treat it as both.
- Match sample complexity to the reader's stage.
- Make placeholders, inputs, outputs, and limitations explicit.
- Do not imply a sample is production-ready unless it has been reviewed and tested for that use.