4.2 Writing Best Practices
Writing Best Practices
Patterns that make Skills reliable
Four Rules for Reliable Instructions
Use Numbered Steps
Break the task into a clear sequence. Claude follows numbered steps more reliably than prose paragraphs.
Give Concrete Examples
Show Claude what good output looks like. Include sample inputs and expected outputs.
Define Output Format Explicitly
Specify the exact structure, headings, length, and style.
Say What NOT to Do
Guardrails are as important as instructions. Tell Claude what to avoid.
Good vs. Bad Instructions
Good: Specific and Actionable
Run python scripts/validate.py --input {filename} to check data format. If validation fails, common issues include: missing required fields, invalid date formats (use YYYY-MM-DD).
Bad: Too Vague
Validate the data before proceeding.
The Guardrails Pattern
## Guardrails - Never skip the validation step - Always ask for time period if not specified - Limit each section to 3-5 bullet points - Do NOT include raw data in the final report - If API returns error, retry once then report to user
The Confusion Test
If a step confuses you when reading it, it will confuse Claude too. Write instructions that a smart human assistant could follow without asking questions.
Best Practice Summary
Numbered steps, concrete examples, explicit formats, and clear guardrails — these four patterns make the difference between a Skill that sometimes works and one that always works.
Čtyři ověřené vzory pro spolehlivé instrukce v SKILL.md.
There are no comments for now.