agent-enforcement

Validate /team agent selections against a whitelist and block insecure paths.

7|4|Updated Feb 26, 2026
One-click install
npx skills add https://github.com/MadAppGang/magus --skill agent-enforcement
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-enforcement
Source: https://github.com/MadAppGang/magus/tree/main/plugins/multimodel/skills/agent-enforcement
Command: npx skills add https://github.com/MadAppGang/magus --skill agent-enforcement

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents the /team command from violating agent selection rules and using insecure paths, ensuring reliable multi-agent orchestration and debugging failures.

Core Features & Use Cases

  • Runtime Violation Blocking: A PreToolUse hook intercepts and blocks invalid /team Task or Bash tool calls.
  • Agent Whitelist Enforcement: Ensures /team Tasks only use agents from a predefined, secure whitelist.
  • Secure Path Validation: Prevents the use of insecure temporary paths like /tmp/ in Task prompts.
  • Model Reliability: Leverages model: opus for better instruction following in complex scenarios.
  • Use Case: When a /team command fails unexpectedly due to an incorrect agent being assigned or an insecure path being referenced, this Skill's enforcement mechanisms can be activated to diagnose and prevent the issue.

Quick Start

Use the agent-enforcement skill to validate agent selections for the /team command.

Frequently Asked Questions about agent-enforcement

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce a secure agent whitelist for multi-agent orchestration?

To enforce a secure agent whitelist for multi-agent orchestration, you use a PreToolUse hook that intercepts Task or Bash tool calls and validates agent selections against a predefined whitelist before execution proceeds. This ensures deterministic CLI calls for external models and reliable instruction following for internal models.

Why does my multi-agent Task command fail when referencing insecure paths?

Multi-agent Task commands fail when referencing insecure paths because secure path validation mechanisms block temporary directories like /tmp/ in Task prompts to prevent orchestration violations and ensure reliable debugging. Activating enforcement mechanisms diagnoses the issue and prevents unexpected failures.

What is a PreToolUse hook for agent rule enforcement?

A PreToolUse hook for agent rule enforcement is a mechanism that intercepts and blocks invalid Task or Bash tool calls, ensuring that multi-agent orchestration adheres to predefined security rules and agent selections before execution. It guarantees deterministic CLI calls and reliable instruction following.

How do I block invalid agent selections during team orchestration?

You block invalid agent selections during team orchestration by activating enforcement mechanisms that validate agent choices against a secure whitelist, leveraging model selection to ensure better instruction following in complex scenarios. This operates via a PreToolUse hook to intercept and block invalid calls.

Can I use internal models for reliable instruction following in complex orchestration scenarios?

Yes, you can achieve reliable instruction following for internal models in complex orchestration scenarios by leveraging model selection, which ensures deterministic CLI calls for external models and validates agent selections against a whitelist. This guarantees reliable multi-agent orchestration and debugging.

What are the limitations of using temporary paths in Task prompts?

The limitation of using temporary paths like /tmp/ in Task prompts is that secure path validation will actively prevent their use, blocking the Task execution to avoid insecure directory references during multi-agent orchestration. This ensures reliable multi-agent orchestration and debugging failures.