v3.4.5: skill-creator design patterns

This commit is contained in:
kochetkov-ma
2026-03-12 08:46:41 +00:00
parent 8fad780235
commit 6db31f88d5
6 changed files with 67 additions and 34 deletions
+3 -3
View File
@@ -6,13 +6,13 @@
},
"metadata": {
"description": "Claude Code plugin suite: brewcode for infinite task execution and brewdoc for documentation tools",
"version": "3.4.4"
"version": "3.4.5"
},
"plugins": [
{
"name": "brewcode",
"description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management",
"version": "3.4.4",
"version": "3.4.5",
"category": "productivity",
"keywords": [
"brewcode",
@@ -46,7 +46,7 @@
{
"name": "brewdoc",
"description": "Brewdoc - Claude Code documentation tools: auto-sync for skills/agents/rules, my-claude installation docs, memory optimization, md-to-pdf conversion",
"version": "3.4.4",
"version": "3.4.5",
"category": "productivity",
"keywords": [
"brewdoc",
+8
View File
@@ -2,6 +2,14 @@
---
## v3.4.5 (2026-03-12)
### brewcode
#### Changed
- **skill-creator agent** — added Skill Design Patterns section: Progressive Disclosure, Reference Splitting, Agents-as-References, Dynamic Context, Context Fork, Executable Bash, Skill Chaining, Background Knowledge, Pushy Description, Preloaded Skills
---
## v3.4.4 (2026-03-06)
### brewcode
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "brewcode",
"version": "3.4.4",
"version": "3.4.5",
"description": "Brewcode - full-featured development platform for Claude Code: infinite focus tasks, prompt optimization, skill/agent creation, quorum reviews, rules management",
"author": {
"name": "Maksim Kochetkov",
+52 -27
View File
@@ -60,16 +60,66 @@ skill-name/
├── references/ # OPT: detailed docs (load on demand)
├── examples/ # OPT: working code examples
├── scripts/ # OPT: executable utilities
── assets/ # OPT: templates, images
── assets/ # OPT: templates, images
└── agents/ # OPT: prompts for subagents (convention, NOT auto-discovered)
```
# Skill Design Patterns
| Pattern | When to Use | Effect |
|---------|-------------|--------|
| **Progressive Disclosure** | Always — every skill | 3 loading levels: L1 name+desc (~100 words, always in context), L2 SKILL.md body (<500 lines, on trigger), L3 references/scripts/agents (on demand, unlimited). Heavy content stays unloaded until needed |
| **Reference Splitting** | Multi-mode skill: 2+ modes, >50 lines/mode, >300 lines total | Detect mode → Read `references/{mode}.md`. Loads only the matching reference. Guard: "If not found → ERROR + STOP" |
| **Agents-as-References** | Skill-coordinator with multi-step workflow and multiple specialized roles | Subagent prompts as `.md` files in `agents/` inside skill dir. Coordinator does NOT read them — passes file path to subagent, subagent does Read itself. **0 tokens** in coordinator context. Pattern from official Anthropic skill-creator. `agents/` is NOT a native feature — it's a convention |
| **Dynamic Context** | Need live data before launch (git diff, PR info, env) | `` !`command` `` executes BEFORE sending to Claude. Output replaces placeholder in SKILL.md |
| **Context Fork** | Standalone task, no conversation history needed, <4 phases | `context: fork` → isolated subagent. SKILL.md = task prompt. CLAUDE.md loaded, history — no. Warning: >5 phases — memory loss |
| **Executable Bash** | Bash blocks must execute, not be examples | **EXECUTE** keyword + `&& echo "✅" \|\| echo "❌"` + `> STOP if ❌`. Without keyword bash blocks are treated as examples |
| **Skill Chaining** | Skill invokes another skill | `Skill` in `allowed-tools`. `Skill(skill="name", args="...")`. Works only in main conversation |
| **Background Knowledge** | Claude needs context, but user doesn't need a slash command | `user-invocable: false`. Description stays in context, Claude decides when to apply |
| **Pushy Description** | LLM-invocable skills | Description includes scenarios and keywords: "Use when - X. Trigger keywords - Y." Raises activation 20% → 50-72% |
| **Preloaded Skills** | Subagent must follow conventions/patterns | `skills: [name]` in agent frontmatter. Full skill content injected at startup. Inverse pattern to `context: fork` |
## Agents-as-References Detail
Pattern from official Anthropic skill-creator plugin. **NOT** a native Claude Code feature — `agents/` inside a skill dir is not auto-discovered.
```
my-skill/
├── SKILL.md # Coordinator
├── agents/ # Subagent prompts (convention, NOT native)
│ ├── researcher.md
│ └── writer.md
├── references/
└── scripts/
```
**How it works:**
```
SKILL.md (coordinator):
→ "Spawn subagent with instructions:"
→ "Read agents/researcher.md at: ${CLAUDE_SKILL_DIR}/agents/researcher.md"
→ Agent(general-purpose, prompt="Read agents/researcher.md ... Execute: ...")
```
Coordinator passes **file path**, not content. Subagent reads the `.md` itself and follows it as instructions.
| Native agents `.claude/agents/` | "Agents" in skill `agents/` |
|---|---|
| Auto-discovered, visible in `/agents` | Only via Read by path |
| Own model, tools, hooks, memory | Inherits from subagent |
| YAML frontmatter + Markdown | Plain Markdown (prompt) |
| Public API | Implementation detail of skill |
**When to use:** skill-coordinator with 2+ roles, need context isolation between roles, prompts are implementation details (not public API).
## Progressive Disclosure
| Level | Content | Budget |
|-------|---------|--------|
| 1 | name + description (always loaded) | ~100 words |
| 2 | SKILL.md body (on trigger) | <500 lines |
| 3 | references/, scripts/ (on demand) | Unlimited |
| 3 | references/, scripts/, agents/ (on demand) | Unlimited |
## SKILL.md Format
@@ -842,18 +892,6 @@ Source: [skills docs](https://code.claude.com/docs/en/skills)
| Critical without slash | Add `disable-model-invocation: true` for critical ops |
| Too many skills | Exceeds `SLASH_COMMAND_TOOL_CHAR_BUDGET` → some invisible |
## Activation Checklist
Before finalizing skill, verify:
- [ ] Description has "Use when -" scenarios
- [ ] Description has "Trigger keywords -" list
- [ ] No summary/explanation in description (only triggers!)
- [ ] Third-person voice ("Deploys..." not "I deploy...")
- [ ] Single line (no multiline `|`), 150-300 chars
- [ ] Critical operations have `disable-model-invocation: true`
- [ ] Test: say trigger phrase → does skill load?
# LLM Text Rules
| Rule | Details |
@@ -917,19 +955,6 @@ Run optimization: `Skill(skill="text-optimize", args="path/to/SKILL.md")`
```
Explicit mention increases activation to ~70%.
## When to Give Up on Auto-Activation
| Scenario | Decision |
|----------|----------|
| Production deployment | `disable-model-invocation: true` |
| Financial operations | `disable-model-invocation: true` |
| Data deletion | `disable-model-invocation: true` |
| Email/notifications | `disable-model-invocation: true` |
| Code formatting | Auto OK (low risk) |
| Documentation | Auto OK (low risk) |
**Rule:** If wrong activation causes damage → don't rely on auto.
# Sources
- [Claude Code Skills](https://code.claude.com/docs/en/skills) — official docs, string substitutions table
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "claude-plugin-brewcode",
"version": "3.4.4",
"version": "3.4.5",
"description": "Infinite task execution with automatic handoff for Claude Code",
"keywords": [
"claude-code",
@@ -36,6 +36,6 @@
},
"claude-plugin": {
"name": "brewcode",
"version": "3.4.4"
"version": "3.4.5"
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "brewdoc",
"version": "3.4.4",
"version": "3.4.5",
"description": "Brewdoc - Claude Code documentation tools: auto-sync for skills/agents/rules, my-claude installation docs, memory optimization",
"author": {
"name": "Maksim Kochetkov",