codeforge-dev 1.4.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 (131) hide show
  1. package/.devcontainer/.env +22 -0
  2. package/.devcontainer/CHANGELOG.md +197 -0
  3. package/.devcontainer/CLAUDE.md +117 -0
  4. package/.devcontainer/README.md +222 -0
  5. package/.devcontainer/config/main-system-prompt.md +502 -0
  6. package/.devcontainer/config/settings.json +47 -0
  7. package/.devcontainer/devcontainer.json +94 -0
  8. package/.devcontainer/features/README.md +113 -0
  9. package/.devcontainer/features/agent-browser/README.md +65 -0
  10. package/.devcontainer/features/agent-browser/devcontainer-feature.json +23 -0
  11. package/.devcontainer/features/agent-browser/install.sh +79 -0
  12. package/.devcontainer/features/ast-grep/README.md +24 -0
  13. package/.devcontainer/features/ast-grep/devcontainer-feature.json +24 -0
  14. package/.devcontainer/features/ast-grep/install.sh +51 -0
  15. package/.devcontainer/features/ccstatusline/README.md +296 -0
  16. package/.devcontainer/features/ccstatusline/devcontainer-feature.json +19 -0
  17. package/.devcontainer/features/ccstatusline/install.sh +290 -0
  18. package/.devcontainer/features/ccusage/README.md +205 -0
  19. package/.devcontainer/features/ccusage/devcontainer-feature.json +38 -0
  20. package/.devcontainer/features/ccusage/install.sh +132 -0
  21. package/.devcontainer/features/claude-code/README.md +498 -0
  22. package/.devcontainer/features/claude-code/config/settings.json +36 -0
  23. package/.devcontainer/features/claude-code/config/system-prompt.md +118 -0
  24. package/.devcontainer/features/claude-code/config/world-building-sp.md +1432 -0
  25. package/.devcontainer/features/claude-code/devcontainer-feature.json +42 -0
  26. package/.devcontainer/features/claude-code/install.sh +466 -0
  27. package/.devcontainer/features/claude-monitor/README.md +74 -0
  28. package/.devcontainer/features/claude-monitor/devcontainer-feature.json +38 -0
  29. package/.devcontainer/features/claude-monitor/install.sh +99 -0
  30. package/.devcontainer/features/lsp-servers/README.md +85 -0
  31. package/.devcontainer/features/lsp-servers/devcontainer-feature.json +40 -0
  32. package/.devcontainer/features/lsp-servers/install.sh +116 -0
  33. package/.devcontainer/features/mcp-qdrant/CHANGES.md +399 -0
  34. package/.devcontainer/features/mcp-qdrant/README.md +474 -0
  35. package/.devcontainer/features/mcp-qdrant/devcontainer-feature.json +57 -0
  36. package/.devcontainer/features/mcp-qdrant/install.sh +295 -0
  37. package/.devcontainer/features/mcp-qdrant/poststart-hook.sh +129 -0
  38. package/.devcontainer/features/mcp-reasoner/README.md +177 -0
  39. package/.devcontainer/features/mcp-reasoner/devcontainer-feature.json +20 -0
  40. package/.devcontainer/features/mcp-reasoner/install.sh +177 -0
  41. package/.devcontainer/features/mcp-reasoner/poststart-hook.sh +67 -0
  42. package/.devcontainer/features/notify-hook/README.md +86 -0
  43. package/.devcontainer/features/notify-hook/devcontainer-feature.json +23 -0
  44. package/.devcontainer/features/notify-hook/install.sh +38 -0
  45. package/.devcontainer/features/splitrail/README.md +140 -0
  46. package/.devcontainer/features/splitrail/devcontainer-feature.json +34 -0
  47. package/.devcontainer/features/splitrail/install.sh +129 -0
  48. package/.devcontainer/features/tree-sitter/README.md +138 -0
  49. package/.devcontainer/features/tree-sitter/devcontainer-feature.json +52 -0
  50. package/.devcontainer/features/tree-sitter/install.sh +173 -0
  51. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +106 -0
  52. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/.claude-plugin/plugin.json +7 -0
  53. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/hooks/hooks.json +17 -0
  54. package/.devcontainer/plugins/devs-marketplace/plugins/auto-formatter/scripts/format-file.py +101 -0
  55. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/.claude-plugin/plugin.json +7 -0
  56. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/hooks/hooks.json +17 -0
  57. package/.devcontainer/plugins/devs-marketplace/plugins/auto-linter/scripts/lint-file.py +137 -0
  58. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/.claude-plugin/plugin.json +8 -0
  59. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/SKILL.md +387 -0
  60. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/cli-flags-and-output.md +312 -0
  61. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/claude-code-headless/references/sdk-and-mcp.md +569 -0
  62. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/SKILL.md +309 -0
  63. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/compose-services.md +438 -0
  64. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker/references/dockerfile-patterns.md +340 -0
  65. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/SKILL.md +412 -0
  66. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/container-lifecycle.md +388 -0
  67. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/docker-py/references/resources-and-security.md +444 -0
  68. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/SKILL.md +344 -0
  69. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/middleware-and-lifespan.md +254 -0
  70. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/pydantic-models.md +245 -0
  71. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/routing-and-dependencies.md +255 -0
  72. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/fastapi/references/sse-and-streaming.md +318 -0
  73. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/SKILL.md +345 -0
  74. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/agents-and-tools.md +271 -0
  75. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/pydantic-ai/references/models-and-streaming.md +422 -0
  76. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/SKILL.md +220 -0
  77. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/cross-vendor-principles.md +139 -0
  78. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/patterns-and-antipatterns.md +376 -0
  79. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/skill-building/references/skill-authoring-patterns.md +356 -0
  80. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/SKILL.md +329 -0
  81. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/advanced-queries.md +314 -0
  82. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/javascript-patterns.md +323 -0
  83. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/python-patterns.md +354 -0
  84. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/sqlite/references/schema-and-pragmas.md +326 -0
  85. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/SKILL.md +356 -0
  86. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/ai-sdk-svelte.md +128 -0
  87. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/component-patterns.md +332 -0
  88. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/layercake.md +203 -0
  89. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/migration-guide.md +350 -0
  90. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/runes-and-reactivity.md +328 -0
  91. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/spa-and-routing.md +262 -0
  92. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/svelte5/references/svelte-dnd-action.md +181 -0
  93. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/SKILL.md +414 -0
  94. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/fastapi-testing.md +411 -0
  95. package/.devcontainer/plugins/devs-marketplace/plugins/codedirective-skills/skills/testing/references/svelte-testing.md +538 -0
  96. package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +7 -0
  97. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/.claude-plugin/plugin.json +7 -0
  98. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/hooks/hooks.json +17 -0
  99. package/.devcontainer/plugins/devs-marketplace/plugins/dangerous-command-blocker/scripts/block-dangerous.py +110 -0
  100. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/.claude-plugin/plugin.json +7 -0
  101. package/.devcontainer/plugins/devs-marketplace/plugins/notify-hook/hooks/hooks.json +17 -0
  102. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/.claude-plugin/plugin.json +7 -0
  103. package/.devcontainer/plugins/devs-marketplace/plugins/planning-reminder/hooks/hooks.json +17 -0
  104. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/.claude-plugin/plugin.json +7 -0
  105. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/hooks/hooks.json +17 -0
  106. package/.devcontainer/plugins/devs-marketplace/plugins/protected-files-guard/scripts/guard-protected.py +108 -0
  107. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272create-pr.md +337 -0
  108. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272new.md +166 -0
  109. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272review-commit.md +290 -0
  110. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/commands/ticket/357/200/272work.md +257 -0
  111. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/plugin.json +8 -0
  112. package/.devcontainer/plugins/devs-marketplace/plugins/ticket-workflow/.claude-plugin/system-prompt.md +184 -0
  113. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/.claude-plugin/plugin.json +6 -0
  114. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/config/planning-instructions.md +14 -0
  115. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/functional-conjuring-map.md +989 -0
  116. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/hooks/hooks.json +33 -0
  117. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/__pycache__/post-enhance-task.cpython-314.pyc +0 -0
  118. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhance-planning.py +71 -0
  119. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-plan.sh +68 -0
  120. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/enhancers/enhance-task.sh +120 -0
  121. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-plan.py +133 -0
  122. package/.devcontainer/plugins/devs-marketplace/plugins/workflow-enhancer/scripts/post-enhance-task.py +253 -0
  123. package/.devcontainer/scripts/setup-aliases.sh +80 -0
  124. package/.devcontainer/scripts/setup-config.sh +28 -0
  125. package/.devcontainer/scripts/setup-irie-claude.sh +32 -0
  126. package/.devcontainer/scripts/setup-plugins.sh +80 -0
  127. package/.devcontainer/scripts/setup.sh +58 -0
  128. package/LICENSE.txt +674 -0
  129. package/README.md +267 -0
  130. package/package.json +44 -0
  131. package/setup.js +83 -0
