@rfxlamia/skillkit 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/agents/agents/creative-copywriter.md +212 -0
  2. package/agents/agents/dario-amodei.md +135 -0
  3. package/agents/agents/doc-simplifier.md +63 -0
  4. package/agents/agents/kotlin-pro.md +433 -0
  5. package/agents/agents/red-team.md +136 -0
  6. package/agents/agents/sam-altman.md +121 -0
  7. package/agents/agents/seo-manager.md +184 -0
  8. package/package.json +1 -1
  9. package/skills/skillkit-help/SKILL.md +81 -0
  10. package/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  11. package/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  12. package/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  13. package/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  14. package/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  15. package/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  16. package/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  17. package/skills/skillkit-help/template/SKILL.md +52 -0
  18. package/skills/skills/adversarial-review/SKILL.md +219 -0
  19. package/skills/skills/baby-education/SKILL.md +260 -0
  20. package/skills/skills/baby-education/references/advanced-techniques.md +323 -0
  21. package/skills/skills/baby-education/references/transformations.md +345 -0
  22. package/skills/skills/been-there-done-that/SKILL.md +455 -0
  23. package/skills/skills/been-there-done-that/references/analysis-patterns.md +162 -0
  24. package/skills/skills/been-there-done-that/references/git-commands.md +132 -0
  25. package/skills/skills/been-there-done-that/references/tree-insertion-logic.md +145 -0
  26. package/skills/skills/coolhunter/SKILL.md +270 -0
  27. package/skills/skills/coolhunter/assets/elicitation-methods.csv +51 -0
  28. package/skills/skills/coolhunter/knowledge/elicitation-methods.md +312 -0
  29. package/skills/skills/coolhunter/references/workflow-execution.md +238 -0
  30. package/skills/skills/coolhunter/workflow-plan-coolhunter.md +232 -0
  31. package/skills/skills/creative-copywriting/SKILL.md +324 -0
  32. package/skills/skills/creative-copywriting/databases/README.md +60 -0
  33. package/skills/skills/creative-copywriting/databases/carousel-structures.csv +16 -0
  34. package/skills/skills/creative-copywriting/databases/emotional-arcs.csv +11 -0
  35. package/skills/skills/creative-copywriting/databases/hook-formulas.csv +51 -0
  36. package/skills/skills/creative-copywriting/databases/power-words.csv +201 -0
  37. package/skills/skills/creative-copywriting/databases/psychological-triggers.csv +21 -0
  38. package/skills/skills/creative-copywriting/databases/read-more-patterns.csv +26 -0
  39. package/skills/skills/creative-copywriting/databases/swipe-triggers.csv +31 -0
  40. package/skills/skills/creative-copywriting/references/carousel-psychology.md +223 -0
  41. package/skills/skills/creative-copywriting/references/hook-anatomy.md +169 -0
  42. package/skills/skills/creative-copywriting/references/power-word-science.md +134 -0
  43. package/skills/skills/creative-copywriting/references/storytelling-frameworks.md +157 -0
  44. package/skills/skills/diverse-content-gen/SKILL.md +201 -0
  45. package/skills/skills/diverse-content-gen/references/advanced-techniques.md +320 -0
  46. package/skills/skills/diverse-content-gen/references/research-findings.md +379 -0
  47. package/skills/skills/diverse-content-gen/references/task-workflows.md +241 -0
  48. package/skills/skills/diverse-content-gen/references/tool-integration.md +419 -0
  49. package/skills/skills/diverse-content-gen/references/troubleshooting.md +426 -0
  50. package/skills/skills/diverse-content-gen/references/vs-core-technique.md +240 -0
  51. package/skills/skills/framework-critical-thinking/SKILL.md +220 -0
  52. package/skills/skills/framework-critical-thinking/references/bias_detector.md +375 -0
  53. package/skills/skills/framework-critical-thinking/references/fallback_handler.md +239 -0
  54. package/skills/skills/framework-critical-thinking/references/memory_curator.md +161 -0
  55. package/skills/skills/framework-critical-thinking/references/metacognitive_monitor.md +297 -0
  56. package/skills/skills/framework-critical-thinking/references/producer_critic_orchestrator.md +333 -0
  57. package/skills/skills/framework-critical-thinking/references/reasoning_router.md +235 -0
  58. package/skills/skills/framework-critical-thinking/references/reasoning_validator.md +97 -0
  59. package/skills/skills/framework-critical-thinking/references/reflection_trigger.md +78 -0
  60. package/skills/skills/framework-critical-thinking/references/self_verification.md +388 -0
  61. package/skills/skills/framework-critical-thinking/references/uncertainty_quantifier.md +207 -0
  62. package/skills/skills/framework-initiative/SKILL.md +231 -0
  63. package/skills/skills/framework-initiative/references/examples.md +150 -0
  64. package/skills/skills/framework-initiative/references/impact-analysis.md +157 -0
  65. package/skills/skills/framework-initiative/references/intent-patterns.md +145 -0
  66. package/skills/skills/framework-initiative/references/star-framework.md +165 -0
  67. package/skills/skills/humanize-docs/SKILL.md +203 -0
  68. package/skills/skills/humanize-docs/references/advanced-techniques.md +13 -0
  69. package/skills/skills/humanize-docs/references/core-transformations.md +368 -0
  70. package/skills/skills/humanize-docs/references/detection-patterns.md +400 -0
  71. package/skills/skills/humanize-docs/references/examples-gallery.md +374 -0
  72. package/skills/skills/imagine/SKILL.md +190 -0
  73. package/skills/skills/imagine/references/artstyle-corporate-memphis.md +625 -0
  74. package/skills/skills/imagine/references/artstyle-crewdson-hyperrealism.md +295 -0
  75. package/skills/skills/imagine/references/artstyle-iphone-social-media.md +426 -0
  76. package/skills/skills/imagine/references/artstyle-sciencesaru.md +276 -0
  77. package/skills/skills/pre-deploy-checklist/README.md +26 -0
  78. package/skills/skills/pre-deploy-checklist/SKILL.md +153 -0
  79. package/skills/skills/pre-deploy-checklist/references/checklist-categories.md +174 -0
  80. package/skills/skills/pre-deploy-checklist/references/domain-prompts.md +216 -0
  81. package/skills/skills/prompt-engineering/SKILL.md +209 -0
  82. package/skills/skills/prompt-engineering/references/advanced-combinations.md +444 -0
  83. package/skills/skills/prompt-engineering/references/chain-of-thought.md +140 -0
  84. package/skills/skills/prompt-engineering/references/decision_matrix.md +220 -0
  85. package/skills/skills/prompt-engineering/references/few-shot.md +346 -0
  86. package/skills/skills/prompt-engineering/references/json-format.md +270 -0
  87. package/skills/skills/prompt-engineering/references/natural-language.md +420 -0
  88. package/skills/skills/prompt-engineering/references/pitfalls.md +365 -0
  89. package/skills/skills/prompt-engineering/references/prompt-chaining.md +498 -0
  90. package/skills/skills/prompt-engineering/references/react.md +108 -0
  91. package/skills/skills/prompt-engineering/references/self-consistency.md +322 -0
  92. package/skills/skills/prompt-engineering/references/tree-of-thoughts.md +386 -0
  93. package/skills/skills/prompt-engineering/references/xml-format.md +220 -0
  94. package/skills/skills/prompt-engineering/references/yaml-format.md +488 -0
  95. package/skills/skills/prompt-engineering/references/zero-shot.md +74 -0
  96. package/skills/skills/quick-spec/SKILL.md +280 -0
  97. package/skills/skills/quick-spec/assets/tech-spec-template.md +74 -0
  98. package/skills/skills/quick-spec/references/step-01-understand.md +189 -0
  99. package/skills/skills/quick-spec/references/step-02-investigate.md +144 -0
  100. package/skills/skills/quick-spec/references/step-03-generate.md +128 -0
  101. package/skills/skills/quick-spec/references/step-04-review.md +173 -0
  102. package/skills/skills/quick-spec/tests/__pycache__/test_skill.cpython-314-pytest-9.0.2.pyc +0 -0
  103. package/skills/skills/quick-spec/tests/test_scenarios.md +83 -0
  104. package/skills/skills/quick-spec/tests/test_skill.py +136 -0
  105. package/skills/skills/readme-expert/SKILL.md +538 -0
  106. package/skills/skills/readme-expert/knowledge/INDEX.md +192 -0
  107. package/skills/skills/readme-expert/knowledge/application/quality-standards.md +470 -0
  108. package/skills/skills/readme-expert/knowledge/application/script-executor.md +604 -0
  109. package/skills/skills/readme-expert/knowledge/application/template-library.md +822 -0
  110. package/skills/skills/readme-expert/knowledge/foundation/codebase-scanner.md +361 -0
  111. package/skills/skills/readme-expert/knowledge/foundation/validation-checklist.md +481 -0
  112. package/skills/skills/red-teaming/SKILL.md +321 -0
  113. package/skills/skills/red-teaming/references/ai-llm-redteam.md +517 -0
  114. package/skills/skills/red-teaming/references/attack-techniques.md +410 -0
  115. package/skills/skills/red-teaming/references/cybersecurity-redteam.md +383 -0
  116. package/skills/skills/red-teaming/references/tools-frameworks.md +446 -0
  117. package/skills/skills/releasing/.skillkit-mode +1 -0
  118. package/skills/skills/releasing/SKILL.md +225 -0
  119. package/skills/skills/releasing/references/version-detection.md +108 -0
  120. package/skills/skills/screenwriter/SKILL.md +273 -0
  121. package/skills/skills/screenwriter/references/advanced-techniques.md +216 -0
  122. package/skills/skills/screenwriter/references/pipeline-integration.md +266 -0
  123. package/skills/skills/skillkit/.claude/settings.local.json +7 -0
  124. package/skills/skills/skillkit/.claude-plugin/plugin.json +27 -0
  125. package/skills/skills/skillkit/CHANGELOG.md +484 -0
  126. package/skills/skills/skillkit/SKILL.md +511 -0
  127. package/skills/skills/skillkit/commands/skillkit.md +6 -0
  128. package/skills/skills/skillkit/commands/validate-plan.md +6 -0
  129. package/skills/skills/skillkit/commands/verify.md +6 -0
  130. package/skills/skills/skillkit/knowledge/INDEX.md +352 -0
  131. package/skills/skills/skillkit/knowledge/application/09-case-studies.md +257 -0
  132. package/skills/skills/skillkit/knowledge/application/10-technical-architecture.md +324 -0
  133. package/skills/skills/skillkit/knowledge/application/11-adoption-strategy.md +267 -0
  134. package/skills/skills/skillkit/knowledge/application/12-testing-and-validation.md +276 -0
  135. package/skills/skills/skillkit/knowledge/application/13-competitive-landscape.md +198 -0
  136. package/skills/skills/skillkit/knowledge/foundation/01-why-skills-exist.md +246 -0
  137. package/skills/skills/skillkit/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  138. package/skills/skills/skillkit/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  139. package/skills/skills/skillkit/knowledge/foundation/04-hybrid-patterns.md +308 -0
  140. package/skills/skills/skillkit/knowledge/foundation/05-token-economics.md +275 -0
  141. package/skills/skills/skillkit/knowledge/foundation/06-platform-constraints.md +237 -0
  142. package/skills/skills/skillkit/knowledge/foundation/07-security-concerns.md +322 -0
  143. package/skills/skills/skillkit/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  144. package/skills/skills/skillkit/knowledge/plugin-guide.md +614 -0
  145. package/skills/skills/skillkit/knowledge/tools/14-validation-tools-guide.md +150 -0
  146. package/skills/skills/skillkit/knowledge/tools/15-cost-tools-guide.md +157 -0
  147. package/skills/skills/skillkit/knowledge/tools/16-security-tools-guide.md +122 -0
  148. package/skills/skills/skillkit/knowledge/tools/17-pattern-tools-guide.md +161 -0
  149. package/skills/skills/skillkit/knowledge/tools/18-decision-helper-guide.md +243 -0
  150. package/skills/skills/skillkit/knowledge/tools/19-test-generator-guide.md +275 -0
  151. package/skills/skills/skillkit/knowledge/tools/20-split-skill-guide.md +149 -0
  152. package/skills/skills/skillkit/knowledge/tools/21-quality-scorer-guide.md +226 -0
  153. package/skills/skills/skillkit/knowledge/tools/22-migration-helper-guide.md +356 -0
  154. package/skills/skills/skillkit/knowledge/tools/23-subagent-creation-guide.md +448 -0
  155. package/skills/skills/skillkit/knowledge/tools/24-behavioral-testing-guide.md +122 -0
  156. package/skills/skills/skillkit/references/proposal-generation.md +982 -0
  157. package/skills/skills/skillkit/references/rationalization-catalog.md +75 -0
  158. package/skills/skills/skillkit/references/research-methodology.md +661 -0
  159. package/skills/skills/skillkit/references/section-2-full-creation-workflow.md +452 -0
  160. package/skills/skills/skillkit/references/section-3-validation-workflow-existing-skill.md +63 -0
  161. package/skills/skills/skillkit/references/section-4-decision-workflow-skills-vs-subagents.md +64 -0
  162. package/skills/skills/skillkit/references/section-5-migration-workflow-doc-to-skill.md +58 -0
  163. package/skills/skills/skillkit/references/section-6-subagent-creation-workflow.md +499 -0
  164. package/skills/skills/skillkit/references/section-7-knowledge-reference-map.md +72 -0
  165. package/skills/skills/skillkit/scripts/__pycache__/decision_helper.cpython-314.pyc +0 -0
  166. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  167. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  168. package/skills/skills/skillkit/scripts/__pycache__/test_generator.cpython-314-pytest-9.0.2.pyc +0 -0
  169. package/skills/skills/skillkit/scripts/decision_helper.py +799 -0
  170. package/skills/skills/skillkit/scripts/init_skill.py +400 -0
  171. package/skills/skills/skillkit/scripts/init_subagent.py +231 -0
  172. package/skills/skills/skillkit/scripts/migration_helper.py +669 -0
  173. package/skills/skills/skillkit/scripts/package_skill.py +211 -0
  174. package/skills/skills/skillkit/scripts/pattern_detector.py +381 -0
  175. package/skills/skills/skillkit/scripts/pattern_detector_new.py +382 -0
  176. package/skills/skills/skillkit/scripts/pressure_tester.py +157 -0
  177. package/skills/skills/skillkit/scripts/quality_scorer.py +999 -0
  178. package/skills/skills/skillkit/scripts/quick_validate.py +100 -0
  179. package/skills/skills/skillkit/scripts/security_scanner.py +474 -0
  180. package/skills/skills/skillkit/scripts/split_skill.py +540 -0
  181. package/skills/skills/skillkit/scripts/test_generator.py +695 -0
  182. package/skills/skills/skillkit/scripts/token_estimator.py +493 -0
  183. package/skills/skills/skillkit/scripts/utils/__init__.py +49 -0
  184. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  185. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-314.pyc +0 -0
  186. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-312.pyc +0 -0
  187. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-314.pyc +0 -0
  188. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-312.pyc +0 -0
  189. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-314.pyc +0 -0
  190. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-312.pyc +0 -0
  191. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-314.pyc +0 -0
  192. package/skills/skills/skillkit/scripts/utils/budget_tracker.py +388 -0
  193. package/skills/skills/skillkit/scripts/utils/output_formatter.py +263 -0
  194. package/skills/skills/skillkit/scripts/utils/reference_validator.py +401 -0
  195. package/skills/skills/skillkit/scripts/validate_skill.py +594 -0
  196. package/skills/skills/skillkit/tests/test_behavioral.py +39 -0
  197. package/skills/skills/skillkit/tests/test_scenarios.md +83 -0
  198. package/skills/skills/skillkit/tests/test_skill.py +136 -0
  199. package/skills/skills/skillkit-help/SKILL.md +81 -0
  200. package/skills/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  201. package/skills/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  202. package/skills/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  203. package/skills/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  204. package/skills/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  205. package/skills/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  206. package/skills/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  207. package/skills/skills/skillkit-help/template/SKILL.md +52 -0
  208. package/skills/skills/social-media-seo/SKILL.md +278 -0
  209. package/skills/skills/social-media-seo/databases/caption-styles.csv +31 -0
  210. package/skills/skills/social-media-seo/databases/engagement-tactics.csv +16 -0
  211. package/skills/skills/social-media-seo/databases/hashtag-strategies.csv +21 -0
  212. package/skills/skills/social-media-seo/databases/hook-formulas.csv +26 -0
  213. package/skills/skills/social-media-seo/databases/keyword-clusters.csv +11 -0
  214. package/skills/skills/social-media-seo/databases/thread-structures.csv +26 -0
  215. package/skills/skills/social-media-seo/databases/viral-patterns.csv +21 -0
  216. package/skills/skills/social-media-seo/references/analytics-guide.md +321 -0
  217. package/skills/skills/social-media-seo/references/instagram-seo.md +235 -0
  218. package/skills/skills/social-media-seo/references/threads-seo.md +305 -0
  219. package/skills/skills/social-media-seo/references/x-twitter-seo.md +337 -0
  220. package/skills/skills/social-media-seo/scripts/query_database.py +191 -0
  221. package/skills/skills/storyteller/SKILL.md +241 -0
  222. package/skills/skills/storyteller/references/transformation-methodology.md +293 -0
  223. package/skills/skills/storyteller/references/visual-vocabulary.md +177 -0
  224. package/skills/skills/thread-pro/SKILL.md +162 -0
  225. package/skills/skills/thread-pro/anti-ai-patterns.md +120 -0
  226. package/skills/skills/thread-pro/hook-formulas.md +138 -0
  227. package/skills/skills/thread-pro/references/anti-ai-patterns.md +120 -0
  228. package/skills/skills/thread-pro/references/hook-formulas.md +138 -0
  229. package/skills/skills/thread-pro/references/thread-structures.md +240 -0
  230. package/skills/skills/thread-pro/references/voice-injection.md +130 -0
  231. package/skills/skills/thread-pro/thread-structures.md +240 -0
  232. package/skills/skills/thread-pro/voice-injection.md +130 -0
  233. package/skills/skills/tinkering/SKILL.md +251 -0
  234. package/skills/skills/tinkering/references/graduation-checklist.md +100 -0
  235. package/skills/skills/validate-plan/.skillkit-mode +1 -0
  236. package/skills/skills/validate-plan/SKILL.md +406 -0
  237. package/skills/skills/validate-plan/references/dry-principles.md +251 -0
  238. package/skills/skills/validate-plan/references/gap-analysis-guide.md +320 -0
  239. package/skills/skills/validate-plan/references/tdd-patterns.md +413 -0
  240. package/skills/skills/validate-plan/references/yagni-checklist.md +330 -0
  241. package/skills/skills/verify-before-ship/.skillkit-mode +1 -0
  242. package/skills/skills/verify-before-ship/SKILL.md +116 -0
  243. package/skills/skills/verify-before-ship/references/anti-rationalization.md +212 -0
  244. package/skills/skills/verify-before-ship/references/verification-gates.md +305 -0
  245. package/skills-manifest.json +8 -2
  246. package/src/picker.js +11 -5
  247. package/src/picker.test.js +36 -1
