madappgang/claude-code/agent-enforcement

Trust tier 2
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Multi-agent orchestration enforcement for /team command. Provides claudish CLI validation, validates session directory paths, and ensures /team internal Tasks use dev:researcher. Use when debugging /team orchestration failures.

Install

npx vskill@latest install madappgang/claude-code/agent-enforcement

SKILL.md

Agent Enforcement Skill

Overview

Two-layer defense against orchestration violations in /team:

  1. PreToolUse hook (hooks/enforce-team-rules.sh) — runtime violation blocker
  2. Model upgrade (team.md: model: opus) — better instruction following

How /team Invokes Models

Model TypeMethodToolReliability
Internal (Claude)Task(dev:researcher)Task toolHigh (same process)
External (Grok, Gemini, etc.)Bash(claudish --model)Bash tool100% (deterministic CLI)

External models are called via claudish CLI directly from Bash — no LLM delegation needed.

Hook Rules (enforce-team-rules.sh)

The PreToolUse hook intercepts Task and Bash tool calls at runtime:

RuleConditionAction
1/team Task with wrong agentDENY (must be dev:researcher)
2/tmp/ in Task promptDENY
Layer 1: PreToolUse Hook

Detects /team workflows by vote template pattern in Task prompts. Blocks:

  • Wrong agent for /team Tasks: Only dev:researcher is allowed for internal model Tasks
  • Insecure paths: No /tmp/ paths in Task prompts (use ai-docs/sessions/)
Layer 2: model: opus

The /team command uses model: opus (Opus 4.6) which follows complex XML instructions much more reliably than Sonnet (~90% vs ~33% compliance).

Agent Selection for Task Delegation

Task TypePrimary AgentAlternatives
Investigationdev:researcherdev:debugger
Reviewagentdev:reviewerfrontend:reviewer
Architecturedev:architectfrontend:architect, agentdev:architect
Implementationdev:developerfrontend:developer, agentdev:developer
Testingdev:test-architectfrontend:test-architect
DevOpsdev:devops—
UI/Designdev:uifrontend:designer, frontend:ui-developer

Pre-processor (resolve-agents.sh)

The /team command can optionally call resolve-agents.sh to determine agent and method for each model before launching:

bash
bash "${CLAUDE_PLUGIN_ROOT}/scripts/resolve-agents.sh" \
--models "internal,x-ai/grok-code-fast-1" \
--task-type "investigation"

Output:

json
{
"sessionDir": "ai-docs/sessions/team-slug-timestamp-random",
"taskType": "investigation",
"resolutions": [
{ "modelId": "internal", "method": "direct", "agent": "dev:researcher" },
{ "modelId": "x-ai/grok-code-fast-1", "method": "cli", "agent": "dev:researcher" }
]
}

Methods:

  • "direct" — Internal Claude via Task(agent)
  • "cli" — External model via Bash(claudish --model)

Validation

Run the test suite to verify enforcement:

bash
cd autotest/team && bash run-tests.sh

Troubleshooting

Hook blocking legitimate calls: The hook triggers on /team vote template patterns in Task prompts and claudish in Bash commands. Normal Task usage (without vote templates) is never affected.

resolve-agents.sh not found: The /team command uses its own built-in logic. The hook still provides runtime protection.

Hook behavior: The hook skips existence checks (which claudish, command -v claudish).

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
279
Repository forks
32
7-day trend score
28

Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 12 May 2026, 5 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/madappgang/claude-code/agent-enforcement/badge)](https://verified-skill.com/skills/madappgang/claude-code/agent-enforcement)

Something wrong with this skill or its page? Tell us.