Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Systematic methodology for constructing compact (<150 lines), expressive, Claude Code-integrated subagent prompts using lambda contracts and symbolic logic. Use when creating new specialized subagents for Claude Code with agent composition, MCP tool integration, or skill references. Validated with phase-planner-executor (V_instance=0.895).
.claude/skills/majiayu000-subagent-prompt-construction/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 16% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 42% | 0% |
λ(use_case, complexity) → subagent_prompt | ∧ require(need_orchestration(use_case) ∨ need_mcp_integration(use_case)) ∧ complexity ∈ {simple, moderate, complex} ∧ line_target = {simple: 30-60, moderate: 60-120, complex: 120-150} ∧ template = read(templates/subagent-template.md) ∧ patterns = read(reference/patterns.md) ∧ integration = read(reference/integration-patterns.md) ∧ apply(template, use_case, patterns, integration) → draft ∧ validate(|draft| ≤ 150 ∧ integration_score ≥ 0.50 ∧ clarity ≥ 0.80) ∧ examples/{phase-planner-executor.md} demonstrates orchestration ∧ reference/case-studies/ provides detailed analysis ∧ scripts/ provide validation and metrics automation ∧ output = {prompt: draft, metrics: validation_report}
Artifacts:
Usage: See templates/subagent-template.md for structure. Apply integration patterns for Claude Code features. Validate compactness (≤150 lines), integration (≥1 feature), clarity. Reference examples/ for compact demonstrations and case-studies/ for detailed analysis.
Constraints: Max 150 lines per prompt | Use symbolic logic for compactness | Explicit dependencies section | Integration score ≥0.50 | Test coverage ≥80% for generated artifacts
Validation: V_instance=0.895 (phase-planner-executor: 92 lines, 2 agents, 2 MCP tools) | V_meta=0.709 (compactness=0.65, integration=0.857, maintainability=0.85) | Transferability=95%
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-04 | pass→pass | 5,297 | 11,522 | +118% | 1 | 1 | 0% | 940 | 1,676 | +78% | 0 | 0 | — |
case-03 | fail→pass | 33,782 | 41,713 | +23% | 1 | 1 | 0% | 5,150 | 7,776 | +51% | 0 | 0 | — |
case-01 | fail→pass | 25,824 | 30,150 | +17% | 1 | 1 | 0% | 4,745 | 5,167 | +9% | 0 | 0 | — |
case-02 | fail→pass | 26,282 | 19,278 | -27% | 1 | 1 | 0% | 3,467 | 4,032 | +16% | 0 | 0 | — |
case-05 | pass→fail | 20,280 | 45,155 | +123% | 1 | 1 | 0% | 3,913 | 8,751 | +124% | 0 | 0 | — |
case-06 | pass→pass | 21,042 | 23,911 | +14% | 1 | 1 | 0% | 4,614 | 4,726 | +2% | 0 | 0 | — |
case-07 | fail→pass | 14,660 | 17,531 | +20% | 1 | 1 | 0% | 2,466 | 2,697 | +9% | 0 | 0 | — |
case-08 | fail→pass | 11,562 | 17,095 | +48% | 1 | 1 | 0% | 1,812 | 2,578 | +42% | 0 | 0 | — |
case-09 | fail→fail | 29,165 | 25,521 | -12% | 1 | 1 | 0% | 4,814 | 5,343 | +11% | 0 | 0 | — |
case-10 | fail→pass | 25,187 | 28,885 | +15% | 1 | 1 | 0% | 3,296 | 4,622 | +40% | 0 | 0 | — |
case-11 | fail→fail | 18,594 | 57,520 | +209% | 1 | 1 | 0% | 2,109 | 8,767 | +316% | 0 | 0 | — |
case-12 | fail→pass | 30,033 | 28,797 | -4% | 1 | 1 | 0% | 3,953 | 5,689 | +44% | 0 | 0 | — |
case-13 | fail→pass | 35,541 | 30,436 | -14% | 1 | 1 | 0% | 5,305 | 5,341 | +1% | 0 | 0 | — |
case-14 | fail→pass | 47,041 | 22,946 | -51% | 1 | 1 | 0% | 8,223 | 4,742 | -42% | 0 | 0 | — |
case-15 | fail→pass | 27,347 | 17,843 | -35% | 1 | 1 | 0% | 4,135 | 3,112 | -25% | 0 | 0 | — |
case-16 | pass→pass | 13,299 | 24,165 | +82% | 1 | 1 | 0% | 2,540 | 5,669 | +123% | 0 | 0 | — |
case-17 | pass→pass | 12,697 | 18,482 | +46% | 1 | 1 | 0% | 2,081 | 3,844 | +85% | 0 | 0 | — |
case-18 | fail→pass | 16,083 | 22,870 | +42% | 1 | 1 | 0% | 1,783 | 4,491 | +152% | 0 | 0 | — |
case-19 | fail→pass | 20,278 | 20,455 | +1% | 1 | 1 | 0% | 2,457 | 3,028 | +23% | 0 | 0 | — |
case-20 | fail→pass | 24,705 | 19,706 | -20% | 1 | 1 | 0% | 3,514 | 4,279 | +22% | 0 | 0 | — |
case-21 | pass→pass | 24,604 | 21,515 | -13% | 1 | 1 | 0% | 3,142 | 4,486 | +43% | 0 | 0 | — |
case-22 | pass→pass | 32,412 | 18,290 | -44% | 1 | 1 | 0% | 4,684 | 4,107 | -12% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +55 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.