一键导入
agents-subagents
Create AI coding agent subagents with YAML frontmatter and least-privilege tools. Use when designing delegation, tool selection, or safety rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create AI coding agent subagents with YAML frontmatter and least-privilege tools. Use when designing delegation, tool selection, or safety rules.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Builds multi-repo context hubs and compiled markdown knowledge maps. Use when profiling repo portfolios or assembling LLM-ready cross-repo knowledge bases.
Builds per-repo code graphs in JSON and markdown-ready derived artifacts. Use when you need blast radius, symbol-level maps, import graphs, inheritance, or test links.
Context-driven AI development with AGENTS.md, repo knowledge bases, Claude Code, Codex, and Copilot. Use when adopting repo-native AI workflows or multi-repo setups.
Technical writing for READMEs, ADRs, API docs, and changelogs. Use when revising or consolidating a repo documentation folder.
Design, implement, and troubleshoot NUKE-based CI/CD pipelines for .NET services with fast local-to-CI feedback loops. Use when creating or refactoring `nuke/Build.cs` target graphs, tuning `DependsOn`/`After`/`Triggers`/`OnlyWhenDynamic` behavior, orchestrating unit/API/DB test categories, merging and publishing coverage and test reports, building and pushing Docker images with traceable tags and digests, producing artifact contracts such as `deploy.env`, and diagnosing flaky or slow pipeline execution. For service code changes use $software-csharp-backend, for NUnit fixture design use $qa-testing-nunit, and for safe logging rewrites use $dev-structured-logs.
Systematic debugging for crashes, regressions, flakes, and production bugs. Use when diagnosing stack traces, logs, traces, or profiling data.
| name | agents-subagents |
| description | Create AI coding agent subagents with YAML frontmatter and least-privilege tools. Use when designing delegation, tool selection, or safety rules. |
Create and maintain Claude Code agents/subagents with predictable behavior, least-privilege tools, and explicit delegation contracts.
.claude/agents/<agent-name>.md (kebab-case filename).name, description; optional: tools, model, permissionMode, skills, hooks).Minimal template:
---
name: sql-optimizer
description: Optimize SQL queries, explain tradeoffs, and propose safe indexes
tools: Read, Grep, Glob
model: sonnet
---
# SQL Optimizer
## Responsibilities
- Diagnose bottlenecks using query shape and plans when available
- Propose optimizations with risks and expected impact
## Workflow
1. Identify the slow path and data volume assumptions
2. Propose changes (query rewrite, indexes, stats) with rationale
3. Provide a verification plan
## Output Contract
- Summary (1–3 bullets)
- Recommendations (ordered)
- Verification (commands/tests to run)
sonnet for most work).Edit/Write unless required.Task, define a handoff contract (inputs, constraints, output format).name (REQUIRED): kebab-case; match filename (without .md).description (REQUIRED): state when to invoke + what it does; include keywords users will say.tools (OPTIONAL): explicit allow-list; prefer small, purpose-built sets.model (OPTIONAL): haiku for fast checks, sonnet for most tasks, opus for high-stakes reasoning, inherit to match parent.permissionMode (OPTIONAL): prefer defaults; change only with a clear reason and understand the tradeoffs.skills (OPTIONAL): preload skill packs for domain expertise; keep the list minimal.hooks (OPTIONAL): automate guardrails; prefer using the hooks skill for patterns and safety.For full tool semantics and permission patterns, use references/agent-tools.md. For orchestration and anti-patterns, use references/agent-patterns.md.
CLAUDE.md/project memory and domain knowledge in skills.data/sources.json.name matches filename; description is single-line and trigger-oriented; tools are minimal; model fits risk.frameworks/shared-skills/skills/agents-subagents/references/agent-patterns.mdframeworks/shared-skills/skills/agents-subagents/references/agent-tools.mdframeworks/shared-skills/skills/agents-subagents/references/subagent-interruption-recovery.mdframeworks/shared-skills/skills/agents-subagents/data/sources.jsonframeworks/shared-skills/skills/agents-skills/SKILL.mdframeworks/shared-skills/skills/agents-hooks/SKILL.mdInterruptions are normal in multi-agent runs. Treat them as recoverable state transitions, not total failures.
manual redirect, timeout, context overflow, tool error).Do not restart full fan-out blindly after one interruption. Resume the smallest affected unit first.
Use these defaults unless the user explicitly asks for wider fan-out.
For parallel subagent execution, use one Git worktree per agent to prevent file conflicts and index lock contention. See AI Agent Worktrees for setup, directory conventions, safety patterns, and cleanup.
Goal:
Constraints:
Owned files:
Do-not-touch files:
Output format:
Definition of done:
When dispatching multiple subagents from a plan, front-load each agent with structured context. This reduces token usage, tool calls, and drift.
## Context
- Plan: [plan filename or path]
- Goals: [relevant overview from plan — what this task achieves]
- Dependencies: [prerequisite tasks + their outputs/files]
- Related tasks: [sibling tasks and their function]
## Scope
- Files to create/modify: [full paths]
- Files to read (not modify): [paths for reference only]
- Do-not-touch: [files owned by other agents]
## Acceptance Criteria
- [Criterion 1]
- [Criterion 2]
- [Test/verification command]
## Implementation Steps
1. Read the plan at [path] for full context
2. [Concrete step]
3. [Concrete step]
4. Verify: [specific check]
Why this works: Subagents have no prior context. Without front-loaded detail, they spend tokens rediscovering the codebase. With it, they execute focused work immediately.
When executing plans with dependency graphs, use waves:
Single-wave shortcut: If only one task is unblocked, launch one agent. Don't force parallelism.
When parallel agents produce conflicting changes:
Stop and re-plan when: