Agent skill

Agent Enforcement

by MadAppGang in MadAppGang/claude-code

Multi-agent orchestration enforcement for /team command. An agent skill from MadAppGang/claude-code.

MITAuto-check passedAgent Workflows

Install Agent Enforcement

skills CLI
$ npx skills add MadAppGang/claude-code --skill agent-enforcement -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MadAppGang/claude-code agent-enforcement --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MadAppGang/claude-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/multimodel/skills/agent-enforcement .claude/skills/agent-enforcement && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-enforcement
GitHub stars
285
Token cost
~895 tokens
SKILL.md length
298 words
Files
1
Skills in repo
69
Repo updated
First seen
Licence
MIT

At a glance

Multi-agent orchestration enforcement for /team command. An agent skill from MadAppGang/claude-code.

  • Works in 2 steps: PreToolUse hook… → Model upgrade (team.md: model: opus) —…
  • Debugging /team orchestration failures
  • SKILL.md covers Overview, How /team Invokes Models, Hook Rules… and Agent Selection for Task…, plus 3 more sections
  • Calls bash

What it does

Agent Enforcement is an agent skill from MadAppGang/claude-code. 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.

Its SKILL.md is about 900 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Multi-agent orchestration. It works with Bash. The repository describes itself as: claude code plugins marketplace. The licence is MIT.

When your agent uses it

  • Debugging /team orchestration failures
  • Tasks that involve Multi-agent orchestration

Example prompts

  • “/agent-enforcement”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

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

What it can do on your machine

Read from SKILL.md and the folder at commit 6097ad4. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • bash

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Enforcement loads about 895 tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 298 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~895

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MadAppGang/claude-code at commit 6097ad4, republished under its MIT licence (© MadAppGang). 298 words, ~895 tokens.

Download SKILL.mdSave it as .claude/skills/agent-enforcement/SKILL.md (or your agent's skills folder).
name
agent-enforcement
description
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.
triggers
team enforcement, agent selection, orchestration failure, claudish agent flag

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).

© MadAppGang, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/multimodel/skills/agent-enforcement of MadAppGang/claude-code.

Open the folder on GitHubat commit 6097ad4

Compare with similar skills

Agent Enforcement next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Enforcement compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Enforcement this skillMadAppGang/claude-code285—~895Automated safety check: PassMIT
Kimi Code DelegationCherryHQ/cherry-studio53k—~504Automated safety check: PassAGPL-3.0
Agentlas Core Engine Meta Agentagentlas-ai/Agentlas-OS1.6k—~467Automated safety check: PassApache-2.0
Benchmark Agentsvercel/vercel-plugin301—~3.6kAutomated safety check: PassCustom licence
Cc GodmodeLeoYeAI/openclaw-master-skills2.2k—~5kAutomated safety check: PassMIT
Orca CLIstablyai/orca89k2 repos~593Automated safety check: PassMIT

Similar skills

  • Kimi Code Delegation

    CherryHQ/cherry-studio

    Delegates one bounded repository task to Kimi Code in non-interactive prompt mode and reads back the final result from its JSON event stream.

    53k GitHub stars~504 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agentlas Core Engine Meta Agent

    agentlas-ai/Agentlas-OS

    A skill your agent uses when creating a single Agentlas agent, creating a multi-agent team, or packaging an existing local/external agent into Agentlas architecture.

    1.6k GitHub stars~467 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Benchmark Agents

    vercel/vercel-plugin

    Official

    Advanced AI agent benchmark scenarios that push Vercel's cutting-edge platform features — Workflow SDK, AI Gateway, MCP, Chat SDK, Queues, Flags, Sandbox, and multi-agent orchestration.

    301 GitHub stars~3.6k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Cc Godmode

    LeoYeAI/openclaw-master-skills

    Self-orchestrating multi-agent development workflows. An agent skill from LeoYeAI/openclaw-master-skills.

    2.2k GitHub stars~5k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Orca CLI

    stablyai/orca

    Operate Orca-managed worktrees, folder contexts, terminals, repos, automations, artifacts, skill sharing, worktree comments, and Orca's embedded browser…

    89k GitHub starsUsed in 2 repos~593 tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 9 days ago
    Agent WorkflowsAuto-check passed

