cc-dev-template 0.1.98 → 0.1.99
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/package.json
CHANGED
|
@@ -57,6 +57,45 @@ Configuration: No special setting needed
|
|
|
57
57
|
|
|
58
58
|
Configuration: `context: fork` (optionally add `agent: Explore` or `agent: Plan` for specialized behavior)
|
|
59
59
|
|
|
60
|
+
## Design Constraints
|
|
61
|
+
|
|
62
|
+
Only relevant for skills that orchestrate sub-agents or have clear role boundaries. Skip this section for simple informational skills or single-step workflows.
|
|
63
|
+
|
|
64
|
+
### Constraint Mechanisms
|
|
65
|
+
|
|
66
|
+
From weakest to strongest:
|
|
67
|
+
|
|
68
|
+
| Mechanism | What It Does | Use When |
|
|
69
|
+
|-----------|-------------|----------|
|
|
70
|
+
| Prompt instructions | Advisory guidance in skill/agent text | Soft guidance, not security-critical |
|
|
71
|
+
| `allowed-tools` (skill frontmatter) | Auto-approves listed tools (no user prompt). Does NOT block anything. | Reducing user friction for known-safe tools |
|
|
72
|
+
| `tools` (agent frontmatter) | Grants ONLY listed tools to sub-agent. Everything else denied. | Coarse tool-level restriction (e.g., read-only agent) |
|
|
73
|
+
| PreToolUse hook (settings.json) | Script checks every tool call against policy rules. Can inspect file paths, commands, agent identity. | Path-level enforcement, per-phase rules, cross-agent policies |
|
|
74
|
+
| Inline content passing | Pass file contents in Agent prompt instead of letting agent read files. Combined with restricted `tools`, agent physically cannot access unauthorized files. | Contamination prevention, strongest isolation |
|
|
75
|
+
|
|
76
|
+
### Constraint Design Questions
|
|
77
|
+
|
|
78
|
+
Ask the user these questions when the skill involves sub-agents:
|
|
79
|
+
|
|
80
|
+
- Should the orchestrator be restricted? (e.g., blocked from source code, forced to delegate)
|
|
81
|
+
- Should sub-agents only access specific files/directories?
|
|
82
|
+
- Are there contamination concerns? (agents that should be blind to certain information)
|
|
83
|
+
- Should certain deliverables only be writable by specific agents?
|
|
84
|
+
|
|
85
|
+
### Constraint Map
|
|
86
|
+
|
|
87
|
+
If constraints are needed, produce a constraint map before designing frontmatter: which agent can do what, and which mechanism enforces each rule. This feeds into the frontmatter design and may require a hook script.
|
|
88
|
+
|
|
89
|
+
Example format:
|
|
90
|
+
```
|
|
91
|
+
Orchestrator: no Bash, no source code reads → PreToolUse hook
|
|
92
|
+
Researcher agent: tools: Read, Grep, Glob, Write → agent frontmatter
|
|
93
|
+
Writer agent: only writes to docs/output/ → PreToolUse hook (path check)
|
|
94
|
+
Reviewer agent: receives content inline, no file reads → inline content passing + tools: Write
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Reference the creating-sub-agents skill for detailed sub-agent constraint configuration (tool sets, permission modes, hook examples).
|
|
98
|
+
|
|
60
99
|
## Design the Frontmatter
|
|
61
100
|
|
|
62
101
|
Every skill has YAML frontmatter. Required and optional fields:
|
|
@@ -75,7 +114,7 @@ Every skill has YAML frontmatter. Required and optional fields:
|
|
|
75
114
|
| `argument-hint` | Placeholder shown after slash command (e.g., `[issue-number]`, `[filename]`) |
|
|
76
115
|
| `disable-model-invocation` | Set `true` to prevent Claude from auto-activating — use for side-effect workflows like deploy or commit |
|
|
77
116
|
| `user-invocable` | Set `false` to hide from the `/` menu — use for background knowledge skills |
|
|
78
|
-
| `allowed-tools` |
|
|
117
|
+
| `allowed-tools` | Pre-approve tools for auto-acceptance (user won't be prompted for these). Does NOT restrict — unlisted tools still work, they just require user approval. |
|
|
79
118
|
| `model` | Override the model used when this skill is active |
|
|
80
119
|
| `context` | Set `fork` to run in an isolated sub-agent context |
|
|
81
120
|
| `agent` | Sub-agent type when `context: fork` is set (`Explore`, `Plan`, `general-purpose`, or custom) |
|
|
@@ -49,6 +49,12 @@ Go through each file and verify:
|
|
|
49
49
|
- For informational skills: reflection section at the end of SKILL.md?
|
|
50
50
|
- For forked-context skills: "Skill Observations" section in the output format?
|
|
51
51
|
|
|
52
|
+
### Constraints
|
|
53
|
+
- If the skill spawns sub-agents: are tool grants appropriate for each agent's role?
|
|
54
|
+
- Is `allowed-tools` used correctly? (auto-approval only, not restriction)
|
|
55
|
+
- If path-level restrictions are needed: is a PreToolUse hook designed?
|
|
56
|
+
- Are constraint decisions documented in the skill (so future editors understand why)?
|
|
57
|
+
|
|
52
58
|
## Run Validation
|
|
53
59
|
|
|
54
60
|
```bash
|
|
@@ -167,6 +167,14 @@ if (!frontmatter.valid) {
|
|
|
167
167
|
null,
|
|
168
168
|
'Remove all < and > characters from frontmatter values');
|
|
169
169
|
}
|
|
170
|
+
|
|
171
|
+
// Check: allowed-tools usage awareness
|
|
172
|
+
if (frontmatter.data['allowed-tools']) {
|
|
173
|
+
addFinding('CONSTRAINT', 'info',
|
|
174
|
+
'Skill uses allowed-tools — this pre-approves tools for auto-acceptance, it does NOT restrict tool access. If restriction is intended, use the tools field on sub-agent definitions instead.',
|
|
175
|
+
null,
|
|
176
|
+
'See creating-sub-agents skill for sub-agent tool restriction patterns');
|
|
177
|
+
}
|
|
170
178
|
}
|
|
171
179
|
|
|
172
180
|
// Check 3: Second person violations
|