You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: Restrict sub-agent types per skill via Task(agent_type) frontmatter #262
Claude Code v2.1.33 added support for restricting which sub-agent types a skill can spawn via Task(agent_type) syntax in skill frontmatter tools: fields.
Currently, sequant skills declare Task (unrestricted) in their frontmatter, meaning any skill can spawn any agent type. This works but provides no guardrails — /spec (a planning phase) could theoretically spawn Bash agents that modify files, and /qa (a review phase) could spawn agents that write code.
general-purpose — parallel group implementation (3 occurrences)
/security-review
Task
Task(Explore)
No sub-agents currently, but read-only analysis fits Explore
/testgen
Task
Task(general-purpose)
general-purpose with haiku model for cost-efficient stubs
Skills that orchestrate other skills (keep unrestricted)
Skill
Current
Keep as
Rationale
/fullsolve
Task
Task
Orchestrator — invokes child skills, needs all agent types
/merger
Task
Task
Orchestrator — no sub-agents but needs flexibility
Implementation notes
Changes are frontmatter-only — one line per skill file
Both templates/skills/*/SKILL.md and .claude/skills/*/SKILL.md need updating
Caution:npm run sync:skills (cp -r templates/skills/* .claude/skills/) overwrites project-specific .claude/skills/ content. The live skill files have customizations not in templates. Apply changes to both locations independently.
Tests pass with current code; no test changes needed for frontmatter-only edits
# AC-1 & AC-2: Frontmatter matches usageGiven skill templates are updated
When parsing frontmatter allowed-tools
Then spec has Task(Explore), qa/exec have Task(general-purpose)
# AC-3: Update syncs correctly Given templates/skills/spec/SKILL.md has Task(Explore)
When running sequant update --force
Then .claude/skills/spec/SKILL.md contains Task(Explore)
# AC-4: Unused Task removedGiven fullsolve, merger, security-review don't spawn sub-agents
When checking their frontmatter
Then Task is not in allowed-tools
Assumptions
Claude Code v2.1.33+ is required for Task(agent_type) syntax
Changes are frontmatter-only, no skill logic modifications
Agent type restrictions match actual sub-agent usage
MET
Verified: all frontmatter restrictions match subagent_type= patterns in bodies
AC-3
Original
sequant update syncs updated frontmatter
MET
Template and .claude Task lines match for all changed skills
AC-4
Original
Skills without sub-agents don't list Task
NOT_MET
2 issues found (see below)
Coverage: 3/4 AC items fully met
AC-4 Findings
Two skills still have Task in frontmatter that should be addressed:
fullsolve (both template + .claude): Has unrestricted Task but body uses Skill() tool, not Task(). Per AC-4 it should be removed. The audit recommended keeping it as an "orchestrator", but the spec plan said to remove it. Recommendation: remove — fullsolve invokes child skills via Skill() which is a separate tool from Task.
.claude/skills/testgen/SKILL.md (project-specific only): Has unrestricted Task and actually spawns subagent_type="general-purpose" sub-agents. Should be Task(general-purpose). The template version correctly doesn't have Task (template doesn't reference sub-agents). The audit identified this skill but the implementation missed it.
CI Status
Check
State
Impact
build (18.x)
SUCCESS
✅
build (20.x)
SUCCESS
✅
build (22.x)
SUCCESS
✅
validate-skills
SUCCESS
✅
validate-plugin
SUCCESS
✅
typecheck
SUCCESS
✅
CI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK
Deleted tests
0
OK
Files changed
9
OK
Lines added
+5
OK
Lines deleted
-9
OK
Build Verification
N/A — Build passed
Test Coverage Analysis
N/A — Changes are frontmatter-only (Markdown skill files). No source code or test files modified. All 1178 tests pass.
Code Review
Strengths:
Minimal, focused changes — one line per file, frontmatter only
Both templates/ and .claude/skills/ updated independently (avoiding destructive sync)
Agent type selections are accurate (spec=Explore for read-only, qa/exec=general-purpose for quality checks)
Merger and security-review correctly have Task removed (no sub-agents in body)
Issues:
Missing fullsolve Task removal (spec plan said remove, audit said keep — exec followed audit)
Remove Task from fullsolve frontmatter (both template and .claude) — it uses Skill(), not Task()
Change .claude/skills/testgen/SKILL.md line 20 from - Task to - Task(general-purpose)
Anti-Pattern Detection
N/A — No source code changes, frontmatter-only modifications
Skill Command Verification
N/A — Skill files were modified but only frontmatter allowed-tools: entries, not command references
Self-Evaluation
Verified working: Yes — builds pass, tests pass, CI green. Frontmatter changes are configuration-only.
Test efficacy: N/A — no testable logic changed; validate-skills CI check provides structural validation
Likely failure mode: A skill trying to spawn a sub-agent type not in its frontmatter would be blocked by Claude Code's permission system. This is the desired behavior.
Verdict confidence: High — the 2 missed items (fullsolve, testgen) are clear and verifiable
Verdict: AC_NOT_MET
AC-4 has two violations:
fullsolve retains unrestricted Task despite not using sub-agents
.claude/skills/testgen/SKILL.md has unrestricted Task instead of Task(general-purpose)
Both are quick fixes (one-line each).
Next Steps
Remove- Task from templates/skills/fullsolve/SKILL.md and .claude/skills/fullsolve/SKILL.md
Change- Task to - Task(general-purpose) in .claude/skills/testgen/SKILL.md
Agent type restrictions match actual sub-agent usage
MET
All frontmatter restrictions verified against subagent_type= patterns in bodies
AC-3
Original
sequant update syncs updated frontmatter
MET
Template and .claude Task lines match for all changed skills
AC-4
Original
Skills without sub-agents don't list Task
MET
fullsolve, merger, security-review all have Task removed; no unrestricted Task remains
Coverage: 4/4 AC items fully met
CI Status
Check
State
Impact
build (18.x)
SUCCESS
✅
build (20.x)
SUCCESS
✅
build (22.x)
SUCCESS
✅
validate-skills
SUCCESS
✅
validate-plugin
SUCCESS
✅
typecheck
SUCCESS
✅
CI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
Metric
Value
Status
Type issues (any)
0
OK
Deleted tests
0
OK
Files changed
12
OK
Lines added
+6
OK
Lines deleted
-12
OK
Full Audit Results
Skills with Task(type) in frontmatter (all match body usage):
Skill
Frontmatter
Body subagent_type
Match
spec
Task(Explore)
Explore (6 refs)
✅
qa
Task(general-purpose)
general-purpose (6 refs)
✅
exec
Task(general-purpose)
general-purpose (3 refs)
✅
testgen (.claude)
Task(general-purpose)
general-purpose (4 refs)
✅
Skills with Task removed (no sub-agent usage in body):
Skill
Location
Sub-agents in body
Status
fullsolve
template + .claude
0 (uses Skill())
✅ Removed
merger
.claude only
0
✅ Removed
security-review
template + .claude
0
✅ Removed
All other skills: No Task in frontmatter, no subagent_type in body ✅
Test Coverage Analysis
N/A — Frontmatter-only changes. All 1178 tests pass. Build passes.
Code Review
Strengths:
Minimal, surgical changes — one line per file
Both templates/ and .claude/skills/ updated independently (preserving customizations)
Agent type selections are semantically correct (spec=Explore for read-only, qa/exec/testgen=general-purpose)
Net reduction of 6 lines (removing permissions is good)
Issues: None found
Self-Evaluation
Verified working: Yes — build passes, all tests pass, CI green, full frontmatter audit clean
Test efficacy: N/A — validate-skills CI check provides structural validation of frontmatter
Likely failure mode: A skill trying to spawn an agent type outside its restriction would be blocked by Claude Code. This is the desired behavior (principle of least privilege).
Verdict confidence: High — exhaustive audit confirms zero unrestricted Task entries remain, all restrictions match body usage
Verdict: READY_FOR_MERGE
All 4 ACs are fully met. Changes are focused, correct, and well-audited.
Documentation
N/A — No documentation needed (invisible improvement, no user-facing changes)
Activity
admarble commentedon Feb 6, 2026
Audit Findings
Audited all skill templates. Here's the mapping from current usage to proposed restrictions:
Skills that spawn sub-agents (change needed)
/specTaskTask(Explore)Explore— read-only codebase research (6 occurrences)/qaTaskTask(general-purpose)general-purpose— parallel quality checks (3 occurrences)/execTaskTask(general-purpose)general-purpose— parallel group implementation (3 occurrences)/security-reviewTaskTask(Explore)/testgenTaskTask(general-purpose)general-purposewith haiku model for cost-efficient stubsSkills that orchestrate other skills (keep unrestricted)
/fullsolveTaskTask/mergerTaskTaskImplementation notes
templates/skills/*/SKILL.mdand.claude/skills/*/SKILL.mdneed updatingnpm run sync:skills(cp -r templates/skills/* .claude/skills/) overwrites project-specific.claude/skills/content. The live skill files have customizations not in templates. Apply changes to both locations independently.From upstream assessment audit
admarble commentedon Feb 6, 2026
📋 /spec Plan Review
Acceptance Criteria with Verification
Task(agent_type)instead of unrestrictedTaskTaskentriessubagent_type=patternssequant updatesyncs updated frontmatter.claude/skills/matches templatesTaskImplementation Plan
Phase 1: Update Template Frontmatter
Per audit findings, apply these changes to
templates/skills/*/SKILL.md:/specTaskTask(Explore)/qaTaskTask(general-purpose)/execTaskTask(general-purpose)/fullsolveTask/security-reviewTaskPhase 2: Mirror to
.claude/skills/Apply same changes to live skill files (independent of templates due to local customizations).
Phase 3: Verification
npm run build)sequant update --dry-runshows expected sync behaviorTest Scenarios
Assumptions
Task(agent_type)syntaxsequant updatealready handles template → .claude sync (no code changes needed)Recommended Workflow
Phases: exec → qa
Quality Loop: disabled
Reasoning: Focused configuration changes with clear audit-backed specifications
Plan generated by
/spec 262feat(skills): restrict sub-agent types per skill frontmatter
admarble commentedon Feb 6, 2026
🔧 /exec Progress Update
AC Coverage Summary
Task(agent_type)instead of unrestrictedTasksubagent_typepatterns in skill bodiessequant updatesyncs updated frontmattertemplates/and.claude/skills/updatedTaskFiles Changed
Templates:
templates/skills/spec/SKILL.md- Task → Task(Explore)templates/skills/qa/SKILL.md- Task → Task(general-purpose)templates/skills/exec/SKILL.md- Task → Task(general-purpose)templates/skills/security-review/SKILL.md- Task removedLive Skills:
.claude/skills/spec/SKILL.md- Task → Task(Explore).claude/skills/qa/SKILL.md- Task → Task(general-purpose).claude/skills/exec/SKILL.md- Task → Task(general-purpose).claude/skills/security-review/SKILL.md- Task removed.claude/skills/merger/SKILL.md- Task removedCheck Results
npm run buildnpm run lintnpm testPR Created
PR #263: #263
Notes
/fullsolveintentionally retains unrestrictedTaskas it's an orchestrator that invokes child skillstemplates/and.claude/skills/independently per audit recommendation (local customizations preserved)Progress update from
/exec 262admarble commentedon Feb 6, 2026
🔍 QA Review for Issue #262
AC Coverage
Task(agent_type)instead of unrestrictedTasksubagent_type=patterns in bodiessequant updatesyncs updated frontmatterTaskCoverage: 3/4 AC items fully met
AC-4 Findings
Two skills still have
Taskin frontmatter that should be addressed:fullsolve(both template + .claude): Has unrestrictedTaskbut body usesSkill()tool, notTask(). Per AC-4 it should be removed. The audit recommended keeping it as an "orchestrator", but the spec plan said to remove it. Recommendation: remove — fullsolve invokes child skills viaSkill()which is a separate tool fromTask..claude/skills/testgen/SKILL.md(project-specific only): Has unrestrictedTaskand actually spawnssubagent_type="general-purpose"sub-agents. Should beTask(general-purpose). The template version correctly doesn't have Task (template doesn't reference sub-agents). The audit identified this skill but the implementation missed it.CI Status
build (18.x)build (20.x)build (22.x)validate-skillsvalidate-plugintypecheckCI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
any)Build Verification
N/A — Build passed
Test Coverage Analysis
N/A — Changes are frontmatter-only (Markdown skill files). No source code or test files modified. All 1178 tests pass.
Code Review
Strengths:
templates/and.claude/skills/updated independently (avoiding destructive sync)Issues:
fullsolveTask removal (spec plan said remove, audit said keep — exec followed audit).claude/skills/testgen/SKILL.mdupdate (audit identified it, exec missed it)Suggestions:
Taskfrom fullsolve frontmatter (both template and .claude) — it usesSkill(), notTask().claude/skills/testgen/SKILL.mdline 20 from- Taskto- Task(general-purpose)Anti-Pattern Detection
N/A — No source code changes, frontmatter-only modifications
Skill Command Verification
N/A — Skill files were modified but only frontmatter
allowed-tools:entries, not command referencesSelf-Evaluation
validate-skillsCI check provides structural validationVerdict: AC_NOT_MET
AC-4 has two violations:
fullsolveretains unrestrictedTaskdespite not using sub-agents.claude/skills/testgen/SKILL.mdhas unrestrictedTaskinstead ofTask(general-purpose)Both are quick fixes (one-line each).
Next Steps
- Taskfromtemplates/skills/fullsolve/SKILL.mdand.claude/skills/fullsolve/SKILL.md- Taskto- Task(general-purpose)in.claude/skills/testgen/SKILL.md/qa 262after fixesQA review by
/qa 262admarble commentedon Feb 6, 2026
🔍 QA Review for Issue #262 (Re-run)
AC Coverage
Task(agent_type)instead of unrestrictedTasksubagent_type=patterns in bodiessequant updatesyncs updated frontmatterTaskCoverage: 4/4 AC items fully met
CI Status
build (18.x)build (20.x)build (22.x)validate-skillsvalidate-plugintypecheckCI Summary: 6 passed, 0 pending, 0 failed
Quality Metrics
any)Full Audit Results
Skills with
Task(type)in frontmatter (all match body usage):Task(Explore)Task(general-purpose)Task(general-purpose)Task(general-purpose)Skills with Task removed (no sub-agent usage in body):
Skill())All other skills: No
Taskin frontmatter, nosubagent_typein body ✅Test Coverage Analysis
N/A — Frontmatter-only changes. All 1178 tests pass. Build passes.
Code Review
Strengths:
templates/and.claude/skills/updated independently (preserving customizations)Issues: None found
Self-Evaluation
validate-skillsCI check provides structural validation of frontmatterVerdict: READY_FOR_MERGE
All 4 ACs are fully met. Changes are focused, correct, and well-audited.
Documentation
Next Steps
Documentation: Before merging, run
/docs 262to generate feature documentation.QA re-run by
/qa 262admarble commentedon Feb 6, 2026
✅ Post-Merge Smoketest
Verified on
mainafter squash merge:Frontmatter Audit (all skills)
Task(Explore)Task(general-purpose)Task(general-purpose)Task(general-purpose)Skill(no Task)Unrestricted
Taskentries: 0Build & Tests
npm run build: ✅ passednpm test: ✅ 1178 passedTemplate/Live Sync
All Task and Skill declarations match between
templates/skills/and.claude/skills/.Post-merge smoketest by
/qa 262docs: document sub-agent type restrictions (#262)