writing-instructions
Write effective instructions for Claude: project instructions, standalone prompts, and skill content. Use when users need help writing prompts, setting up project instructions, choosing between instruction formats, or improving how they communicate with Claude. Covers writing principles, model-aware calibration, and format selection. For building and testing complete skills, use skill-creator instead.
What this skill does
# Writing Instructions for Claude Principles and patterns for writing instructions that Claude follows reliably — whether as project instructions, standalone prompts, or skill content. ## Choosing the Right Format Determine format before writing. The wrong container undermines good instructions. **Project instructions** — persistent context for a workspace. Use when all conversations in a project need shared knowledge, team collaboration context, or initiative-specific behavior. Signals: "for this project," "all conversations about X," "team workspace." Read [references/project-instructions.md](references/project-instructions.md) for detailed guidance. **Standalone prompts** — ephemeral, conversational, immediate. Use for one-off requests, ad-hoc direction, or conversational refinement. Signals: "for this task," "right now," "just this once." Read [references/standalone-prompts.md](references/standalone-prompts.md) for techniques. **Skill content** — portable expertise that loads on-demand across contexts. Use when capability is needed across multiple projects, procedural knowledge applies broadly, and instructions should activate automatically on relevant triggers. Signals: "every time I," "whenever," "reusable," "teach Claude how to." For building full skills (structure, testing, iteration, packaging), use the **skill-creator** skill. **Combined approaches** work well: project instructions provide "what you need to know" (reference material, context) while skills provide "how to do things" (methods, procedures). Read [references/choosing-formats.md](references/choosing-formats.md) for detailed comparison and migration patterns. ## Core Writing Principles These apply to ALL instruction formats. They are ordered by impact. ### 1. Imperative Construction Frame as direct commands. Imperative language reduces ambiguity and signals that the instruction is not optional. - ❌ "Consider creating X" → ✅ "Create X when conditions Y" - ❌ "You might want to search" → ✅ "Search for" - ❌ "Try to optimize" → ✅ "Optimize by" ### 2. Context and Motivation Explain WHY requirements exist. Claude uses reasoning about purpose to make better decisions in unstated edge cases, and WHY context is particularly valuable for Opus's autonomous judgment. - ❌ "Use formal tone" - ✅ "Use formal tone because documentation targets enterprise clients expecting authoritative voice" A requirement without context is a rule Claude follows mechanically. A requirement with context is a principle Claude can extend intelligently. ### 3. Positive Directive Framing State WHAT to do, not what NOT to do. Negative instructions force Claude to infer the desired alternative — positive instructions state it directly. - ❌ "Don't use bullet points" → ✅ "Write in flowing paragraph form" - ❌ "Avoid technical jargon" → ✅ "Use accessible language for beginners" - ❌ "Never output raw data" → ✅ "Present data with interpretation and context" When a negative constraint is truly necessary, pair it with the positive alternative: "Present in prose paragraphs, not bullet lists, because flowing text is more conversational for learning contexts." ### 4. Strategic Over Procedural Provide goals and decision frameworks rather than step-by-step procedures. If Claude can infer the procedure from the goal, specify only the goal. - Specify: success criteria, boundaries, decision frameworks, quality standards - Minimize: sequential steps, detailed execution, operations Claude can determine from goals This principle scales with model capability — Opus needs less procedural detail than Haiku (see Model-Aware Calibration below). ### 5. Trust Base Behavior Claude's system prompt already handles citation protocols, copyright, safety, general tool usage, artifact creation, conversational tone, and accuracy standards. Only specify project- or domain-specific deviations from these defaults. Duplicating system prompt behavior wastes tokens and can create conflicting signals. Test whether Claude already does what you want before adding instructions for it. ## Model-Aware Calibration Instructions may execute across Haiku, Sonnet, and Opus. Each model responds differently to instruction density and abstraction level. **Haiku (1.3–1.5× detail):** Lead with explicit imperative commands and concrete decision trees. Haiku follows direct procedures reliably but struggles with abstract principles. Provide exact conditions, specific fallbacks, and complete examples for every expected scenario. Structure as: "When X, do Y. When Z, do W." **Sonnet (1.0–1.2× detail):** Provide decision frameworks with explicit conditions alongside 2–3 concrete examples demonstrating desired patterns. Sonnet learns strongly from examples and handles moderate abstraction when anchored by demonstrations. Balance procedural clarity with strategic context. **Opus (0.6–0.8× detail):** Emphasize strategic goals, reasoning context, and principles over procedures. Opus uses rich WHY context for autonomous judgment in edge cases. One clear example often suffices. Overly procedural instructions constrain Opus unnecessarily. Frame as: "Goal is X because Y. Apply judgment for unstated cases." **The density multiplier** is relative to what you'd tell a competent colleague for the same task. **Practical layering pattern:** Structure instructions so imperative commands come first (Haiku gets what it needs immediately), followed by decision frameworks and examples (Sonnet's sweet spot), with strategic reasoning and WHY context woven throughout (Opus leverages this for edge cases). A single instruction set serves all three models when layered well. **When uncertain about target model:** Optimize for Sonnet. Sonnet-optimized instructions work adequately on both Haiku (slightly verbose but functional) and Opus (slightly over-specified but not harmful). ## Example Quality Awareness Examples are the most powerful and most dangerous instruction tool. Claude 4.x learns ALL patterns from examples — format, verbosity, structure, tone, terminology — including patterns you didn't intend to teach. **Rules for examples:** - Audit every detail: if the example uses bullets but you want prose, Claude defaults to bullets - Ensure ALL aspects of every example demonstrate desired behavior - Better to omit examples entirely than include ones with mixed signals - One well-crafted example outperforms three sloppy ones **Model-specific impact:** - Sonnet: Examples are highly influential — include 2–3 that perfectly demonstrate desired patterns - Opus: Examples help but Opus weights explicit principles more heavily — one clear example suffices, omit entirely if examples can't perfectly align with all requirements - Haiku: Examples are critical — provide complete input/output pairs covering each expected scenario ## Structural Simplicity Default to clear organization using headings, whitespace, and natural paragraph flow. Explicit language stating relationships is usually sufficient. Use structured markup (XML tags, JSON schemas) only when separating distinct content types in complex scenarios, when absolute certainty about content boundaries is required, or for API-driven workflows needing structured parsing. **Decision rule:** Can this be organized with headings? → Do that first. Only reach for XML/JSON when headings genuinely fail to create clarity. ## Extended Thinking Guidance Extended thinking is a UI toggle, not controllable via prompt phrasing. In instructions: - Make the assistant aware it exists as a feature - Provide domain-specific indicators for when to suggest it - ❌ Do NOT include "trigger phrases" like "think carefully" — they don't activate extended thinking Pattern: "For tasks involving [specific complexity], suggest enabling Extended thinking, briefly explaining why it would help for THIS task." ## Complexity Scaling Match instruction complexity to task needs. Before adding complexity, ask: could a simpler formulation work equally wel
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.