code-sample-documentation

Design, write, review, and test code samples in developer documentation, including executable examples, explanatory snippets, request and response pairs, placeholders, outputs, language choice, sandboxing, and autogenerated samples. Use when docs include API examples, SDK snippets, CLI commands, config examples, tutorials, or code blocks readers may copy.

lvtd-llc/skills33 installsMITSynced Aug 26

Works with

Claude CodeCursorCodex CLIGitHub CopilotGemini CLI
---
name: code-sample-documentation
description: Design, write, review, and test code samples in developer documentation, including executable examples, explanatory snippets, request and response pairs, placeholders, outputs, language choice, sandboxing, and autogenerated samples. Use when docs include API examples, SDK snippets, CLI commands, config examples, tutorials, or code blocks readers may copy.
license: MIT
---

# Code 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

1. Load `guidelines.md` to choose the smallest useful reference set.
2. Classify the sample as executable, explanatory, or paired request/response.
3. Check whether the sample is explained, concise, clear, usable, and trustworthy.
4. Use `workflows/review-code-sample.md` for a full sample review.
5. Prefer running or testing samples when feasible; otherwise mark what remains unverified.

## Default Output

When reviewing or designing code samples, return:

1. **Sample purpose** - what the reader should learn or accomplish.
2. **Sample type** - executable, explanatory, request/response, CLI, config, or generated.
3. **Issues or design notes** - ordered by reader risk.
4. **Revised sample** - concise and copyable when requested.
5. **Testing plan** - how to verify runtime behavior, outputs, and version assumptions.
6. **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.

More Writing & Documentation skills

paper-context-resolver

lllllllama/rigorpilot-skills

Rigor Paper Context helper for README-first deep learning repo reproduction. Use only when the README and repository files leave a narrow reproduction-critical gap and the task is to resolve a specific paper detail such as dataset split, preprocessing, evaluation protocol, checkpoint mapping, or runtime assumption from primary paper sources while recording conflicts. Do not use for general paper summary, repo scanning, environment setup, command execution, title-only paper lookup, or replacing README guidance by default.

450.8k

repo-intake-and-plan

lllllllama/rigorpilot-skills

Rigor Intake helper for README-first deep learning repo reproduction. Use when the task is specifically to scan a repository, read the README and common project files, extract documented commands, classify inference, evaluation, and training candidates, and return the smallest trustworthy reproduction plan to the main orchestrator. Do not use for environment setup, asset download, command execution, final reporting, paper lookup, or end-to-end orchestration.

450.0k

minimal-run-and-audit

lllllllama/rigorpilot-skills

Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized `repro_outputs/` files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.

449.9k

← All Writing & Documentation skills

Check your AI visibility

One URL in, a 0–100 score and the exact fixes out.

RUN THE CHECK

Browse all the tools

15 tools across six categories
13 of them never send your data anywhere

Free · No signup · No trial clock

SEE THE DIRECTORY