delegation-check
БесплатноБез исполняемых скриптовНе проверенCheck workflow delegation prompts against agent role definitions for content separation violations. Detects conflicts, duplication, boundary leaks, and…
от catlog22★ 2 110 звёзд на GitHubОб этом скилле
Invoked when user requests "check delegation", "delegation conflict", "prompt vs role check", or when reviewing workflow skill quality.
1. Determine Scan Scope
Parse $ARGUMENTS to identify what to check.
| Signal | Scope |
|---|---|
File path to command .md |
Single command + its agents |
File path to agent .md |
Single agent + commands that spawn it |
Directory path (e.g., .claude/skills/team-*/) |
All commands + agents in that skill |
| "all" or no args | Scan all .claude/commands/, .claude/skills/*/, .claude/agents/ |
If ambiguous, ask:
AskUserQuestion(
header: "Scan Scope",
question: "What should I check for delegation conflicts?",
options: [
{ label: "Specific skill", description: "Check one skill directory" },
{ label: "Specific command+agent pair", description: "Check one command and its spawned agents" },
{ label: "Full scan", description: "Scan all commands, skills, and agents" }
]
)
2. Discover Command-Agent Pairs
For each command file in scope:
2a. Extract Agent() calls from commands:
# Search both Agent() (current) and Task() (legacy GSD) patterns
grep -n "Agent(\|Task(" "$COMMAND_FILE"
grep -n "subagent_type" "$COMMAND_FILE"
For each Agent() call, extract:
subagent_type→ agent name- Full prompt content between the prompt markers (the string passed as
prompt=) - Line range of the delegation prompt
2b. Locate agent definitions:
For each subagent_type found:
# Check standard locations
ls .claude/agents/${AGENT_NAME}.md 2>/dev/null
ls .claude/skills/*/agents/${AGENT_NAME}.md 2>/dev/null
2c. Build pair map:
$PAIRS = [
{
command: { path, agent_calls: [{ line, subagent_type, prompt_content }] },
agent: { path, role, sections, quality_gate, output_contract }
}
]
If an agent file cannot be found, record as MISSING_AGENT — this is itself a finding.
3. Parse Delegation Prompts
For each Agent() call, extract structured blocks from the prompt content:
| Block | What It Contains |
|---|---|
<objective> |
What to accomplish |
<files_to_read> |
Input file paths |
<additional_context> / <planning_context> / <verification_context> |
Runtime parameters |
<output> / <expected_output> |
Output format/location expectations |
<quality_gate> |
Per-invocation quality checklist |
<deep_work_rules> / <instructions> |
Cross-cutting policy or revision instructions |
<downstream_consumer> |
Who consumes the output |
<success_criteria> |
Success conditions |
| Free-form text | Unstructured instructions |
Also detect ANTI-PATTERNS in prompt content:
- Role identity statements ("You are a...", "Your role is...")
- Domain expertise (decision tables, heuristics, comparison examples)
- Process definitions (numbered steps, step-by-step instructions beyond scope)
- Philosophy statements ("always prefer...", "never do...")
- Anti-pattern lists that belong in agent definition
4. Parse Agent Definitions
For each agent file, extract:
| Section | Key Content |
|---|---|
<role> |
Identity, spawner, responsibilities, mandatory read |
<philosophy> |
Guiding principles |
<upstream_input> |
How agent interprets input |
<output_contract> |
Return markers (COMPLETE/BLOCKED/CHECKPOINT) |
<quality_gate> |
Self-check criteria |
| Domain sections | All <section_name> tags with their content |
| YAML frontmatter | name, description, tools |
5. Run Conflict Checks (7 Dimensions)
Dimension 1: Role Re-definition
Question: Does the delegation prompt redefine the agent's identity?
Check: Scan prompt content for:
- "You are a..." / "You are the..." / "Your role is..."
- "Your job is to..." / "Your responsibility is..."
- "Core responsibilities:" lists
- Any content that contradicts agent's
<role>section
Allowed: References to mode ("standard mode", "revision mode") that the agent's <role> already lists in "Spawned by:".
Severity: error if prompt redefines role; warning if prompt adds responsibilities not in agent's <role>.
Dimension 2: Domain Expertise Leak
Question: Does the delegation prompt embed domain knowledge that belongs in the agent?
Check: Scan prompt content for:
- Decision/routing tables (
| Condition | Action |) - Good-vs-bad comparison examples (
| TOO VAGUE | JUST RIGHT |) - Heuristic rules ("If X then Y", "Always prefer Z")
- Anti-pattern lists ("DO NOT...", "NEVER...")
Установить delegation-check в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл delegation-check?
Check workflow delegation prompts against agent role definitions for content separation violations. Detects conflicts, duplication, boundary leaks, and missing contracts. Triggers on "check delegation", "delegation conflict", "prompt vs role check".
Как установить скилл delegation-check?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл delegation-check запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic