plugins/multimodel/skills/agent-enforcement/SKILL.md
Multi-agent orchestration enforcement for /team command. Validates session directory paths and ensures /team Tasks use a valid agent from the routing whitelist. Use when debugging /team orchestration failures.
npx skillsauth add madappgang/magus agent-enforcementInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Two-layer defense against orchestration violations in /team:
hooks/enforce-team-rules.sh) — runtime violation blockerteam.md: model: opus) — better instruction following| Model Type | Method | Tool | Reliability | |------------|--------|------|-------------| | Internal (Claude) | Task({resolved_agent}) | Task tool | High (same process) | | External (Grok, Gemini, etc.) | claudish MCP tools (team/create_session) | MCP | 100% (deterministic) |
External models are called via claudish MCP tools — no Bash invocation needed.
The PreToolUse hook intercepts Task and Bash tool calls at runtime:
| Rule | Condition | Action | |------|-----------|--------| | 1 | /team Task with wrong agent | DENY (must be in agent whitelist) | | 2 | /tmp/ in Task prompt | DENY |
Detects /team workflows by vote template pattern in Task prompts. Blocks:
dev:researcher, dev:debugger, dev:developer, dev:architect, dev:test-architect, dev:devops, dev:ui/tmp/ paths in Task prompts (use ai-docs/sessions/)The /team command uses model: opus (Opus 4.6) which follows complex XML instructions
much more reliably than Sonnet (~90% vs ~33% compliance).
| Task Type | Primary Agent | Alternatives | |-----------|--------------|--------------| | Investigation | dev:researcher | dev:debugger | | Review | dev:researcher | frontend:reviewer | | Architecture | dev:architect | frontend:architect, agentdev:architect | | Implementation | dev:developer | frontend:developer, agentdev:developer | | Testing | dev:test-architect | frontend:test-architect | | DevOps | dev:devops | — | | UI/Design | dev:ui | frontend:designer, frontend:ui-developer |
The /team command resolves the agent dynamically from the context detection table in team.md
based on task keywords (e.g., "debug" → dev:debugger, "review" → dev:researcher).
The hook enforces a whitelist of all valid agents.
Methods:
team MCP tool (handles parallel execution internally)Run the test suite to verify enforcement:
cd autotest/team && bash run-tests.sh
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).
testing
A test skill for validation testing. Use when testing skill parsing and validation logic.
tools
--- name: bad-skill description: This skill has invalid YAML in frontmatter allowed-tools: [invalid, array, syntax prerequisites: not-an-array --- # Bad Skill This skill has malformed frontmatter that should fail parsing. The YAML has: - Unclosed array bracket - Wrong type for prerequisites (should be array, not string)
development
Sync model aliases from the curated Firebase database. Fetches default model assignments, short aliases, team compositions, and known model metadata from the claudish API. Run this to get fresh model recommendations.
tools
Release one or more Magus plugins to the distribution repos (magus, magus-alpha, magus-marketing). Handles version inference from git history, marketplace.json updates, tagging, and force-push to lean dist repos. Use whenever the user says "release kanban", "release the dev plugin", "cut a new version of gtd", "bump kanban to 1.7", or hands you a batch like "release kanban and gtd". Also use for multi-plugin releases and for checking what a release would contain before committing.