@@ -0,0 +1,220 @@
1
+ # XML Format for Claude (Anthropic-Optimized)
2
+
3
+ ## When to Use XML
4
+
5
+ ✅ **Use XML When:**
6
+ - Target LLM is Claude (Anthropic models)
7
+ - Complex hierarchical structure needed
8
+ - Multiple nested contexts or sections
9
+ - Clear semantic boundaries required
10
+ - Preventing prompt injection is critical
11
+
12
+ ❌ **Don't Use XML When:**
13
+ - Output will be parsed by code (use JSON)
14
+ - Token efficiency is critical (XML is verbose)
15
+ - Target is non-Claude LLM
16
+ - Simple flat structure (use Natural Language)
17
+
18
+ ## Why XML Works Well with Claude
19
+
20
+ - **Officially recommended** by Anthropic for Claude
21
+ - **Proven to improve** prompt adherence
22
+ - **Clear structure** prevents prompt injection
23
+ - **Better handling** of nested contexts
24
+ - **Semantic tags** provide meaning
25
+
26
+ ## Best Practices
27
+
28
+ ✓ Use descriptive, semantic tag names
29
+ ✓ Keep nesting to 3-4 levels max
30
+ ✓ Close all tags properly
31
+ ✓ Use attributes for metadata
32
+ ✓ Use CDATA for code/special characters
33
+
34
+ ✗ Don't use generic tags like <data>
35
+ ✗ Avoid mixing XML with other formats
36
+ ✗ Don't nest too deeply (>5 levels)
37
+ ✗ Avoid inconsistent tag naming
38
+
39
+ ## Template: Basic Structure
40
+
41
+ ```xml
42
+ <prompt>
43
+ <context>
44
+ <background>
45
+ [Background information]
46
+ </background>
47
+ <constraints>
48
+ <constraint type="required">[Must do X]</constraint>
49
+ <constraint type="forbidden">[Must not do Y]</constraint>
50
+ </constraints>
51
+ </context>
52
+
53
+ <task>
54
+ <description>
55
+ [What needs to be done]
56
+ </description>
57
+ <steps>
58
+ <step priority="1">[First step]</step>
59
+ <step priority="2">[Second step]</step>
60
+ </steps>
61
+ </task>
62
+
63
+ <examples>
64
+ <example>
65
+ <input>[Example input]</input>
66
+ <output>[Example output]</output>
67
+ </example>
68
+ </examples>
69
+
70
+ <output_requirements>
71
+ <format>[Desired format]</format>
72
+ <length>[Word/token limit]</length>
73
+ <style>[Tone and style]</style>
74
+ </output_requirements>
75
+ </prompt>
76
+ ```
77
+
78
+ ## Template: Code Review
79
+
80
+ ```xml
81
+ <code_review_task>
82
+ <context>
83
+ <language>Python</language>
84
+ <framework>Django</framework>
85
+ <focus_areas>
86
+ <area>Security vulnerabilities</area>
87
+ <area>Performance issues</area>
88
+ <area>Code style</area>
89
+ </focus_areas>
90
+ </context>
91
+
92
+ <code>
93
+ <![CDATA[
94
+ def process_user_input(user_data):
95
+ query = f"SELECT * FROM users WHERE name = '{user_data}'"
96
+ return db.execute(query)
97
+ ]]>
98
+ </code>
99
+
100
+ <review_criteria>
101
+ <security weight="critical">
102
+ Check for SQL injection, XSS, authentication issues
103
+ </security>
104
+ <performance weight="high">
105
+ Check for N+1 queries, inefficient algorithms
106
+ </performance>
107
+ <style weight="medium">
108
+ Check PEP 8 compliance, naming conventions
109
+ </style>
110
+ </review_criteria>
111
+
112
+ <output_format>
113
+ <section name="critical_issues">List blocking issues</section>
114
+ <section name="warnings">List concerning patterns</section>
115
+ <section name="suggestions">List improvements</section>
116
+ </output_format>
117
+ </code_review_task>
118
+ ```
119
+
120
+ ## Using CDATA for Special Characters
121
+
122
+ When including code, scripts, or text with special characters:
123
+
124
+ ```xml
125
+ <code>
126
+ <![CDATA[
127
+ // Your code here with <, >, &, etc.
128
+ if (x < 10 && y > 5) {
129
+ return "special chars work fine";
130
+ }
131
+ ]]>
132
+ </code>
133
+ ```
134
+
135
+ ## Attributes vs Nested Tags
136
+
137
+ ### Use Attributes for Metadata:
138
+ ```xml
139
+ <requirement priority="high" type="security">
140
+ Use encrypted connections
141
+ </requirement>
142
+ ```
143
+
144
+ ### Use Nested Tags for Content:
145
+ ```xml
146
+ <requirement>
147
+ <priority>high</priority>
148
+ <type>security</type>
149
+ <description>Use encrypted connections</description>
150
+ </requirement>
151
+ ```
152
+
153
+ **Rule:** Attributes for simple metadata, nested tags for complex content.
154
+
155
+ ## Common Patterns
156
+
157
+ ### Multi-Context Prompt
158
+ ```xml
159
+ <system_context>
160
+ <role>You are [role]</role>
161
+ <expertise>[Areas]</expertise>
162
+ </system_context>
163
+
164
+ <task_context>
165
+ <user_request>[Request]</user_request>
166
+ <background>[Context]</background>
167
+ </task_context>
168
+
169
+ <execution_instructions>
170
+ <approach>[Method]</approach>
171
+ <constraints>[Limits]</constraints>
172
+ </execution_instructions>
173
+ ```
174
+
175
+ ### Hierarchical Data
176
+ ```xml
177
+ <project>
178
+ <metadata>
179
+ <name>Project Name</name>
180
+ <version>1.0</version>
181
+ </metadata>
182
+
183
+ <modules>
184
+ <module name="auth">
185
+ <files>
186
+ <file>login.py</file>
187
+ <file>logout.py</file>
188
+ </files>
189
+ </module>
190
+ </modules>
191
+ </project>
192
+ ```
193
+
194
+ ## Token Overhead
195
+
196
+ XML is more verbose than JSON but provides better structure for Claude.
197
+
198
+ **Example comparison:**
199
+ ```xml
200
+ <person>
201
+ <name>John</name>
202
+ <age>30</age>
203
+ </person>
204
+ ```
205
+
206
+ vs
207
+
208
+ ```json
209
+ {"person": {"name": "John", "age": 30}}
210
+ ```
211
+
212
+ XML: ~50 tokens | JSON: ~25 tokens
213
+
214
+ **Trade-off:** 2x tokens for better Claude performance and clarity.
215
+
216
+ ---
217
+
218
+ **Related:**
219
+ - [JSON Format](json-format.md) - Alternative for APIs/multi-LLM
220
+ - [Decision Matrix](decision_matrix.md) - XML vs JSON selection
@@ -0,0 +1,488 @@
1
+ # YAML Format for Human-Readable Prompts
2
+
3
+ ## When to Use YAML
4
+
5
+ ✅ **Use YAML When:**
6
+ - Prompts maintained in version control by teams
7
+ - Configuration-driven prompt systems
8
+ - Templates that non-technical users will edit
9
+ - Multi-line content is common (examples, context, docs)
10
+ - Human readability is paramount
11
+ - Need comments for documentation
12
+
13
+ ❌ **Don't Use YAML When:**
14
+ - LLM has limited YAML familiarity
15
+ - Output needs programmatic parsing (use JSON)
16
+ - Whitespace sensitivity causes issues
17
+ - Simple flat structure (use Natural Language)
18
+
19
+ ## Best Practices
20
+
21
+ ✓ Use consistent indentation (2 or 4 spaces)
22
+ ✓ Add comments to explain complex sections
23
+ ✓ Use anchors (&) and aliases (*) for reusable content
24
+ ✓ Validate YAML syntax before use
25
+ ✓ Multi-line strings with | or >
26
+
27
+ ✗ Don't mix tabs and spaces (spaces only!)
28
+ ✗ Avoid overly complex nesting (>4 levels)
29
+ ✗ Don't use YAML-specific features LLMs may not understand
30
+ ✗ Avoid inconsistent indentation
31
+
32
+ ## Template: Basic Prompt
33
+
34
+ ```yaml
35
+ # Prompt configuration for [task name]
36
+ prompt:
37
+ name: "task_name"
38
+ version: "1.0"
39
+
40
+ system:
41
+ role: "You are an expert in [domain]"
42
+ constraints:
43
+ - "Constraint 1"
44
+ - "Constraint 2"
45
+ - "Constraint 3"
46
+
47
+ task:
48
+ description: |
49
+ Multi-line task description.
50
+ Can span multiple lines naturally.
51
+ No need for escaping or special characters.
52
+
53
+ requirements:
54
+ must_include:
55
+ - "Requirement 1"
56
+ - "Requirement 2"
57
+
58
+ must_avoid:
59
+ - "Thing to avoid 1"
60
+ - "Thing to avoid 2"
61
+
62
+ examples:
63
+ - input: "Example input 1"
64
+ output: "Example output 1"
65
+ note: "Why this is a good example"
66
+
67
+ - input: "Example input 2"
68
+ output: "Example output 2"
69
+ note: "Edge case handling"
70
+
71
+ output_format:
72
+ type: "structured"
73
+ template: |
74
+ Result: [result]
75
+ Confidence: [score]
76
+ Reasoning: [explanation]
77
+ ```
78
+
79
+ ## Multi-Line Strings
80
+
81
+ ### Literal Style (|) - Preserves Line Breaks
82
+
83
+ ```yaml
84
+ description: |
85
+ First line
86
+ Second line
87
+ Third line
88
+
89
+ # Result: "First line\nSecond line\nThird line\n"
90
+ ```
91
+
92
+ ### Folded Style (>) - Folds to Single Line
93
+
94
+ ```yaml
95
+ description: >
96
+ This is a long
97
+ paragraph that will
98
+ be folded into a
99
+ single line.
100
+
101
+ # Result: "This is a long paragraph that will be folded into a single line."
102
+ ```
103
+
104
+ **Use | for:** Code examples, structured text
105
+ **Use > for:** Long descriptions, paragraphs
106
+
107
+ ## Anchors & Aliases (Reusable Content)
108
+
109
+ ```yaml
110
+ # Define reusable components with & anchor
111
+ constraints_common: &common_constraints
112
+ - "Be concise and clear"
113
+ - "Provide specific examples"
114
+ - "Cite sources when possible"
115
+
116
+ quality_criteria: &quality
117
+ accuracy: "Must be factually correct"
118
+ clarity: "Easy to understand"
119
+ completeness: "Cover all aspects"
120
+
121
+ # Reuse with * alias
122
+ code_review:
123
+ constraints: *common_constraints # Reuses above
124
+ quality: *quality
125
+
126
+ documentation:
127
+ constraints: *common_constraints # Same constraints
128
+ quality: *quality
129
+ ```
130
+
131
+ ## Template: Prompt Library/Repository
132
+
133
+ ```yaml
134
+ # Prompt library for common tasks
135
+ library:
136
+ metadata:
137
+ version: "2.0"
138
+ last_updated: "2025-01-03"
139
+ maintainer: "team@example.com"
140
+
141
+ prompts:
142
+ summarization:
143
+ id: "sum-001"
144
+ name: "Document Summarization"
145
+ category: "text-processing"
146
+
147
+ variants:
148
+ brief:
149
+ max_length: 100
150
+ style: "bullet points"
151
+ template: |
152
+ Summarize the following in {max_length} words or less.
153
+ Use {style} format.
154
+
155
+ Content: {content}
156
+
157
+ detailed:
158
+ max_length: 500
159
+ style: "paragraphs"
160
+ template: |
161
+ Provide a comprehensive summary of the following.
162
+ Maximum {max_length} words.
163
+ Format: {style}
164
+ Include key points, conclusions, and implications.
165
+
166
+ Content: {content}
167
+
168
+ translation:
169
+ id: "trans-001"
170
+ name: "Language Translation"
171
+ category: "language"
172
+
173
+ parameters:
174
+ source_lang: "auto-detect"
175
+ target_lang: "required"
176
+ preserve_formatting: true
177
+ tone: "formal"
178
+
179
+ template: |
180
+ Translate the following text from {source_lang} to {target_lang}.
181
+
182
+ Requirements:
183
+ - Preserve formatting: {preserve_formatting}
184
+ - Maintain {tone} tone
185
+ - Keep technical terms accurate
186
+
187
+ Text: {content}
188
+ ```
189
+
190
+ ## Template: Configuration-Driven System
191
+
192
+ ```yaml
193
+ # config/prompts.yaml - Used by application
194
+ application:
195
+ name: "Customer Support AI"
196
+ version: "1.0"
197
+ environment: "production"
198
+
199
+ prompt_chain:
200
+ step_1_classification:
201
+ model: "gpt-4"
202
+ temperature: 0.3
203
+ max_tokens: 100
204
+ prompt: |
205
+ Classify the following customer message:
206
+
207
+ Categories:
208
+ - technical_issue
209
+ - billing_question
210
+ - feature_request
211
+ - complaint
212
+ - general_inquiry
213
+
214
+ Message: {user_message}
215
+
216
+ Return only the category name.
217
+
218
+ step_2_response:
219
+ model: "claude-3-sonnet"
220
+ temperature: 0.7
221
+ max_tokens: 500
222
+ prompt: |
223
+ You are a helpful customer support agent.
224
+
225
+ Customer message category: {classification}
226
+ Customer message: {user_message}
227
+
228
+ Previous conversation:
229
+ {conversation_history}
230
+
231
+ Guidelines:
232
+ - Be empathetic and professional
233
+ - Provide specific solutions
234
+ - Escalate to human if needed
235
+ - Keep response under 200 words
236
+
237
+ Respond to the customer:
238
+
239
+ step_3_quality_check:
240
+ model: "claude-3-opus"
241
+ temperature: 0.2
242
+ max_tokens: 300
243
+ prompt: |
244
+ Review this customer support response for quality:
245
+
246
+ Customer message: {user_message}
247
+ Proposed response: {generated_response}
248
+
249
+ Check for:
250
+ ✓ Accuracy
251
+ ✓ Empathy
252
+ ✓ Completeness
253
+ ✓ Professionalism
254
+
255
+ If issues found, suggest improvements.
256
+ If acceptable, approve with "APPROVED"
257
+ ```
258
+
259
+ ## Comments for Documentation
260
+
261
+ ```yaml
262
+ # Main configuration file for prompt system
263
+ # Updated: 2025-01-03
264
+ # Maintainer: Team Lead
265
+
266
+ system:
267
+ # Model selection based on task complexity
268
+ # - Simple tasks: gpt-3.5-turbo
269
+ # - Complex tasks: gpt-4 or claude-3-opus
270
+ default_model: "gpt-4"
271
+
272
+ # Temperature controls randomness (0.0 - 2.0)
273
+ # Lower = more deterministic
274
+ # Higher = more creative
275
+ temperature: 0.7
276
+
277
+ constraints:
278
+ # Maximum response length in tokens
279
+ # Adjust based on use case
280
+ max_tokens: 1000
281
+
282
+ # Retry logic for failed requests
283
+ max_retries: 3
284
+ retry_delay_seconds: 2
285
+ ```
286
+
287
+ ## Lists and Nested Structures
288
+
289
+ ### Inline Lists:
290
+ ```yaml
291
+ tags: [python, tutorial, beginner]
292
+ ```
293
+
294
+ ### Block Lists:
295
+ ```yaml
296
+ tags:
297
+ - python
298
+ - tutorial
299
+ - beginner
300
+ ```
301
+
302
+ ### Nested Structures:
303
+ ```yaml
304
+ project:
305
+ name: "My Project"
306
+ modules:
307
+ - name: "auth"
308
+ files:
309
+ - "login.py"
310
+ - "logout.py"
311
+ tests:
312
+ - "test_login.py"
313
+
314
+ - name: "database"
315
+ files:
316
+ - "models.py"
317
+ - "queries.py"
318
+ ```
319
+
320
+ ## Data Types
321
+
322
+ ```yaml
323
+ # String
324
+ name: "John Doe"
325
+ name_unquoted: John Doe # Also valid
326
+
327
+ # Number
328
+ age: 30
329
+ price: 19.99
330
+
331
+ # Boolean
332
+ is_active: true
333
+ is_deleted: false
334
+
335
+ # Null
336
+ middle_name: null
337
+ middle_name: ~ # Also null
338
+
339
+ # List
340
+ items:
341
+ - item1
342
+ - item2
343
+
344
+ # Dictionary
345
+ person:
346
+ name: "John"
347
+ age: 30
348
+ ```
349
+
350
+ ## Escaping and Special Characters
351
+
352
+ YAML handles most characters naturally:
353
+
354
+ ```yaml
355
+ # No escaping needed for most cases
356
+ message: "He said: Let's go!"
357
+ path: "C:\Users\Documents"
358
+
359
+ # Use quotes for strings starting with special chars
360
+ special: "- starts with dash"
361
+ colon: ": starts with colon"
362
+
363
+ # Multi-line with special characters
364
+ code: |
365
+ def hello():
366
+ print("Hello, world!")
367
+ return True
368
+ ```
369
+
370
+ ## Common YAML Pitfalls
371
+
372
+ ### ❌ Pitfall 1: Inconsistent Indentation
373
+ ```yaml
374
+ # BAD - Mixed indentation
375
+ task:
376
+ name: "test"
377
+ description: "wrong" # Extra space!
378
+ ```
379
+
380
+ ✅ **Fix:**
381
+ ```yaml
382
+ task:
383
+ name: "test"
384
+ description: "correct"
385
+ ```
386
+
387
+ ### ❌ Pitfall 2: Tabs Instead of Spaces
388
+ ```yaml
389
+ # BAD - Uses tabs (invisible error!)
390
+ task:
391
+ → name: "test" # Tab character
392
+ ```
393
+
394
+ ✅ **Fix:**
395
+ ```yaml
396
+ task:
397
+ name: "test" # Spaces only
398
+ ```
399
+
400
+ ### ❌ Pitfall 3: Unquoted Strings with Colons
401
+ ```yaml
402
+ # BAD - Colon confuses parser
403
+ title: TODO: Fix this
404
+ ```
405
+
406
+ ✅ **Fix:**
407
+ ```yaml
408
+ title: "TODO: Fix this" # Quoted
409
+ ```
410
+
411
+ ## Validation
412
+
413
+ Always validate YAML before use:
414
+
415
+ ```bash
416
+ # Python
417
+ python -c "import yaml; yaml.safe_load(open('prompt.yaml'))"
418
+
419
+ # Online validators
420
+ # yamllint.com
421
+ # yaml-online-parser.appspot.com
422
+ ```
423
+
424
+ ## YAML vs JSON vs XML
425
+
426
+ | Feature | YAML | JSON | XML |
427
+ |---------|------|------|-----|
428
+ | **Readability** | Excellent | Good | Fair |
429
+ | **Comments** | Yes | No | Yes |
430
+ | **Multi-line** | Native | Escaped | CDATA |
431
+ | **Verbosity** | Low | Medium | High |
432
+ | **Parsing** | Slower | Fast | Medium |
433
+ | **Human editing** | Easy | Medium | Hard |
434
+
435
+ **Use YAML when:** Humans frequently edit/read
436
+ **Use JSON when:** Machines parse/generate
437
+ **Use XML when:** Claude + complex hierarchy
438
+
439
+ ## Token Efficiency
440
+
441
+ YAML is moderately efficient:
442
+
443
+ **Example comparison:**
444
+ ```yaml
445
+ # YAML
446
+ person:
447
+ name: John
448
+ age: 30
449
+ ```
450
+
451
+ ```json
452
+ // JSON
453
+ {"person": {"name": "John", "age": 30}}
454
+ ```
455
+
456
+ ```xml
457
+ <!-- XML -->
458
+ <person>
459
+ <name>John</name>
460
+ <age>30</age>
461
+ </person>
462
+ ```
463
+
464
+ **Tokens:**
465
+ - YAML: ~20 tokens
466
+ - JSON: ~25 tokens
467
+ - XML: ~35 tokens
468
+
469
+ YAML is more efficient than XML, comparable to JSON.
470
+
471
+ ## Quick Reference
472
+
473
+ | Aspect | Recommendation |
474
+ |--------|---------------|
475
+ | **Indentation** | 2 spaces (consistent) |
476
+ | **Multi-line** | Use `|` for literal, `>` for folded |
477
+ | **Comments** | Use `#` liberally |
478
+ | **Reuse** | Use anchors `&` and aliases `*` |
479
+ | **Validation** | Always validate before use |
480
+ | **Best for** | Human-editable configs |
481
+
482
+ ---
483
+
484
+ **Related:**
485
+ - [JSON Format](json-format.md) - Machine-readable alternative
486
+ - [XML Format](xml-format.md) - Claude-optimized alternative
487
+ - [Tree of Thoughts](tree-of-thoughts.md) - Good use case for YAML
488
+ - [Decision Matrix](decision_matrix.md) - Format selection guide