@@ -0,0 +1,220 @@
1
+ ---
2
+ name: skill-building
3
+ description: >-
4
+ This skill should be used when the user asks to "build a skill", "write a
5
+ SKILL.md", "create a Claude Code skill", "design skill instructions",
6
+ "improve a skill description", "optimize skill content", "write effective
7
+ prompts for skills", or discusses skill authoring best practices, progressive
8
+ disclosure, or cross-vendor prompt engineering principles for Claude Code
9
+ plugins.
10
+ version: 0.1.0
11
+ ---
12
+
13
+ # Skill Building for Claude Code Plugins
14
+
15
+ This skill provides cross-vendor principles and actionable guidance for building effective Claude Code plugin skills. It synthesizes best practices from Anthropic, OpenAI, and Google/Gemini into a unified methodology applicable to any LLM-backed skill system.
16
+
17
+ ## Mental Model
18
+
19
+ Think of a skill as onboarding material for a brilliant new hire with zero context. The hire possesses strong general reasoning but lacks project-specific knowledge, procedural workflows, and institutional conventions. The skill bridges that gap with precise, lean instructions -- not a textbook, but a field manual.
20
+
21
+ Every token loaded into context consumes attention budget. Maximize signal-to-noise ratio. Include only what changes behavior; omit what the model already knows.
22
+
23
+ ## Skill Creation Process
24
+
25
+ ### Step 1: Define Concrete Use Cases
26
+
27
+ Before writing anything, enumerate 5-10 concrete user requests that should trigger the skill. These examples anchor every subsequent decision.
28
+
29
+ Example prompts for an image-editor skill:
30
+ - "Remove red-eye from this photo"
31
+ - "Crop and resize this image to 1200x630"
32
+ - "Convert this PNG to WebP"
33
+
34
+ Apply the Intern Test: hand these examples to someone with no context. Could they determine what the skill covers and what falls outside its scope? If not, refine until the boundary is crisp.
35
+
36
+ ### Step 2: Identify Reusable Resources
37
+
38
+ Analyze each use case. Determine what gets repeated across invocations:
39
+
40
+ | Repeated Element | Solution |
41
+ |---|---|
42
+ | Same code rewritten each time | `scripts/` -- deterministic, token-efficient |
43
+ | Same reference material consulted | `references/` -- loaded on demand |
44
+ | Same boilerplate copied | `assets/` -- templates, not context |
45
+
46
+ ### Step 3: Create Directory Structure
47
+
48
+ ```
49
+ skill-name/
50
+ ├── SKILL.md # Core instructions (1,500-2,000 words)
51
+ ├── references/ # Detailed knowledge, loaded as needed
52
+ ├── scripts/ # Deterministic operations
53
+ └── assets/ # Output templates, not loaded into context
54
+ ```
55
+
56
+ Create only the directories the skill actually requires.
57
+
58
+ ### Step 4: Write the Description Field
59
+
60
+ The description is the most critical field. It controls semantic routing -- determining WHEN the skill activates, not just WHAT it does.
61
+
62
+ **Structure:** Third-person, trigger-phrase-rich, specific.
63
+
64
+ ```yaml
65
+ description: >-
66
+ This skill should be used when the user asks to "exact phrase 1",
67
+ "exact phrase 2", "exact phrase 3", or discusses topic-area.
68
+ Provides concise-summary-of-capability.
69
+ ```
70
+
71
+ **Rules for effective descriptions:**
72
+ - Include 5-8 specific trigger phrases users would actually say
73
+ - Use quoted phrases for exact match triggers
74
+ - State the capability domain, not implementation details
75
+ - Communicate WHEN to activate, not HOW the skill works internally
76
+ - Avoid vague language ("helps with", "provides guidance on")
77
+ - Never use second person
78
+
79
+ **Test the description** by reading it alongside other skill descriptions. Would the routing system correctly select this skill for the target use cases and correctly reject it for unrelated requests? Overlap between skill descriptions wastes reasoning capacity on disambiguation.
80
+
81
+ ### Step 5: Write the SKILL.md Body
82
+
83
+ #### Altitude Calibration
84
+
85
+ Aim for the Goldilocks zone: specific enough to guide behavior, flexible enough to allow model heuristics. Overly prescriptive instructions cause brittle behavior. Overly vague instructions produce generic output.
86
+
87
+ **Too high (vague):**
88
+ ```
89
+ Handle errors appropriately.
90
+ ```
91
+
92
+ **Too low (brittle):**
93
+ ```
94
+ Catch ValueError on line 42. Log to stderr with format "ERR-{timestamp}-{code}". Retry exactly 3 times with 1.5s backoff. Then raise SystemExit(1).
95
+ ```
96
+
97
+ **Goldilocks:**
98
+ ```
99
+ Handle errors at domain boundaries. Log with enough context to diagnose without reproduction. Retry transient failures with backoff. Fail fast on unrecoverable errors.
100
+ ```
101
+
102
+ #### Writing Principles
103
+
104
+ 1. **Imperative form.** Write "Validate inputs before processing" not "You should validate inputs." Every instruction begins with a verb.
105
+
106
+ 2. **Positive framing.** State what to DO, not what NOT to do. Negations cause over-indexing -- the model fixates on the prohibited behavior. Transform "Do not use hardcoded paths" into "Use `${CLAUDE_PLUGIN_ROOT}` for all file references."
107
+
108
+ 3. **Why before what.** Explain the reason behind each instruction. An instruction with rationale is followed more reliably than a bare command, because the model can apply the underlying principle to novel situations.
109
+
110
+ 4. **Concrete examples over verbose rules.** A single well-chosen example communicates more than three paragraphs of explanation. Use 2-3 high-relevance examples rather than many low-relevance ones.
111
+
112
+ 5. **Eliminate contradictions.** Contradictory instructions waste reasoning capacity. When two instructions conflict, the model must choose -- and may choose wrong. Audit for consistency before finalizing.
113
+
114
+ 6. **Structure for parseability.** Place context first, instructions in the middle, constraints last. Use headers, tables, and code blocks. Make the document scannable, not a wall of prose.
115
+
116
+ 7. **One skill, one capability.** Keep skills narrow and modular. A skill that tries to cover too much triggers on the wrong queries and dilutes instruction quality. Split broad skills into focused ones.
117
+
118
+ ### Step 6: Apply Progressive Disclosure
119
+
120
+ Distribute content across three tiers based on loading cost and access frequency:
121
+
122
+ **Tier 1 -- Metadata (always loaded, ~100 words):**
123
+ - `name` and `description` in YAML frontmatter
124
+ - Controls routing; loaded for every conversation turn
125
+ - Optimize ruthlessly -- every word here has maximum weight
126
+
127
+ **Tier 2 -- SKILL.md body (loaded on activation, 1,500-2,000 words):**
128
+ - Core procedures, decision trees, quick references
129
+ - Essential patterns the model needs on every invocation
130
+ - Pointers to Tier 3 resources
131
+
132
+ **Tier 3 -- Bundled resources (loaded on demand, unlimited):**
133
+ - `references/` -- detailed documentation, schemas, advanced techniques
134
+ - `scripts/` -- executable code for deterministic tasks
135
+ - `assets/` -- templates and output files
136
+
137
+ **Rule of thumb:** If removing a section from SKILL.md would not degrade the most common use case, move it to `references/`. If a section contains information the model would reliably generate on its own, remove it entirely.
138
+
139
+ For large reference files (>10k words), include grep search patterns in SKILL.md so the model can locate specific sections without reading the entire file.
140
+
141
+ ### Step 7: Define Ambiguity Policy
142
+
143
+ Specify explicitly when to assume defaults versus when to ask the user for clarification. Undefined ambiguity policy leads to inconsistent behavior -- sometimes the model guesses, sometimes it asks, with no predictable pattern.
144
+
145
+ ```markdown
146
+ ## Ambiguity Policy
147
+ - When file format is unspecified, default to the project's dominant format.
148
+ - When scope is unclear, present interpretation and await confirmation before executing.
149
+ - When multiple valid approaches exist, state the tradeoff and recommend one. Proceed only after approval.
150
+ ```
151
+
152
+ ### Step 8: Validate Before Finalizing
153
+
154
+ Run through this checklist:
155
+
156
+ **Structure:**
157
+ - [ ] SKILL.md has valid YAML frontmatter with `name` and `description`
158
+ - [ ] Body is 1,500-2,000 words (under 3,000 absolute maximum)
159
+ - [ ] All referenced files exist in `references/`, `scripts/`, `assets/`
160
+
161
+ **Description:**
162
+ - [ ] Third person ("This skill should be used when...")
163
+ - [ ] Contains 5-8 specific trigger phrases in quotes
164
+ - [ ] No overlap with other skills' trigger phrases
165
+ - [ ] Passes the routing test: activates for target queries, rejects unrelated ones
166
+
167
+ **Content:**
168
+ - [ ] Imperative/infinitive form throughout -- no second person
169
+ - [ ] Positive framing -- instructions state what to do, not what to avoid
170
+ - [ ] Why explained alongside what for non-obvious instructions
171
+ - [ ] Concrete examples for complex concepts
172
+ - [ ] No contradictions between instructions
173
+ - [ ] No duplicated content between SKILL.md and references/
174
+
175
+ **Progressive Disclosure:**
176
+ - [ ] Core workflow in SKILL.md
177
+ - [ ] Detailed content in references/
178
+ - [ ] SKILL.md contains explicit pointers to reference files
179
+ - [ ] Deterministic operations in scripts/
180
+
181
+ ### Step 9: Iterate with Evidence
182
+
183
+ Start minimal. Observe failure modes in actual usage. Add instructions only where the model demonstrably fails without them. Resist the urge to preemptively specify every edge case -- newer models handle ambiguity better than older ones.
184
+
185
+ Track which instructions change behavior versus which are ignored or already followed by default. Remove instructions that have no measurable effect; they consume attention budget without providing value.
186
+
187
+ ## Five Skill Authoring Patterns
188
+
189
+ Select the pattern that matches the skill's complexity. Consult `references/skill-authoring-patterns.md` for detailed guidance on each pattern.
190
+
191
+ | Pattern | When to Use | Example |
192
+ |---|---|---|
193
+ | Instruction-Only | Pure knowledge, no resources | Coding standards |
194
+ | Asset Utilization | Templates or reference data | Frontend boilerplate |
195
+ | Few-Shot | Output format matters | Commit message style |
196
+ | Procedural Logic | Multi-step deterministic workflow | PDF processing |
197
+ | Complex Orchestration | Multiple tools + conditional flow | Full CI/CD pipeline |
198
+
199
+ ## Six Behavioral Dimensions
200
+
201
+ Evaluate skill instructions against these dimensions to ensure comprehensive coverage:
202
+
203
+ 1. **Reasoning** -- How to approach problems and make decisions
204
+ 2. **Diagnosis** -- How to investigate and root-cause issues
205
+ 3. **Exhaustiveness** -- How thorough to be (depth vs. breadth tradeoff)
206
+ 4. **Adaptability** -- How to handle novel or unexpected situations
207
+ 5. **Persistence** -- When to keep trying vs. when to stop and ask
208
+ 6. **Risk Assessment** -- How to evaluate and communicate risk
209
+
210
+ Not every skill needs all six. Select dimensions relevant to the skill's domain.
211
+
212
+ ## Additional Resources
213
+
214
+ ### Reference Files
215
+
216
+ For detailed principles and patterns, consult:
217
+
218
+ - **`references/cross-vendor-principles.md`** -- Comprehensive synthesis of Anthropic, OpenAI, and Google/Gemini prompt engineering principles organized by theme
219
+ - **`references/patterns-and-antipatterns.md`** -- Concrete before/after examples of effective and ineffective skill writing
220
+ - **`references/skill-authoring-patterns.md`** -- The five authoring patterns with implementation guidance and examples for each
@@ -0,0 +1,139 @@
1
+ # Cross-Vendor Skill Authoring Principles
2
+
3
+ This reference synthesizes prompt engineering and skill authoring principles from three major AI vendors: Anthropic (Claude), OpenAI (GPT/ChatGPT), and Google (Gemini). Principles are organized by theme, with vendor attribution, to reveal convergence and highlight vendor-specific insights.
4
+
5
+ ## 1. Context Management and Token Economy
6
+
7
+ ### Anthropic
8
+ - **Attention budget.** Every token consumes attention. Maximize signal-to-noise ratio. Remove anything that does not change behavior.
9
+ - **Progressive disclosure.** Three tiers: metadata (~100 words, always loaded), SKILL.md body (<5k words, loaded on activation), bundled resources (loaded on demand). Load only what is needed, when it is needed.
10
+ - **Just-in-time context.** Defer loading detailed reference material until the model determines it is relevant. Avoid frontloading large documents.
11
+
12
+ ### OpenAI
13
+ - **System prompt sections.** Structure system prompts into clear sections: Identity, Instructions, Output Format, Examples, Context. Each section serves a distinct purpose and can be independently maintained.
14
+ - **Combine sequential functions.** When two functions are always called in sequence, combine them into one to reduce overhead.
15
+ - **Fewer high-relevance examples.** Two or three precisely targeted examples outperform ten loosely related ones.
16
+
17
+ ### Google/Gemini
18
+ - **Precision over verbosity.** Shorter, more precise instructions outperform longer, vaguer ones. Remove filler and hedge words.
19
+ - **Structure matters.** Place context first, instructions in the middle, constraints last. This ordering aligns with how models process sequential input.
20
+ - **Delegate deterministic work.** Offload deterministic operations to scripts. Reserve the model's reasoning capacity for tasks requiring judgment.
21
+
22
+ ### Unified Principle
23
+ Treat context as a scarce resource. Load information progressively, structure it for efficient parsing, and delegate deterministic work to scripts. Every token should earn its place.
24
+
25
+ ---
26
+
27
+ ## 2. Instruction Framing
28
+
29
+ ### Anthropic
30
+ - **Positive framing.** Tell what to DO, not what NOT to do. Negations cause the model to fixate on the prohibited behavior, increasing the likelihood of exhibiting it.
31
+ - **Why behind what.** Explain the rationale for instructions. Instructions with reasoning attached are followed more reliably because the model can generalize the underlying principle.
32
+ - **Altitude calibration (Goldilocks zone).** Instructions must be specific enough to change behavior but flexible enough to allow the model's own heuristics. Too specific causes brittleness; too vague produces generic output.
33
+
34
+ ### OpenAI
35
+ - **Imperative, step-by-step.** Write instructions as clear sequential steps in imperative form. Numbered steps for procedures, bullet points for parallel options.
36
+ - **Eliminate contradictions.** Contradictory instructions force the model to choose between them, wasting reasoning capacity and producing unpredictable results.
37
+ - **The Intern Test.** Could someone with no project context follow these instructions to produce the desired result? If not, the instructions lack sufficient detail or clarity.
38
+
39
+ ### Google/Gemini
40
+ - **Positive instructions.** Avoid broad negations. "Do not" instructions cause over-indexing -- the model allocates disproportionate attention to the negated behavior. Reframe as positive directives.
41
+ - **Examples beat rules.** A well-chosen example communicates constraints, format, and style simultaneously. Rules require interpretation; examples are unambiguous.
42
+ - **Explicit ambiguity policy.** Define when the model should assume a default versus when it should ask for clarification. Undefined ambiguity policy creates inconsistent behavior.
43
+
44
+ ### Unified Principle
45
+ Frame instructions positively, in imperative form, with rationale attached. Use examples to demonstrate expected behavior. Define how to handle ambiguity. Test instructions against the Intern Test for clarity. Aim for the altitude that guides without constraining.
46
+
47
+ ---
48
+
49
+ ## 3. Description and Routing
50
+
51
+ ### Anthropic
52
+ - **Descriptions determine activation.** The description field is the most critical piece of metadata. It controls whether the skill loads -- all other content is irrelevant if the skill never activates.
53
+ - **Activation, not explanation.** Descriptions should communicate when to trigger, not how the skill works internally.
54
+
55
+ ### OpenAI
56
+ - **Use enums and structure.** Constrain inputs to valid states where possible. Make invalid activation states unrepresentable through precise description language.
57
+ - **Keep skills narrow and modular.** One skill, one capability. Broad skills trigger on unrelated queries and dilute instruction quality.
58
+
59
+ ### Google/Gemini
60
+ - **Semantic routing via descriptions.** Descriptions serve as routing keys. Communicate WHEN the skill applies (trigger conditions) rather than WHAT it contains (implementation details).
61
+ - **Five patterns.** Different skill types require different description strategies. An instruction-only skill needs different trigger phrases than a complex orchestration skill.
62
+
63
+ ### Unified Principle
64
+ The description is a routing mechanism, not documentation. Include specific trigger phrases users would actually say. Keep each skill focused on a single capability to avoid routing ambiguity.
65
+
66
+ ---
67
+
68
+ ## 4. Modularity and Skill Scope
69
+
70
+ ### Anthropic
71
+ - **Start minimal.** Begin with the simplest possible skill. Add instructions only when observed failure modes justify them. Resist preemptive over-specification.
72
+ - **Dial back for newer models.** More capable models require less prescriptive instructions. Overly aggressive prompting for advanced models wastes tokens and can degrade performance by over-constraining.
73
+
74
+ ### OpenAI
75
+ - **One skill, one capability.** Each skill should do one thing well. Modular skills compose better than monolithic ones.
76
+ - **Three agentic reminders.** For agentic skills, reinforce: persistence (keep working until complete), tool-calling (use available tools), planning (think before acting).
77
+
78
+ ### Google/Gemini
79
+ - **Five complexity levels.** Match the skill pattern to the task complexity. Simple tasks need Instruction-Only skills; complex multi-tool workflows need Complex Orchestration skills. Mismatched complexity causes either over-engineering or under-specification.
80
+ - **Six behavioral dimensions.** Evaluate skills across reasoning, diagnosis, exhaustiveness, adaptability, persistence, and risk assessment. Not every skill needs all six -- select the dimensions relevant to the domain.
81
+
82
+ ### Unified Principle
83
+ Start simple. Match skill complexity to task complexity. Keep each skill focused on one domain. For agentic workflows, explicitly encode persistence and planning expectations.
84
+
85
+ ---
86
+
87
+ ## 5. Examples and Few-Shot Patterns
88
+
89
+ ### Anthropic
90
+ - **Concrete examples over verbose rules.** Examples communicate format, style, and constraints simultaneously. Replace lengthy rule sets with well-chosen demonstrations.
91
+ - **Use scripts for deterministic operations.** When the same code gets rewritten each invocation, bundle it as a script.
92
+
93
+ ### OpenAI
94
+ - **Fewer, higher-relevance examples.** Two precisely targeted examples outperform ten loosely related ones. Each example should demonstrate a distinct aspect of the expected behavior.
95
+ - **Iterate with evals.** Test skills against evaluation datasets. Measure quality. Refine based on metrics, not intuition.
96
+
97
+ ### Google/Gemini
98
+ - **Few-shot as a skill pattern.** Few-shot examples constitute a distinct authoring pattern. Use when output format, style, or structure is critical.
99
+ - **Input-output pairs.** Structure examples as clear input-output pairs. Include edge cases that demonstrate boundary handling.
100
+
101
+ ### Unified Principle
102
+ Use 2-5 high-relevance examples. Structure them as input-output pairs. Each example should demonstrate a distinct behavior. Validate with real test cases.
103
+
104
+ ---
105
+
106
+ ## 6. Structure and Organization
107
+
108
+ ### Anthropic
109
+ - **Three-tier progressive disclosure.** Metadata (always loaded), core instructions (loaded on activation), supporting files (loaded on demand). This maps to the natural hierarchy of skill content.
110
+
111
+ ### OpenAI
112
+ - **System prompt sections.** Identity, Instructions, Output Format, Examples, Context. Each section has a clear role. Maintain this structure for consistency.
113
+ - **Make invalid states unrepresentable.** Use structured formats (enums, schemas, tables) to constrain the model's output space.
114
+
115
+ ### Google/Gemini
116
+ - **Context-Instructions-Constraints ordering.** Place background context first, procedural instructions in the middle, and constraints/guardrails last. This ordering optimizes model processing.
117
+ - **Structured output.** Use markdown tables, code blocks, and clear headers. Structured documents are parsed more reliably than prose.
118
+
119
+ ### Unified Principle
120
+ Organize skill content hierarchically: context, then instructions, then constraints. Use structured formats (tables, code blocks, headers) for scannability. Leverage progressive disclosure to manage context window efficiently.
121
+
122
+ ---
123
+
124
+ ## 7. Iteration and Maintenance
125
+
126
+ ### Anthropic
127
+ - **Start minimal, add on failure.** Begin with the fewest instructions possible. Add only when the model demonstrably fails without them.
128
+ - **Dial back aggressive prompting.** As models improve, instructions that were once necessary may become counterproductive. Periodically audit and trim.
129
+
130
+ ### OpenAI
131
+ - **Iterate with evals.** Create evaluation datasets. Test systematically. Measure before and after changes. Never rely on intuition alone.
132
+ - **Persistence reminder.** When skills involve multi-step tasks, remind the model to persist through completion rather than stopping early.
133
+
134
+ ### Google/Gemini
135
+ - **Six behavioral dimensions as evaluation axes.** Assess skill quality across reasoning, diagnosis, exhaustiveness, adaptability, persistence, and risk assessment.
136
+ - **Pattern evolution.** As skills mature, they may graduate from simpler patterns (Instruction-Only) to more complex ones (Procedural Logic, Complex Orchestration).
137
+
138
+ ### Unified Principle
139
+ Iteration is the core loop. Start minimal, test against real usage, add instructions only where failure is observed, and periodically remove instructions that newer models no longer need. Use structured evaluation, not intuition.