Skip to content
Back to skills

Agent Test Delegation

ASecurity

Test agent delegation patterns to verify hierarchy and escalation paths. Use after modifying agent structure.

  • 666 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added June 4, 2026
ai-agentspythongobashtestingci/cddocumentation

Works with

  • mcp

Security analysis

A100/100

Scanned June 4, 2026

npx -y skills add majiayu000/claude-skill-registry --skill agent-test-delegation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Test Delegation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Test Delegation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-agent-test-delegation/badge)](https://www.skillsdirectory.com/skills/majiayu000-agent-test-delegation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-test-delegation
description: "Test agent delegation patterns to verify hierarchy and escalation paths. Use after modifying agent structure."
mcp_fallback: none
category: agent
user-invocable: false
---

# Agent Delegation Testing

Verify agent hierarchy, delegation chains, and escalation paths.

## When to Use

- After modifying agent hierarchy
- Verifying escalation paths work correctly
- Troubleshooting delegation issues
- CI/CD validation before merge

## Quick Reference

```bash
# Test all delegation patterns
python3 tests/agents/test_delegation.py .claude/agents/

# Test specific agent delegation
./scripts/test_agent_delegation.sh implementation-specialist

# Visualize delegation tree
./scripts/visualize_delegation.sh
```

## What Gets Tested

**Hierarchy levels**: Agents delegate to lower levels, escalate to higher levels

**Delegation chains**: L0 → L1 → L2 → L3 → L4 (proper tree structure)

**Circular dependencies**: Detect A → B → C → A patterns

**Reference validity**: All delegates_to/escalates_to targets exist

**Level consistency**: Level values correct and levels don't skip improperly

## Validation Rules

| Rule | Example ✅ | Wrong ❌ |
|------|-----------|---------|
| Delegate downward | L2 → L3 | L3 → L2 |
| Escalate upward | L3 → L2 | L3 → L4 |
| No circles | A → B, A → C | A → B → A |
| Valid refs | Existing agent | Nonexistent agent |

## Common Issues

**Circular dependency**: Agent A → Agent B → Agent A

- **Fix**: Break circle by restructuring delegation

**Skip-level delegation**: L2 → L4 (skips L3)

- **Fix**: Document exception in agent description

**Orphaned agent**: No other agent delegates to it

- **Fix**: Add delegation or remove if unused

## References

- `/agents/delegation-rules.md` - Complete delegation guidelines
- `.claude/agents/` - All agent configurations
- `CLAUDE.md` - Hierarchy documentation

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.