1---2name: ai-instruction-writing3description: Write AI-consumed content using positive, action-oriented language as the primary carrier of every instruction. Use when creating or editing any artifact an AI reads at inference time — SKILL.md files, .mdc rule files, CLAUDE.md/AGENTS.md/GEMINI.md configuration, prompt templates, system prompts, commands, agent and sub-agent definitions, instruction sets, and persona definitions. Use when this capability is needed.4---56# ai_instruction_writing78<ai_instruction_writing>9 <objective>10 Write AI-consumed content so every instruction's primary carrier is a positive, action-oriented statement that tells the LLM what to do, what something is, or how it should be. Allow negative or contrastive supplements only as a catch-all for what positive guidance cannot enumerate.11 </objective>1213 <core_rule>14 Every instruction's primary carrier is a positive statement that tells the LLM what to do, what something is, or how it should be. A negative or contrastive supplement ("don't X", "avoid Y", "X instead of Y", double negatives, implicit negation by comparison) earns its place only when listing every positive case is infeasible — the negative then names a broader class as a catch-all for what falls outside the positive guidance. When the positive set is fully enumerable, the negative restates the inverse and adds nothing; cut it.15 </core_rule>1617 <self_check>18 <procedure>Delete the negative or contrastive portion of a rule, then apply the matching outcome below.</procedure>19 <when_positive_is_empty_or_vague>The rule is inverted. Rewrite the positive carrier first.</when_positive_is_empty_or_vague>20 <when_positive_is_complete>The negative just restates the inverse. Drop the negative — it is redundant.</when_positive_is_complete>21 <when_negative_names_a_broader_class>Keep the negative. It covers a long tail that no single positive could enumerate.</when_negative_names_a_broader_class>22 </self_check>2324 <applicability>25 This rule governs the model's *output*. In meta or teaching context — including this skill — contrastive pairs, ❌/✅ examples, and "X replaces Y" patterns are legitimate when they illustrate how to transform inputs.26 </applicability>2728 <authoring_guidelines>29 <start_with_action_verbs>Use, Write, Create, Define, Implement, Apply.</start_with_action_verbs>30 <be_specific>Tell exactly what to do with concrete details.</be_specific>31 <use_imperative_mood>Write commands that tell the LLM what to do.</use_imperative_mood>32 <lead_with_the_positive_carrier>Put the actionable instruction first; layer supplements after.</lead_with_the_positive_carrier>33 <preserve_technical_precision>Keep specific details, error codes, and identifiers when transforming.</preserve_technical_precision>34 <enhance_rather_than_replace>Add specificity, rationale, and context on top of existing positive rules.</enhance_rather_than_replace>35 </authoring_guidelines>3637 <positive_only_examples>38 <when_to_apply>These enumerate their full positive set, so no catch-all negative is needed — see catch_all_negative for the cases where the long tail forces one.</when_to_apply>39 <examples>40 <example>Use specific exception types like `except ValueError:`.</example>41 <example>Use absolute imports like `from package.module import function`.</example>42 <example>Define named functions for reusable logic.</example>43 <example>Write one statement per line for readability.</example>44 <example>Implement error handling with specific exception types.</example>45 <example>Apply consistent formatting throughout the codebase.</example>46 <example>Write clear, descriptive error messages that guide users.</example>47 <example>Provide specific examples for each concept.</example>48 </examples>49 </positive_only_examples>5051 <catch_all_negative>52 <principle>53 A negative supplement earns its place when listing the positive cases exhaustively is infeasible. The negative names a broader class as a catch-all for what falls outside the positive guidance. When the positive set is finite and enumerable, no negative is needed.54 </principle>55 <valid_catch_all>56 <pattern>Positive carrier plus catch-all for the long tail.</pattern>57 <examples>58 <example>"Use ASCII characters in identifiers; don't include Unicode symbols, emoji, or non-printing characters." The positive is one finite class; Unicode is too broad to enumerate, so the negative names the excluded class.</example>59 <example>"Open every section with an action verb (Use, Write, Create, Define, Implement, Apply); don't lead with passive voice or noun phrases." The positives are partial; the negative catches the long tail of non-action openings.</example>60 </examples>61 </valid_catch_all>62 <invalid_negative_only>63 <pattern>Negative-only, no positive carrier.</pattern>64 <examples>65 <example>"Don't use relative imports." Rewrite: "Use absolute imports like `from package.module import function`."</example>66 <example>"Avoid unused imports." Rewrite: "Import only modules you actively use; remove unused imports immediately to prevent F401 errors."</example>67 </examples>68 </invalid_negative_only>69 <invalid_redundant_negative>70 <pattern>Negative just inverts an enumerable positive (noise).</pattern>71 <examples>72 <example>"Use 4-space indentation; don't use tabs or 2-space indents." Drop the negative: "Use 4-space indentation."</example>73 </examples>74 </invalid_redundant_negative>75 </catch_all_negative>7677 <transformation_patterns>78 <when_to_use>Apply these patterns when rewriting existing negative rules into positive ones. The pairs show the transform; the model's output is the positive half, optionally with supplemental context.</when_to_use>79 <action_focused>"Use X" replaces "Don't use Y".</action_focused>80 <outcome_focused>"Ensure X" replaces "Avoid Y".</outcome_focused>81 <solution_focused>"Implement X" replaces "Prevent Y".</solution_focused>82 <guidance_focused>"Follow X" replaces "Never Y".</guidance_focused>83 <success_focused>"Apply X" replaces "Stop Y".</success_focused>84 </transformation_patterns>8586 <good_vs_poor_transformations>87 <principle>Both rows take a negative input and produce a positive output. The good versions preserve the technical precision the poor ones discard.</principle>88 <poor>89 <issue>Deletes important information.</issue>90 <examples>91 <example>"Never import unused modules" → "Import only what you use".</example>92 <example>"Don't assign unused variables" → "Use variables only when needed".</example>93 </examples>94 </poor>95 <good>96 <strength>Preserves and enhances information.</strength>97 <examples>98 <example>"Never import unused modules" → "Import only modules you actively use; remove unused imports immediately to prevent F401 errors".</example>99 <example>"Don't assign unused variables" → "Assign variables only when you need them; use `_` for intentionally unused values to prevent F841 errors".</example>100 </examples>101 </good>102 </good_vs_poor_transformations>103104 <enhancement_strategies>105 <when_to_apply>Apply these when improving existing positive rules — layer value on top rather than rewriting.</when_to_apply>106 <add_specificity>Include error codes, specific examples, concrete details.</add_specificity>107 <expand_context>Add rationale, benefits, and when to apply.</expand_context>108 <enhance_examples>Provide more detailed, actionable examples.</enhance_examples>109 <improve_clarity>Make the action more specific without losing content.</improve_clarity>110 </enhancement_strategies>111112 <content_layout>113 <lead_with_positive>Always start sections with what to do.</lead_with_positive>114 <allocate_most_space_to_positive_guidance>The positive form is the carrier; supplements stay short.</allocate_most_space_to_positive_guidance>115 <end_with_positive>Conclude with positive reinforcement when wrapping a section.</end_with_positive>116 </content_layout>117</ai_instruction_writing>118119---120> Source: [theafh/ai-modules](https://github.com/theafh/ai-modules) — distributed by [TomeVault](https://tomevault.io).121<!-- tomevault:4.0:skill_md:2026-06-15 -->