More from MadAppGang/claude-code

All 69 skills in this repo
  • Content Brief

    MadAppGang/claude-code

    Content brief template and creation methodology for SEO-optimized content.

    285 GitHub starsUsed in 1 repo~959 tokens
    Auto-check passed
  • Context Detection

    MadAppGang/claude-code

    A skill your agent uses when detecting project technology stack from files/configs/directory structure, auto-loading framework-specific skills, or analyzing multi-stack fullstack projects (e.g…

    285 GitHub stars~5.4k tokensUpdated 7 mo ago
    Auto-check passed
  • Content Optimizer

    MadAppGang/claude-code

    On-page SEO optimization techniques including keyword density, meta tags, heading structure, and readability.

    285 GitHub starsUsed in 1 repo~694 tokens
    Auto-check passed
  • Keyword Cluster Builder

    MadAppGang/claude-code

    Techniques for expanding seed keywords and clustering by topic and intent.

    285 GitHub starsUsed in 1 repo~674 tokens
    Auto-check passed
  • Serp Analysis

    MadAppGang/claude-code

    SERP analysis techniques for intent classification, feature identification, and competitive intelligence.

    285 GitHub starsUsed in 1 repo~1k tokens
    Auto-check passed
  • Agent Coordination Discipline

    MadAppGang/claude-code

    A skill your agent uses when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents.

    285 GitHub stars~3.8k tokensUpdated 7 mo ago
    Auto-check passed

Works with

Questions about Agent Enforcement

What does Agent Enforcement do?

Multi-agent orchestration enforcement for /team command. An agent skill from MadAppGang/claude-code. Agent Enforcement is an agent skill from MadAppGang/claude-code. Multi-agent orchestration enforcement for /team command.

When should I use Agent Enforcement?

Agent Enforcement fits situations like: debugging /team orchestration failures; tasks that involve Multi-agent orchestration.

How do I install Agent Enforcement in Claude Code?

Run `npx skills add MadAppGang/claude-code --skill agent-enforcement -a claude-code`. Or copy the skill folder (plugins/multimodel/skills/agent-enforcement in MadAppGang/claude-code) into .claude/skills/agent-enforcement in your project. Claude Code loads it when a task matches its description.

How do I install Agent Enforcement in Codex?

Run `npx skills add MadAppGang/claude-code --skill agent-enforcement -a codex`. Or copy the skill folder (plugins/multimodel/skills/agent-enforcement in MadAppGang/claude-code) into .agents/skills/agent-enforcement in your project. Codex loads it when a task matches its description.

Can I use Agent Enforcement in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MadAppGang/claude-code --skill agent-enforcement -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-enforcement, .gemini/skills/agent-enforcement, .github/skills/agent-enforcement and .opencode/skills/agent-enforcement in your project.

What does Agent Enforcement need to run?

Going by SKILL.md and its folder, Agent Enforcement needs the command-line tools its instructions call (bash).

Does Agent Enforcement access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Enforcement safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Enforcement use?

Agent Enforcement is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Enforcement use?

About 895 tokens (SKILL.md is roughly 3.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Enforcement?

Skills that share tags, products or a category with Agent Enforcement: Kimi Code Delegation (CherryHQ/cherry-studio, 53k stars), Agentlas Core Engine Meta Agent (agentlas-ai/Agentlas-OS, 1.6k stars), Benchmark Agents (vercel/vercel-plugin, 301 stars) and Cc Godmode (LeoYeAI/openclaw-master-skills, 2.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Enforcement?

MadAppGang (a GitHub organization) maintains it in MadAppGang/claude-code, which has 285 GitHub stars. The repository holds 69 skills in this directory. The repository was last updated on March 15, 2026.

Source: MadAppGang/claude-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.