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.
SkillScore86Maintained
Automatic
◆Doc Ops pack
Last verified 8/15/2026
What it changes
Passed 19 of 22 test cases with the skill, and 13 of 22 without it.
Without skill59%
With skill86%
Checks it passed that the model alone missed
Classifies the snippet as an explanatory sample.
Classifies the code sample as a configuration file.
Flags the obsolete function signature as a trustworthiness defect.
and 4 more in the full report
7 fixed12 passed either way2 still failing1 broke
Pass-rate lift
+27 pp
Tokens
+12%
Agent turns
0%
Response time
-11%
Model gemini-3.6-flashMeasured 8/15/2026v119 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 7 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 7
Prompt
Evaluate a 3-line pseudocode block illustrating the core logic of a consensus algorithm meant purely for conceptual understanding in technical docs.
What was checked, without and with the skill
Checked
Without skill
With skill
Classifies the snippet as an explanatory sample.
Missed
Passed
case-11 · gemini-3.6-flash · 8/15/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md41 linessingle file
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
Load guidelines.md to 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.md for 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.