claude-dev-env 1.38.1 → 1.40.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.
- package/CLAUDE.md +10 -36
- package/_shared/pr-loop/audit-reply-template.md +147 -0
- package/_shared/pr-loop/fix-protocol.md +25 -4
- package/_shared/pr-loop/gh-payloads.md +37 -50
- package/_shared/pr-loop/scripts/code_rules_gate.py +0 -60
- package/_shared/pr-loop/scripts/config/post_audit_thread_constants.py +199 -0
- package/_shared/pr-loop/scripts/config/reviews_disabled_constants.py +8 -0
- package/_shared/pr-loop/scripts/post_audit_thread.py +1242 -0
- package/_shared/pr-loop/scripts/preflight.py +129 -2
- package/_shared/pr-loop/scripts/reviews_disabled.py +59 -0
- package/_shared/pr-loop/scripts/tests/test_code_rules_gate.py +0 -19
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread.py +1116 -0
- package/_shared/pr-loop/scripts/tests/test_post_audit_thread_constants.py +127 -0
- package/_shared/pr-loop/scripts/tests/test_preflight.py +41 -0
- package/_shared/pr-loop/scripts/tests/test_reviews_disabled.py +36 -0
- package/_shared/pr-loop/state-schema.md +1 -1
- package/agents/clean-coder.md +2 -2
- package/agents/pr-description-writer.md +150 -52
- package/bin/install.mjs +6 -7
- package/bin/install.test.mjs +8 -0
- package/commands/doc-gist.md +16 -0
- package/commands/plan.md +0 -2
- package/commands/review-plan.md +1 -1
- package/docs/CODE_RULES.md +122 -2
- package/docs/PR_DESCRIPTION_GUIDE.md +127 -64
- package/hooks/blocking/bot_mention_comment_blocker.py +75 -0
- package/hooks/blocking/code_rules_enforcer.py +1143 -129
- package/hooks/blocking/convergence_gate_blocker.py +130 -0
- package/hooks/blocking/destructive_command_blocker.py +74 -0
- package/hooks/blocking/gh_body_arg_blocker.py +30 -0
- package/hooks/blocking/md_to_html_blocker.py +119 -0
- package/hooks/blocking/pr_description_enforcer.py +57 -22
- package/hooks/blocking/test_bot_mention_comment_blocker.py +131 -0
- package/hooks/blocking/test_code_rules_enforcer.py +21 -0
- package/hooks/blocking/test_code_rules_enforcer_any_exempt_files.py +70 -0
- package/hooks/blocking/test_code_rules_enforcer_any_imports_and_cast.py +92 -0
- package/hooks/blocking/test_code_rules_enforcer_banned_import_alias.py +143 -0
- package/hooks/blocking/test_code_rules_enforcer_banned_prefixes.py +152 -0
- package/hooks/blocking/test_code_rules_enforcer_bare_except.py +120 -0
- package/hooks/blocking/test_code_rules_enforcer_boundary_types.py +175 -0
- package/hooks/blocking/test_code_rules_enforcer_cap_meta.py +0 -1
- package/hooks/blocking/test_code_rules_enforcer_collection_prefix.py +50 -0
- package/hooks/blocking/test_code_rules_enforcer_docstring_format.py +255 -0
- package/hooks/blocking/test_code_rules_enforcer_inline_tuple_string_magic.py +130 -0
- package/hooks/blocking/test_code_rules_enforcer_stub_implementations.py +141 -0
- package/hooks/blocking/test_code_rules_enforcer_test_branching.py +143 -0
- package/hooks/blocking/test_code_rules_enforcer_thin_wrapper_files.py +169 -0
- package/hooks/blocking/test_code_rules_enforcer_todo_markers.py +99 -0
- package/hooks/blocking/test_code_rules_enforcer_typed_dict_pairs.py +141 -0
- package/hooks/blocking/test_convergence_gate_blocker.py +63 -0
- package/hooks/blocking/test_destructive_command_blocker.py +146 -0
- package/hooks/blocking/test_destructive_command_blocker_no_verify.py +102 -0
- package/hooks/blocking/test_gh_body_arg_blocker.py +45 -0
- package/hooks/blocking/test_md_to_html_blocker.py +317 -0
- package/hooks/blocking/test_pr_description_enforcer.py +69 -8
- package/hooks/config/any_type_config.py +7 -0
- package/hooks/config/banned_identifiers_constants.py +11 -0
- package/hooks/config/blocking_check_limits.py +38 -0
- package/hooks/config/bot_mention_comment_blocker_constants.py +20 -0
- package/hooks/config/code_rules_enforcer_constants.py +53 -0
- package/hooks/config/convergence_branch_constants.py +9 -0
- package/hooks/config/doc_gist_auto_publish_constants.py +18 -0
- package/hooks/config/html_companion_constants.py +20 -0
- package/hooks/config/inline_tuple_string_magic_constants.py +22 -0
- package/hooks/config/pr_description_enforcer_constants.py +14 -0
- package/hooks/config/test_banned_identifiers_constants.py +17 -0
- package/hooks/hooks.json +28 -20
- package/hooks/pyproject.toml +69 -0
- package/hooks/validators/mypy_integration.py +47 -1
- package/hooks/validators/run_all_validators.py +3 -3
- package/hooks/validators/test_mypy_integration.py +50 -1
- package/hooks/workflow/doc_gist_auto_publish.py +144 -0
- package/hooks/workflow/md_to_html_companion.py +365 -0
- package/hooks/workflow/test_doc_gist_auto_publish.py +117 -0
- package/hooks/workflow/test_md_to_html_companion.py +452 -0
- package/package.json +1 -1
- package/rules/gh-body-file.md +2 -0
- package/scripts/Install-SweepEmptyDirs.ps1 +111 -0
- package/scripts/check.ps1 +106 -0
- package/scripts/config/timing.py +11 -0
- package/scripts/sweep_empty_dirs.py +138 -0
- package/scripts/sync_to_cursor/rules.py +1 -1
- package/scripts/test_sweep_empty_dirs.py +183 -0
- package/skills/_shared/pr-loop/prompts/pr-consistency-audit.xml +323 -0
- package/skills/_shared/pr-loop/scripts/_cli_utils.py +22 -0
- package/skills/_shared/pr-loop/scripts/_path_resolver.py +165 -0
- package/skills/_shared/pr-loop/scripts/_xml_utils.py +20 -0
- package/skills/_shared/pr-loop/scripts/build_audit_prompt.py +182 -0
- package/skills/_shared/pr-loop/scripts/build_fix_prompt.py +185 -0
- package/skills/_shared/pr-loop/scripts/config/__init__.py +0 -0
- package/skills/_shared/pr-loop/scripts/config/path_resolver_constants.py +78 -0
- package/skills/_shared/pr-loop/scripts/init_loop_state.py +135 -0
- package/skills/_shared/pr-loop/scripts/teardown_worktrees.py +175 -0
- package/skills/_shared/pr-loop/scripts/write_audit_outcomes.py +182 -0
- package/skills/_shared/pr-loop/scripts/write_fix_outcomes.py +206 -0
- package/skills/bugteam/CONSTRAINTS.md +21 -22
- package/skills/bugteam/EXAMPLES.md +3 -3
- package/skills/bugteam/PROMPTS.md +227 -67
- package/skills/bugteam/SKILL.md +132 -455
- package/skills/bugteam/reference/README.md +1 -1
- package/skills/bugteam/reference/audit-and-teammates.md +112 -39
- package/skills/bugteam/reference/audit-contract.md +4 -22
- package/skills/bugteam/reference/copilot-gap-analysis.md +8 -5
- package/skills/bugteam/reference/design-rationale.md +2 -2
- package/skills/bugteam/reference/github-pr-reviews.md +50 -57
- package/skills/bugteam/reference/obstacles/audit-assign-ids.md +13 -0
- package/skills/bugteam/reference/obstacles/audit-capture-excerpts.md +13 -0
- package/skills/bugteam/reference/obstacles/audit-walk-categories.md +13 -0
- package/skills/bugteam/reference/obstacles/audit-write-xml.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-append-summary.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-apply-fixes.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-git-add-commit.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-git-push.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-post-reply.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-publish-summary.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-py-compile.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-read-files.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-resolve-thread.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-test-suite.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-violation-count.md +13 -0
- package/skills/bugteam/reference/obstacles/fix-write-xml.md +13 -0
- package/skills/bugteam/reference/team-setup.md +111 -9
- package/skills/bugteam/reference/teardown-publish-permissions.md +39 -8
- package/skills/bugteam/scripts/README.md +60 -0
- package/skills/bugteam/scripts/_claude_permissions_common.py +358 -0
- package/skills/bugteam/scripts/bugteam_code_rules_gate.py +976 -0
- package/skills/bugteam/scripts/bugteam_fix_hookspath.py +375 -0
- package/skills/bugteam/scripts/bugteam_preflight.py +328 -0
- package/skills/bugteam/scripts/config/bugteam_code_rules_gate_constants.py +25 -0
- package/skills/bugteam/scripts/config/bugteam_fix_hookspath_constants.py +26 -0
- package/skills/bugteam/scripts/config/bugteam_preflight_constants.py +35 -0
- package/skills/bugteam/scripts/config/claude_permissions_common_constants.py +20 -0
- package/skills/bugteam/scripts/config/probe_code_rules_enforcer_check_constants.py +12 -0
- package/skills/bugteam/scripts/config/windows_safe_rmtree_constants.py +7 -0
- package/skills/bugteam/scripts/grant_project_claude_permissions.py +175 -0
- package/skills/bugteam/scripts/probe_code_rules_enforcer_check.py +107 -0
- package/skills/bugteam/scripts/revoke_project_claude_permissions.py +220 -0
- package/skills/bugteam/scripts/test__claude_permissions_common.py +112 -0
- package/skills/bugteam/scripts/test_bugteam_code_rules_gate.py +400 -0
- package/skills/bugteam/scripts/test_bugteam_fix_hookspath.py +384 -0
- package/skills/bugteam/scripts/test_bugteam_preflight.py +309 -0
- package/skills/bugteam/scripts/test_claude_permissions_common.py +195 -0
- package/skills/bugteam/scripts/test_grant_project_claude_permissions.py +55 -0
- package/skills/bugteam/scripts/test_probe_code_rules_enforcer_check.py +76 -0
- package/skills/bugteam/scripts/test_revoke_project_claude_permissions.py +55 -0
- package/skills/bugteam/scripts/test_windows_safe_rmtree.py +108 -0
- package/skills/bugteam/scripts/windows_safe_rmtree.py +100 -0
- package/skills/bugteam/test_skill_additions.py +1 -11
- package/skills/code/SKILL.md +176 -0
- package/skills/copilot-review/SKILL.md +16 -0
- package/skills/doc-gist/SKILL.md +99 -0
- package/skills/doc-gist/references/examples/01-exploration-code-approaches.html +453 -0
- package/skills/doc-gist/references/examples/02-exploration-visual-designs.html +515 -0
- package/skills/doc-gist/references/examples/03-code-review-pr.html +638 -0
- package/skills/doc-gist/references/examples/04-code-understanding.html +491 -0
- package/skills/doc-gist/references/examples/05-design-system.html +629 -0
- package/skills/doc-gist/references/examples/06-component-variants.html +605 -0
- package/skills/doc-gist/references/examples/07-prototype-animation.html +455 -0
- package/skills/doc-gist/references/examples/08-prototype-interaction.html +396 -0
- package/skills/doc-gist/references/examples/09-slide-deck.html +592 -0
- package/skills/doc-gist/references/examples/10-svg-illustrations.html +492 -0
- package/skills/doc-gist/references/examples/11-status-report.html +528 -0
- package/skills/doc-gist/references/examples/12-incident-report.html +596 -0
- package/skills/doc-gist/references/examples/13-flowchart-diagram.html +395 -0
- package/skills/doc-gist/references/examples/14-research-feature-explainer.html +381 -0
- package/skills/doc-gist/references/examples/15-research-concept-explainer.html +368 -0
- package/skills/doc-gist/references/examples/16-implementation-plan.html +702 -0
- package/skills/doc-gist/references/examples/17-pr-writeup.html +595 -0
- package/skills/doc-gist/references/examples/18-editor-triage-board.html +573 -0
- package/skills/doc-gist/references/examples/19-editor-feature-flags.html +663 -0
- package/skills/doc-gist/references/examples/20-editor-prompt-tuner.html +722 -0
- package/skills/doc-gist/references/examples/README.md +5 -0
- package/skills/doc-gist/scripts/config/__init__.py +0 -0
- package/skills/doc-gist/scripts/config/gist_upload_constants.py +16 -0
- package/skills/doc-gist/scripts/gist_upload.py +177 -0
- package/skills/doc-gist/scripts/test_gist_upload.py +51 -0
- package/skills/findbugs/SKILL.md +96 -2
- package/skills/monitor-open-prs/SKILL.md +14 -32
- package/skills/monitor-open-prs/test_skill_contract.py +0 -11
- package/skills/pr-consistency-audit/SKILL.md +112 -0
- package/skills/pr-consistency-audit/reference/detection-rules.md +96 -0
- package/skills/pr-consistency-audit/reference/illustrations.md +78 -0
- package/skills/pr-converge/SKILL.md +229 -23
- package/skills/pr-converge/config/__init__.py +0 -0
- package/skills/pr-converge/config/constants.py +63 -0
- package/skills/pr-converge/reference/convergence-gates.md +138 -44
- package/skills/pr-converge/reference/examples.md +43 -11
- package/skills/pr-converge/reference/fix-protocol.md +6 -5
- package/skills/pr-converge/reference/ground-rules.md +5 -3
- package/skills/pr-converge/reference/multi-pr-orchestration.md +44 -19
- package/skills/pr-converge/reference/obstacles/fix-post-replies.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-publish-summary.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-push.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-read-filelines.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-reset-state.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-resolve-threads.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-spawn-clean-coder.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-stage-commit.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-trigger-bugbot.md +13 -0
- package/skills/pr-converge/reference/obstacles/fix-write-test.md +13 -0
- package/skills/pr-converge/reference/per-tick.md +107 -31
- package/skills/pr-converge/reference/state-schema.md +22 -1
- package/skills/pr-converge/reference/stop-conditions.md +9 -7
- package/skills/pr-converge/scripts/README.md +34 -46
- package/skills/pr-converge/scripts/check_bugbot_ci.py +279 -0
- package/skills/pr-converge/scripts/check_convergence.py +497 -0
- package/skills/pr-converge/scripts/check_pending_reviews.py +154 -0
- package/skills/pr-converge/scripts/config/pr_converge_constants.py +118 -0
- package/skills/pr-converge/scripts/fetch_copilot_reviews.py +134 -0
- package/skills/pr-converge/scripts/post_fix_reply.py +168 -0
- package/skills/pr-converge/scripts/test_check_bugbot_ci.py +312 -0
- package/skills/pr-converge/workflows/schedule-wakeup-loop.md +5 -12
- package/skills/qbug/SKILL.md +157 -27
- package/skills/session-log/SKILL.md +216 -114
- package/skills/session-tidy/SKILL.md +1 -1
- package/skills/skill-builder/SKILL.md +138 -56
- package/skills/skill-builder/references/delegation-map.md +72 -113
- package/skills/skill-builder/references/progressive-disclosure.md +122 -0
- package/skills/skill-builder/references/self-audit-checklist.md +92 -0
- package/skills/skill-builder/references/skill-types.md +228 -0
- package/skills/skill-builder/references/thariq-x-post-skills.json +33 -0
- package/skills/skill-builder/templates/gap-analysis.md +15 -8
- package/skills/skill-builder/workflows/improve-skill.md +86 -57
- package/skills/skill-builder/workflows/new-skill.md +80 -168
- package/skills/skill-builder/workflows/polish-skill.md +78 -54
- package/skills/structure-prompt/SKILL.md +50 -0
- package/skills/structure-prompt/reference/adversarial-tuning.md +62 -0
- package/skills/structure-prompt/reference/block-classification.md +27 -0
- package/skills/structure-prompt/reference/canonical-case.md +48 -0
- package/skills/structure-prompt/reference/citation-depth.md +70 -0
- package/skills/structure-prompt/reference/cleanup.md +33 -0
- package/skills/structure-prompt/reference/constraints.md +33 -0
- package/skills/structure-prompt/reference/directives.md +37 -0
- package/skills/structure-prompt/reference/examples.md +72 -0
- package/skills/structure-prompt/reference/instantiation.md +51 -0
- package/skills/structure-prompt/reference/output-contract.md +72 -0
- package/skills/structure-prompt/reference/per-category.md +23 -0
- package/skills/structure-prompt/reference/persona.md +38 -0
- package/skills/structure-prompt/reference/research.md +33 -0
- package/skills/structure-prompt/reference/structure.md +28 -0
- package/agents/code-standards-agent.md +0 -93
- package/agents/groq-coder.md +0 -113
- package/agents/plan-executor.md +0 -226
- package/agents/project-docs-analyzer.md +0 -53
- package/agents/project-structure-organizer-agent.md +0 -72
- package/agents/skill-to-agent-converter.md +0 -370
- package/agents/skill-writer-agent.md +0 -470
- package/agents/user-docs-writer.md +0 -67
- package/agents/workflow-visual-documenter.md +0 -82
- package/commands/readability-review.md +0 -20
- package/hooks/mypy.ini +0 -2
- package/hooks/notification/attention_needed_notify.py +0 -71
- package/hooks/notification/claude_notification_handler.py +0 -67
- package/hooks/notification/notification_utils.py +0 -267
- package/hooks/notification/subagent_complete_notify.py +0 -381
- package/hooks/notification/test_attention_needed_notify.py +0 -47
- package/hooks/notification/test_claude_notification_handler.py +0 -54
- package/hooks/notification/test_notification_utils.py +0 -91
- package/hooks/notification/test_subagent_complete_notify.py +0 -79
- package/scripts/config/groq_bugteam_config.py +0 -230
- package/scripts/config/test_groq_bugteam_config.py +0 -83
- package/scripts/config/test_spec_implementer_prompt.py +0 -32
- package/scripts/groq_bugteam.README.md +0 -131
- package/scripts/groq_bugteam.py +0 -647
- package/scripts/groq_bugteam_dotenv.py +0 -40
- package/scripts/groq_bugteam_spec.py +0 -226
- package/scripts/test_groq_bugteam.py +0 -529
- package/scripts/test_groq_bugteam_apply_fix_from_spec.py +0 -426
- package/scripts/test_groq_bugteam_dotenv.py +0 -66
- package/scripts/test_groq_bugteam_spec.py +0 -338
- package/skills/bugteam/SKILL_EVALS.md +0 -309
- package/skills/dream/SKILL.md +0 -118
- package/skills/ingest/SKILL.md +0 -40
- package/skills/npm-creator/SKILL.md +0 -187
- package/skills/readability-review/SKILL.md +0 -127
- package/skills/resume-review/SKILL.md +0 -261
- package/skills/rule-audit/SKILL.md +0 -307
- package/skills/rule-creator/SKILL.md +0 -150
- package/skills/searching-obsidian-vault/SKILL.md +0 -131
- package/skills/skill-writer/REFERENCE.md +0 -284
- package/skills/skill-writer/SKILL.md +0 -222
- package/skills/tdd-team/SKILL.md +0 -128
|
@@ -1,32 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: skill-builder
|
|
3
3
|
description: >-
|
|
4
|
-
Orchestrates the complete skill-building lifecycle using
|
|
5
|
-
development. Routes through
|
|
6
|
-
skill-writer),
|
|
7
|
-
iterative refinement. Use when creating new
|
|
8
|
-
or optimizing skill descriptions.
|
|
9
|
-
|
|
10
|
-
development lifecycle'.
|
|
4
|
+
Orchestrates the complete skill-building lifecycle using best-practice-driven
|
|
5
|
+
development. Routes through type classification, folder scaffolding, skill
|
|
6
|
+
writing (via skill-writer), self-audit against a 38-point checklist, and
|
|
7
|
+
iterative refinement from real usage observations. Use when creating new
|
|
8
|
+
skills, improving existing skills, or optimizing skill descriptions.
|
|
9
|
+
Triggers: 'build a skill', 'new skill workflow', 'improve this skill',
|
|
10
|
+
'optimize skill description', 'skill development lifecycle'.
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
@${CLAUDE_SKILL_DIR}/references/eval-driven-flow.md
|
|
14
|
-
|
|
15
13
|
# Skill Builder
|
|
16
14
|
|
|
17
|
-
**Core principle:**
|
|
15
|
+
**Core principle:** Best-practice-driven craftsman. Knows every proven pattern, applies them intentionally, self-audits after building. The expert that enforces craft standards.
|
|
16
|
+
|
|
17
|
+
Sources: [Anthropic best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices), [Lessons from Building Claude Code](references/thariq-x-post-skills.json), model skills (bugteam, pr-converge).
|
|
18
|
+
|
|
19
|
+
## Gotchas
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
Highest-signal content. Append a bullet each time a skill build fails in a new way.
|
|
22
|
+
|
|
23
|
+
> "The highest-signal content in any skill is the Gotchas section. These sections should be built up from common failure points that Claude runs into when using your skill."
|
|
20
24
|
|
|
21
25
|
## When this skill applies
|
|
22
26
|
|
|
23
|
-
Trigger for requests to **build**, **improve**, or **polish** a skill
|
|
27
|
+
Trigger for requests to **build**, **improve**, or **polish** a skill. This skill orchestrates the process — it classifies, scaffolds, gathers context, delegates writing to `/skill-writer`, and self-audits the result.
|
|
24
28
|
|
|
25
29
|
For quick skill syntax questions or one-off SKILL.md edits, use `/skill-writer` directly instead.
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
**Refusal cases — first match wins:**
|
|
32
|
+
|
|
33
|
+
- **No clear task or domain.** Respond exactly: `What should this skill do? Give me a one-sentence description of the capability.`
|
|
28
34
|
|
|
29
|
-
|
|
35
|
+
## The Process
|
|
36
|
+
|
|
37
|
+
Each workflow file provides step-by-step instructions. After routing below, open the corresponding workflow file and follow it.
|
|
38
|
+
|
|
39
|
+
### Routing
|
|
40
|
+
|
|
41
|
+
Assess the user’s intent:
|
|
30
42
|
|
|
31
43
|
**Creating a new skill?**
|
|
32
44
|
Read `${CLAUDE_SKILL_DIR}/workflows/new-skill.md` and follow it.
|
|
@@ -34,74 +46,144 @@ Read `${CLAUDE_SKILL_DIR}/workflows/new-skill.md` and follow it.
|
|
|
34
46
|
**Improving an existing skill?**
|
|
35
47
|
Read `${CLAUDE_SKILL_DIR}/workflows/improve-skill.md` and follow it.
|
|
36
48
|
|
|
37
|
-
**Final polish only (description optimization, trigger
|
|
49
|
+
**Final polish only (description optimization, trigger audit)?**
|
|
38
50
|
Read `${CLAUDE_SKILL_DIR}/workflows/polish-skill.md` and follow it.
|
|
39
51
|
|
|
40
52
|
**Ambiguous?** Ask: "Are you creating a new skill, improving an existing one, or doing a final polish pass?"
|
|
41
53
|
|
|
42
|
-
|
|
54
|
+
### The Claude A / Claude B pattern
|
|
55
|
+
|
|
56
|
+
You and the user are **Claude A** — the expert who designs and refines the skill. Subagents running the built skill on real tasks are **Claude B** — the agent using the skill to perform actual work.
|
|
57
|
+
|
|
58
|
+
> "Work with one instance of Claude (‘Claude A’) to create a Skill that is used by other instances (‘Claude B’). Claude A helps you design and refine instructions, while Claude B tests them in real tasks."
|
|
59
|
+
|
|
60
|
+
The feedback loop: observe Claude B’s behavior, bring insights back, refine the skill, test again.
|
|
61
|
+
|
|
62
|
+
## Skill type routing
|
|
63
|
+
|
|
64
|
+
> "After cataloging all of our skills, we noticed they cluster into a few recurring categories."
|
|
65
|
+
|
|
66
|
+
Classify the skill into one of 9 types. The type determines folder structure. See `${CLAUDE_SKILL_DIR}/references/skill-types.md` for full details.
|
|
67
|
+
|
|
68
|
+
| # | Type | Key folders |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| 1 | Library & API Reference | reference/, examples/ |
|
|
71
|
+
| 2 | Product Verification | scripts/, reference/ |
|
|
72
|
+
| 3 | Data Fetching & Analysis | reference/, scripts/ |
|
|
73
|
+
| 4 | Business Process & Team Automation | templates/, scripts/ |
|
|
74
|
+
| 5 | Code Scaffolding & Templates | templates/, scripts/ |
|
|
75
|
+
| 6 | Code Quality & Review | reference/, scripts/ |
|
|
76
|
+
| 7 | CI/CD & Deployment | workflows/, scripts/ |
|
|
77
|
+
| 8 | Runbooks | reference/, templates/ |
|
|
78
|
+
| 9 | Infrastructure Operations | reference/, scripts/ |
|
|
79
|
+
|
|
80
|
+
## Principles
|
|
81
|
+
|
|
82
|
+
These are non-negotiable. Every skill must satisfy them. The self-audit checklist enforces them.
|
|
83
|
+
|
|
84
|
+
### Concision and defaults
|
|
85
|
+
|
|
86
|
+
> "Default assumption: Claude is already very smart. Only add context Claude doesn’t already have."
|
|
87
|
+
|
|
88
|
+
> "Don’t State the Obvious — focus on information that pushes Claude out of its normal way of thinking."
|
|
89
|
+
|
|
90
|
+
Challenge each sentence: "Does Claude really need this?"
|
|
91
|
+
|
|
92
|
+
### Degree of freedom
|
|
93
|
+
|
|
94
|
+
> "Match the level of specificity to the task’s fragility and variability."
|
|
95
|
+
|
|
96
|
+
High freedom (text guidance) for open fields. Low freedom (exact scripts, no parameters) for narrow bridges with cliffs.
|
|
97
|
+
|
|
98
|
+
> "Avoid Railroading Claude — give Claude the information it needs, but give it the flexibility to adapt."
|
|
99
|
+
|
|
100
|
+
### Progressive disclosure
|
|
101
|
+
|
|
102
|
+
> "Keep SKILL.md body under 500 lines."
|
|
103
|
+
|
|
104
|
+
SKILL.md is a hub. Detail lives in reference/, scripts execute without being read into context. References one level deep. Files over 100 lines get a TOC. Forward slashes only.
|
|
105
|
+
|
|
106
|
+
See `${CLAUDE_SKILL_DIR}/references/progressive-disclosure.md` for the full specification.
|
|
107
|
+
|
|
108
|
+
### Description field
|
|
109
|
+
|
|
110
|
+
> "Always write in third person. The description is critical for skill selection: Claude uses it to choose the right Skill from potentially 100+ available Skills."
|
|
111
|
+
|
|
112
|
+
Include what the skill does AND specific trigger phrases. Max 1024 chars.
|
|
113
|
+
|
|
114
|
+
> "The description field is not a summary — it’s a description of when to trigger."
|
|
115
|
+
|
|
116
|
+
### Gotchas
|
|
117
|
+
|
|
118
|
+
> "Build a Gotchas Section — the highest-signal content in any skill."
|
|
119
|
+
|
|
120
|
+
Mandatory section. Built from real failure observations. Updated over time as new failure modes surface.
|
|
121
|
+
|
|
122
|
+
### Templates and examples
|
|
43
123
|
|
|
44
|
-
|
|
124
|
+
> "Provide templates for output format" and "Examples help Claude understand the desired style and level of detail more clearly than descriptions alone."
|
|
45
125
|
|
|
46
|
-
|
|
126
|
+
Use the template pattern for structured outputs. Use the examples pattern (input/output pairs) for style-dependent work.
|
|
47
127
|
|
|
48
|
-
|
|
128
|
+
### Workflows and checklists
|
|
49
129
|
|
|
50
|
-
|
|
130
|
+
> "For particularly complex workflows, provide a checklist that Claude can copy into its response and check off as it progresses."
|
|
51
131
|
|
|
52
|
-
|
|
53
|
-
|-------|---------|-------------|
|
|
54
|
-
| 1. Identify gaps | Document what fails without the skill | This skill (guided conversation) |
|
|
55
|
-
| 2. Build evals | Create 3+ scenarios testing the gaps | This skill (templates + user input) |
|
|
56
|
-
| 3. Write skill | Minimal instructions addressing gaps | `/skill-writer` |
|
|
57
|
-
| 4. Test | Subagent runs with/without skill, grade, benchmark | `skill-creator` eval infrastructure |
|
|
58
|
-
| 5. Iterate | Review results, refine, re-test | This skill + `/skill-writer` + Phase 4 |
|
|
59
|
-
| 6. Polish | Description optimization, trigger eval, final check | `skill-creator` description optimizer |
|
|
132
|
+
Multi-step processes get `[ ]` checklists. Quality-critical operations get feedback loops (run validator → fix → repeat).
|
|
60
133
|
|
|
61
|
-
|
|
134
|
+
### Scripts
|
|
62
135
|
|
|
63
|
-
|
|
136
|
+
> "Handle error conditions rather than punting to Claude." "Make clear whether Claude should execute the script or read it as reference."
|
|
64
137
|
|
|
65
|
-
|
|
66
|
-
- **Do:** Run `/prompt-generator` using that installed template with the file’s token table filled so the downstream session follows architecture-first sequencing, per-file review gates, and eval rows tied only to user-pasted or explicitly approved evidence.
|
|
138
|
+
> "One of the most powerful tools you can give Claude is code — letting Claude spend its turns on composition rather than reconstructing boilerplate."
|
|
67
139
|
|
|
68
|
-
|
|
140
|
+
### Setup and memory
|
|
69
141
|
|
|
70
|
-
|
|
142
|
+
> "Think through the Setup — some skills may need to be set up with context from the user. A good pattern is to store this in a config.json file."
|
|
71
143
|
|
|
72
|
-
|
|
144
|
+
> "Data stored in the skill directory may be deleted when you upgrade the skill, so store persistent data in `${CLAUDE_PLUGIN_DATA}`."
|
|
73
145
|
|
|
74
|
-
|
|
75
|
-
- **Do:** Run `/prompt-generator` with that file’s token table filled (`[[BASELINE_SKILL_ROOT]]`, `[[WORKSPACE_ROOT]]`, observation gap path, evidence rule) so rollout stays architecture-first, delta-focused, and tied to real observation or approved excerpts.
|
|
146
|
+
### Constraints and refusal cases
|
|
76
147
|
|
|
77
|
-
|
|
148
|
+
> bugteam pattern — non-negotiables separated from guidance, with design rationale. Explicit "first match wins" refusal conditions.
|
|
78
149
|
|
|
79
|
-
|
|
150
|
+
### Anti-patterns
|
|
80
151
|
|
|
81
|
-
|
|
152
|
+
> No Windows paths. Don’t offer too many options — provide a default with escape hatch. Avoid time-sensitive claims. Use consistent terminology. No deeply nested references.
|
|
82
153
|
|
|
83
|
-
|
|
154
|
+
## Self-audit
|
|
84
155
|
|
|
85
|
-
|
|
156
|
+
After every build, improvement, or polish pass, run the mandatory checklist at `${CLAUDE_SKILL_DIR}/references/self-audit-checklist.md`. Every item must pass before delivery. Fix failures, then re-audit.
|
|
86
157
|
|
|
87
|
-
|
|
158
|
+
## Delegation to skill-writer
|
|
88
159
|
|
|
89
|
-
|
|
160
|
+
skill-builder orchestrates; skill-writer authors. The handoff packet from Step 4 must include:
|
|
90
161
|
|
|
91
|
-
|
|
162
|
+
- Skill type and folder structure
|
|
163
|
+
- Gap analysis or observation findings
|
|
164
|
+
- Degree of freedom assessment
|
|
165
|
+
- Initial gotchas
|
|
166
|
+
- Any constraints
|
|
92
167
|
|
|
93
|
-
See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact
|
|
168
|
+
See `${CLAUDE_SKILL_DIR}/references/delegation-map.md` for exact patterns.
|
|
94
169
|
|
|
95
|
-
## File
|
|
170
|
+
## File index
|
|
96
171
|
|
|
97
172
|
| File | Purpose |
|
|
98
173
|
|------|---------|
|
|
99
|
-
| `
|
|
100
|
-
| `
|
|
101
|
-
| `
|
|
102
|
-
| `references/
|
|
103
|
-
| `references/delegation-map.md` |
|
|
104
|
-
| `
|
|
105
|
-
| `
|
|
106
|
-
|
|
|
107
|
-
|
|
|
174
|
+
| `SKILL.md` | This hub — principles, process, routing, file index |
|
|
175
|
+
| `references/skill-types.md` | 9-type taxonomy with folder structures per type |
|
|
176
|
+
| `references/progressive-disclosure.md` | Folder conventions, hub pattern, hard rules |
|
|
177
|
+
| `references/self-audit-checklist.md` | 38-point mandatory post-build audit |
|
|
178
|
+
| `references/delegation-map.md` | Subagent handoff patterns and transcript guidance |
|
|
179
|
+
| `workflows/new-skill.md` | Full lifecycle for new skills (6 steps) |
|
|
180
|
+
| `workflows/improve-skill.md` | Observation-first flow for existing skills (6 steps) |
|
|
181
|
+
| `workflows/polish-skill.md` | Description audit and final validation (5 steps) |
|
|
182
|
+
| `templates/gap-analysis.md` | Template for documenting skill gaps |
|
|
183
|
+
|
|
184
|
+
## Folder map
|
|
185
|
+
|
|
186
|
+
- `SKILL.md` — hub.
|
|
187
|
+
- `references/` — best-practice specifications and the audit checklist.
|
|
188
|
+
- `workflows/` — step-by-step workflows for each lifecycle phase.
|
|
189
|
+
- `templates/` — reusable templates for skill artifacts.
|
|
@@ -1,153 +1,112 @@
|
|
|
1
1
|
# Delegation Map
|
|
2
2
|
|
|
3
|
-
How
|
|
3
|
+
How skill-builder delegates work to subagents and `/skill-writer`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Delegating to skill-writer (Step 4)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
skill-builder orchestrates; skill-writer authors the SKILL.md and companion files. The handoff must be structured so skill-writer has everything it needs.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## Phase 2: Build Evals -- This Orchestrator
|
|
12
|
-
|
|
13
|
-
No external delegation. The orchestrator helps the user transform gaps into eval scenarios.
|
|
14
|
-
|
|
15
|
-
**Output:** `[skill-name]-workspace/evals/evals.json` using the template at `templates/eval-scenario.json`.
|
|
16
|
-
|
|
17
|
-
**Baseline runs:** Spawn subagents WITHOUT any skill for each eval scenario. These run as background Agent tasks.
|
|
18
|
-
|
|
19
|
-
## Phase 3: Write Skill -- Delegate to `/skill-writer`
|
|
20
|
-
|
|
21
|
-
**Full package path:** If the user approved a package plan from `prompt-generator/templates/skill-from-ground-up.md` (net-new) or `prompt-generator/templates/skill-refinement-package.md` (existing baseline), paste the approved architecture summary, baseline inventory, planned deltas, and checkpoint list into the skill-writer handoff so file order and scope stay aligned.
|
|
22
|
-
|
|
23
|
-
Invoke `/skill-writer` with the following context in your prompt:
|
|
9
|
+
### New skill handoff
|
|
24
10
|
|
|
25
11
|
```
|
|
26
|
-
Create a skill
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
12
|
+
Create a skill with these parameters:
|
|
13
|
+
|
|
14
|
+
**Skill type:** [one of 9 types from skill-types.md]
|
|
15
|
+
**Folder structure:** [directories to create: reference/, scripts/, etc.]
|
|
16
|
+
**What it does:** [one-sentence capability description]
|
|
17
|
+
**Domain context:** [what Claude needs to know that it doesn't already]
|
|
18
|
+
**Initial gotchas:** [failure patterns to document from the start]
|
|
19
|
+
**Degree of freedom:** [high | medium | low — with reasoning]
|
|
20
|
+
**Constraints:** [non-negotiables]
|
|
21
|
+
|
|
22
|
+
Produce:
|
|
23
|
+
1. SKILL.md with hub layout (principle, gotchas, when-applies, process, file index, folder map)
|
|
24
|
+
2. Companion files as needed (reference docs, workflow steps, templates)
|
|
25
|
+
3. Every file under 500 lines; TOC on files over 100 lines
|
|
26
|
+
4. File index listing every file and its purpose
|
|
34
27
|
```
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
**Output:** The skill's SKILL.md (and optional REFERENCE.md, scripts, etc.)
|
|
39
|
-
|
|
40
|
-
## Phase 4: Test -- Delegate to skill-creator Infrastructure
|
|
41
|
-
|
|
42
|
-
The skill-creator plugin provides the eval infrastructure. Reference its components directly:
|
|
43
|
-
|
|
44
|
-
### Spawning test runs
|
|
29
|
+
### Refine skill handoff
|
|
45
30
|
|
|
46
|
-
For each eval, spawn TWO subagents in the SAME turn (parallel):
|
|
47
|
-
|
|
48
|
-
**With-skill subagent:**
|
|
49
|
-
```
|
|
50
|
-
Execute this task:
|
|
51
|
-
- Read the skill at [path-to-skill]/SKILL.md and follow its instructions
|
|
52
|
-
- Task: [eval prompt from evals.json]
|
|
53
|
-
- Input files: [eval files if any]
|
|
54
|
-
- Save all output files to: [workspace]/iteration-N/eval-[name]/with_skill/outputs/
|
|
55
|
-
- Save a transcript of your complete work to: [workspace]/iteration-N/eval-[name]/with_skill/transcript.md
|
|
56
|
-
- At the end, write a metrics.json with tool call counts and file list
|
|
57
31
|
```
|
|
32
|
+
Refine this existing skill:
|
|
58
33
|
|
|
59
|
-
**
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
Read the grading agent instructions from the skill-creator plugin:
|
|
65
|
-
`[skill-creator-plugin-path]/agents/grader.md`
|
|
66
|
-
|
|
67
|
-
Spawn a grader subagent for each run with:
|
|
68
|
-
- The expectations from evals.json
|
|
69
|
-
- The transcript path
|
|
70
|
-
- The outputs directory
|
|
71
|
-
|
|
72
|
-
**Output:** `grading.json` in each run directory.
|
|
73
|
-
|
|
74
|
-
### Benchmarking
|
|
34
|
+
**Current SKILL.md:** [reference or paste]
|
|
35
|
+
**What was observed:** [specific failures from Claude B usage]
|
|
36
|
+
**What to change:** [specific instructions to add/remove/modify]
|
|
37
|
+
**New gotchas to add:** [failure patterns discovered]
|
|
38
|
+
**What to preserve:** [working content — do not touch]
|
|
75
39
|
|
|
76
|
-
|
|
77
|
-
```bash
|
|
78
|
-
cd [skill-creator-plugin-path] && python -m scripts.aggregate_benchmark [workspace]/iteration-N --skill-name [name]
|
|
40
|
+
Constraint: Only change what the observations demand. Do not reorganize working content.
|
|
79
41
|
```
|
|
80
42
|
|
|
81
|
-
|
|
43
|
+
## Spawning a test subagent
|
|
82
44
|
|
|
83
|
-
|
|
45
|
+
To observe how Claude B uses a skill on a real task:
|
|
84
46
|
|
|
85
|
-
Launch the viewer from the skill-creator plugin:
|
|
86
|
-
```bash
|
|
87
|
-
python [skill-creator-plugin-path]/eval-viewer/generate_review.py \
|
|
88
|
-
[workspace]/iteration-N \
|
|
89
|
-
--skill-name "[name]" \
|
|
90
|
-
--benchmark [workspace]/iteration-N/benchmark.json
|
|
91
47
|
```
|
|
48
|
+
Agent(
|
|
49
|
+
subagent_type="general-purpose",
|
|
50
|
+
description="Test skill on real task",
|
|
51
|
+
prompt="Read the skill at [skill-path]/SKILL.md and follow its instructions.
|
|
92
52
|
|
|
93
|
-
|
|
53
|
+
Task: [realistic user prompt]
|
|
94
54
|
|
|
95
|
-
|
|
55
|
+
Save a complete transcript of your work to: [workspace]/transcript.md"
|
|
56
|
+
)
|
|
57
|
+
```
|
|
96
58
|
|
|
97
|
-
|
|
59
|
+
Spawn with `run_in_background=true` for longer tasks. Read the transcript when the agent completes.
|
|
98
60
|
|
|
99
|
-
|
|
61
|
+
## Reading a transcript for observations
|
|
100
62
|
|
|
101
|
-
|
|
102
|
-
`~/.claude/plugins/marketplaces/claude-plugins-official/plugins/skill-creator/skills/skill-creator/`
|
|
63
|
+
> "Watch for unexpected exploration paths, missed connections, overreliance on certain sections, and ignored content."
|
|
103
64
|
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
find ~/.claude/plugins -name "SKILL.md" -path "*/skill-creator/*" 2>/dev/null | head -1
|
|
107
|
-
```
|
|
65
|
+
Scan the transcript for:
|
|
108
66
|
|
|
109
|
-
|
|
67
|
+
1. **File access order** — Did Claude read files in the expected order? Unexpected ordering means the structure is not intuitive.
|
|
68
|
+
2. **Missed files** — Were any reference files never accessed? They might be unnecessary or poorly signaled.
|
|
69
|
+
3. **Re-read files** — Did Claude re-read the same file multiple times? That content should be in SKILL.md.
|
|
70
|
+
4. **Gotcha moments** — Where did Claude make a wrong choice? That's a gotcha candidate.
|
|
71
|
+
5. **Script usage** — Did Claude execute scripts as expected, or did it try to read them instead?
|
|
72
|
+
6. **Tool call errors** — Any "tool not found" or path errors? Fix references.
|
|
110
73
|
|
|
111
|
-
##
|
|
74
|
+
## Delegating self-audit
|
|
112
75
|
|
|
113
|
-
|
|
76
|
+
After building, spawn a subagent to run the checklist independently:
|
|
114
77
|
|
|
115
78
|
```
|
|
116
|
-
|
|
79
|
+
Agent(
|
|
80
|
+
subagent_type="general-purpose",
|
|
81
|
+
description="Self-audit skill against checklist",
|
|
82
|
+
prompt="Read the skill at [skill-path]/SKILL.md and all companion files.
|
|
117
83
|
|
|
118
|
-
|
|
119
|
-
User feedback: [from feedback.json]
|
|
120
|
-
Behavioral observations: [from transcript analysis]
|
|
84
|
+
Then read the self-audit checklist at [skill-builder-path]/references/self-audit-checklist.md.
|
|
121
85
|
|
|
122
|
-
|
|
123
|
-
1. [Issue from feedback]
|
|
124
|
-
2. [Issue from observation]
|
|
86
|
+
Check every item. For each: PASS, FAIL with specific file:line evidence and what to fix, or N/A with reason.
|
|
125
87
|
|
|
126
|
-
|
|
88
|
+
Report as:
|
|
89
|
+
## Audit Results
|
|
90
|
+
[ ] Item 1: PASS
|
|
91
|
+
[ ] Item 2: FAIL — [file:line] — [what's wrong and how to fix]
|
|
92
|
+
..."
|
|
93
|
+
)
|
|
127
94
|
```
|
|
128
95
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
## Phase 6: Polish -- Delegate to skill-creator Description Optimizer
|
|
96
|
+
This gives an independent verification. Fix failures, then re-deliver to user.
|
|
132
97
|
|
|
133
|
-
|
|
98
|
+
## Testing across models
|
|
134
99
|
|
|
135
|
-
|
|
100
|
+
> "Test your Skill with all the models you plan to use it with."
|
|
136
101
|
|
|
137
|
-
|
|
138
|
-
`[skill-creator-plugin-path]/assets/eval_review.html`
|
|
102
|
+
If the skill will be used with Haiku, spawn a haiku test subagent:
|
|
139
103
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
--model [current-model-id] \
|
|
147
|
-
--max-iterations 5 \
|
|
148
|
-
--verbose
|
|
104
|
+
```
|
|
105
|
+
Agent(
|
|
106
|
+
subagent_type="general-purpose",
|
|
107
|
+
model="haiku",
|
|
108
|
+
...
|
|
109
|
+
)
|
|
149
110
|
```
|
|
150
111
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
Run the skill-writer self-check rubric (from skill-writer's Step 9) against the finished skill. All items must pass.
|
|
112
|
+
Haiku needs more explicit guidance than Opus. Observe whether the skill provides enough.
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Progressive Disclosure
|
|
2
|
+
|
|
3
|
+
Source A: [Anthropic — Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices)
|
|
4
|
+
Source B: [Lessons from Building Claude Code](thariq-x-post-skills.json)
|
|
5
|
+
|
|
6
|
+
## Core concept
|
|
7
|
+
|
|
8
|
+
> Source A: "SKILL.md serves as an overview that points Claude to detailed materials as needed, like a table of contents in an onboarding guide."
|
|
9
|
+
|
|
10
|
+
> Source A: "At startup, only the metadata (name and description) from all Skills is pre-loaded. Claude reads SKILL.md only when the Skill becomes relevant, and reads additional files only as needed."
|
|
11
|
+
|
|
12
|
+
> Source B: "You should think of the entire file system as a form of context engineering and progressive disclosure."
|
|
13
|
+
|
|
14
|
+
## Standard folder conventions
|
|
15
|
+
|
|
16
|
+
Every skill is a folder. These are the standard subdirectories, each with a specific role:
|
|
17
|
+
|
|
18
|
+
| Directory | Purpose | When to use |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `SKILL.md` | Hub — overview, gotchas, process, file index | Always |
|
|
21
|
+
| `reference/` | Deep-dive reference material loaded on demand | Domain knowledge, API surfaces, schemas |
|
|
22
|
+
| `scripts/` | Executable scripts (executed, not read into context) | Deterministic operations, validators, helpers |
|
|
23
|
+
| `workflows/` | Multi-step sub-workflows for different scenarios | Complex branching processes |
|
|
24
|
+
| `templates/` | Output templates or file scaffolds to copy and fill | Structured output formats |
|
|
25
|
+
| `assets/` | Static data files, images, config templates | Reference data, configuration |
|
|
26
|
+
| `examples/` | Copy-pasteable examples and usage patterns | Library/API reference skills |
|
|
27
|
+
|
|
28
|
+
> Source A: "As your Skill grows, you can bundle additional content that Claude loads only when needed."
|
|
29
|
+
|
|
30
|
+
> Source B: "The simplest form of progressive disclosure is to point to other markdown files for Claude to use."
|
|
31
|
+
|
|
32
|
+
## The hub pattern
|
|
33
|
+
|
|
34
|
+
SKILL.md is an index, not a textbook. It tells Claude what exists and when to read it.
|
|
35
|
+
|
|
36
|
+
Observed in model skills (bugteam, pr-converge), the proven layout:
|
|
37
|
+
|
|
38
|
+
1. Core principle (one sentence)
|
|
39
|
+
2. Gotchas (highest-signal content)
|
|
40
|
+
3. When this skill applies (trigger + refusal)
|
|
41
|
+
4. The Process (checklist)
|
|
42
|
+
5. Skill type routing (if applicable)
|
|
43
|
+
6. Principles / constraints
|
|
44
|
+
7. File index (what every file does)
|
|
45
|
+
8. Folder map (end of file)
|
|
46
|
+
|
|
47
|
+
> Source B: "Tell Claude what files are in your skill, and it will read them at appropriate times."
|
|
48
|
+
|
|
49
|
+
## Three progressive disclosure patterns
|
|
50
|
+
|
|
51
|
+
### Pattern 1: High-level guide with references
|
|
52
|
+
|
|
53
|
+
> Source A: "Claude loads FORMS.md, REFERENCE.md, or EXAMPLES.md only when needed."
|
|
54
|
+
|
|
55
|
+
```markdown
|
|
56
|
+
## Quick start
|
|
57
|
+
[essential content inline]
|
|
58
|
+
|
|
59
|
+
## Advanced features
|
|
60
|
+
**Form filling**: See [FORMS.md](FORMS.md)
|
|
61
|
+
**API reference**: See [REFERENCE.md](REFERENCE.md)
|
|
62
|
+
**Examples**: See [EXAMPLES.md](EXAMPLES.md)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Pattern 2: Domain-specific organization
|
|
66
|
+
|
|
67
|
+
> Source A: "When a user asks about sales metrics, Claude only needs to read sales-related schemas, not finance or marketing data."
|
|
68
|
+
|
|
69
|
+
```markdown
|
|
70
|
+
**Finance**: Revenue, ARR → See [reference/finance.md](reference/finance.md)
|
|
71
|
+
**Sales**: Pipeline, accounts → See [reference/sales.md](reference/sales.md)
|
|
72
|
+
**Product**: API usage, features → See [reference/product.md](reference/product.md)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Pattern 3: Conditional details
|
|
76
|
+
|
|
77
|
+
> Source A: "Show basic content, link to advanced content."
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
For simple edits, modify the XML directly.
|
|
81
|
+
|
|
82
|
+
**For tracked changes**: See [REDLINING.md](REDLINING.md)
|
|
83
|
+
**For OOXML details**: See [OOXML.md](OOXML.md)
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Hard rules
|
|
87
|
+
|
|
88
|
+
### 500-line cap on SKILL.md body
|
|
89
|
+
|
|
90
|
+
> Source A: "Keep SKILL.md body under 500 lines for optimal performance. If your content exceeds this, split it into separate files."
|
|
91
|
+
|
|
92
|
+
### One level deep
|
|
93
|
+
|
|
94
|
+
> Source A: "Keep references one level deep from SKILL.md. All reference files should link directly from SKILL.md."
|
|
95
|
+
|
|
96
|
+
> Source A: "Claude may partially read files when they're referenced from other referenced files. When encountering nested references, Claude might use commands like `head -100` to preview content rather than reading entire files, resulting in incomplete information."
|
|
97
|
+
|
|
98
|
+
**Bad:** `SKILL.md → advanced.md → details.md`
|
|
99
|
+
**Good:** `SKILL.md → advanced.md`, `SKILL.md → details.md`
|
|
100
|
+
|
|
101
|
+
### TOC for files over 100 lines
|
|
102
|
+
|
|
103
|
+
> Source A: "For reference files longer than 100 lines, include a table of contents at the top. This ensures Claude can see the full scope of available information even when previewing with partial reads."
|
|
104
|
+
|
|
105
|
+
### Forward slashes only
|
|
106
|
+
|
|
107
|
+
> Source A: "Always use forward slashes in file paths, even on Windows. Unix-style paths work across all platforms."
|
|
108
|
+
|
|
109
|
+
## File naming conventions
|
|
110
|
+
|
|
111
|
+
> Source A: "Name files descriptively: Use names that indicate content: `form_validation_rules.md`, not `doc2.md`."
|
|
112
|
+
|
|
113
|
+
> Source A: "Organize for discovery: Structure directories by domain or feature. Good: `reference/finance.md`, `reference/sales.md`. Bad: `docs/file1.md`, `docs/file2.md`."
|
|
114
|
+
|
|
115
|
+
## Scripts: execute vs read
|
|
116
|
+
|
|
117
|
+
> Source A: "Make clear in your instructions whether Claude should execute the script or read it as reference."
|
|
118
|
+
|
|
119
|
+
- **Execute:** "Run `analyze_form.py` to extract fields"
|
|
120
|
+
- **Read as reference:** "See `analyze_form.py` for the extraction algorithm"
|
|
121
|
+
|
|
122
|
+
> Source A: "For most utility scripts, execution is preferred because it's more reliable and efficient."
|