agent-management
Creates, updates, and deprecates agent definitions for both Claude Code (.claude/agents/*.md) and GitHub Copilot/VS Code (.github/agents/*.agent.md). Invoked exclusively by the agent-manager agent.
- License 许可
- GPL-3.0
- 最近更新
- 2026-06-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agent-management
- description
- Creates, updates, and deprecates agent definitions for both Claude Code (.claude/agents/*.md) and GitHub Copilot/VS Code (.github/agents/*.agent.md). Invoked exclusively by the agent-manager agent.
03 SKILL.md 正文
agent-management
You scaffold and maintain all agent definitions across both platforms. Parse the args to determine the operation mode, then execute the corresponding procedure.
Phase 0 — Context Load (silent)
- Read
.claude/CLAUDE.mdto internalize project conventions and portability rules. - Invoke
Skill("manage-memory", args: "agent-manager")to load persistent memory. - Glob
.claude/agents/*.mdand.github/agents/*.agent.mdto build the current agent roster.
Mode: list
Args: list
- Glob
.claude/agents/*.md— collectname,model,tools, anddescriptionfrom frontmatter. - Glob
.github/agents/*.agent.md— collectnamefrom frontmatter. - Cross-reference: identify agents that exist in one platform but not the other (orphans).
- Return a formatted table with columns:
agent,claude-code,copilot,model,status.
Mode: create-agent
Args: create-agent <name>
- Validate
<name>is kebab-case. - Fail if
.claude/agents/<name>.mdalready exists. - Collect required inputs:
model— defaultclaude-sonnet-4-6color— defaultcyantools— defaultRead, Glob, Grep, Skill, TodoWrite- One-line purpose describing the agent's domain
- 2–4 bullet responsibilities
- Write
.claude/agents/<name>.mdusing the Claude Agent Template below. - Write
.github/agents/<name>.agent.mdusing the Copilot Agent Template below — apply the Claude-only Tool Exclusion List (see Mode: sync-agent) when populating itstools:frontmatter. - Create
.claude/agent-memory/<name>/directory: a. Windows:mkdir -p ".claude/agent-memory/<name>"b. Linux/Mac:mkdir -p ".claude/agent-memory/<name>/" - Write
.claude/agent-memory/<name>/MEMORY.mdusing the Memory Index Template below. - Confirm: "Agent '<name>' created in
.claude/agents/and.github/agents/."
Claude Agent Template
---
name: "<name>"
description: "<multi-line description with at least one <example> block>"
tools: Read, Glob, Grep, Skill, TodoWrite
model: <model>
color: <color>
memory: project
---
You are the **<Title>** agent for the HypermediaEngine project.
## Responsibilities
- [Responsibility 1]
- [Responsibility 2]
- [Responsibility 3]
## Skills
### `manage-memory` — invoke at session start and when learning something worth preserving
Skill("manage-memory", args: "<name>") // load Skill("manage-memory", args: "save <name> ...") // save
Record: [what this agent should remember across sessions]
### `agent-management` — route all agent definition changes through agent-manager
To create or update an agent definition:
Agent("agent-manager", prompt: "create-agent <name>") Agent("agent-manager", prompt: "update-agent <name> <change-description>")
## Protocols
- [Protocol 1]
- [Protocol 2]
Copilot Agent Template
---
name: "<name>"
description: "<one-line description for Copilot agent picker>"
tools: [read, edit, search, todo]
user-invocable: true
---
You are the <Title> for the HypermediaEngine project.
## Responsibilities
1. [Responsibility 1]
2. [Responsibility 2]
## Preferred Skills
- `<primary-skill>`
- `manage-memory`
Memory Index Template
# Memory Index
Mode: update-agent
Args: update-agent <name> <change-description>
- Validate that both
.claude/agents/<name>.mdand.github/agents/<name>.agent.mdexist; warn on missing platform file. - Parse
<change-description>to determine what to change (frontmatter field, responsibilities, skills section, protocols, etc.). - Apply changes to
.claude/agents/<name>.mdusing Edit. - Apply equivalent changes to
.github/agents/<name>.agent.mdusing Edit. - If the change touches the
tools:frontmatter, apply the Claude-only Tool Exclusion List (see Mode: sync-agent) before writing the Copilot file — never propagate excluded tools. - Validate Claude agent frontmatter still contains:
name,description,tools,model. - Validate Copilot agent frontmatter still contains:
name,description,tools. - Validate Copilot
tools:array contains none of the excluded Claude-only tool names. - Confirm: "Agent '<name>' updated on both platforms."
Mode: sync-agent
Args: sync-agent <name>
Use when a Claude agent definition exists but the Copilot counterpart is missing or out of date.
- Read
.claude/agents/<name>.md. - Derive the equivalent
.github/agents/<name>.agent.mdcontent from it using the Copilot Agent Template. - Apply the Claude-only Tool Exclusion List (see below) when translating the
tools:frontmatter — strip excluded tools and substitute Copilot-native equivalents where appropriate. - Write or overwrite
.github/agents/<name>.agent.md. - Confirm: "Agent '<name>' synced to
.github/agents/<name>.agent.md."
Claude-only Tool Exclusion List (sync, create, update)
When projecting the tools: array from a Claude agent definition into a Copilot agent file, the following Claude Code-specific built-in tool names MUST be removed. They do not exist in the GitHub Copilot / VS Code custom agent environment, and including them produces an invalid Copilot agent configuration.
Excluded tools — never copy to .github/agents/*.agent.md:
BashGlobGrepReadTodoWriteWebFetchWebSearchPushNotificationToolSearch
Tools that are kept or translated:
- MCP tools (any tool whose name contains
mcp__or that maps to an MCP server, e.g.mcp__docker-mcp-gateway__search,microsoft_docs_search) — keep verbatim, they are platform-portable. - Skill / Agent invocations — keep verbatim.
- Translate Claude built-ins to Copilot-native equivalents where there is a 1:1 match (apply during sync only when the Copilot file currently lacks the equivalent):
Read→readEdit/Write→editGlob/Grep→searchBash→executeTodoWrite→todoAgent→agent
Procedure for translating tools::
- Read the Claude
tools:array. - For each tool, look it up in the Excluded list — if matched, drop it.
- For each remaining tool, look it up in the translation map — if matched, substitute the Copilot-native alias.
- Preserve all MCP and Skill/Agent entries verbatim.
- Emit the translated array as the Copilot file's
tools:frontmatter.
Mode: deprecate-agent
Args: deprecate-agent <name> <reason>
- Read
.claude/agents/<name>.md; fail if it does not exist. - Add
status: deprecatedand adeprecated-reason: <reason>field to the frontmatter of.claude/agents/<name>.md. - Add
status: deprecatedto the frontmatter of.github/agents/<name>.agent.mdif it exists. - Do not delete any files.
- Confirm: "Agent '<name>' deprecated on both platforms."
Validation Rules
- Agent files must never be deleted — only deprecated via
status: deprecatedin frontmatter. - Claude agent files (
.claude/agents/*.md) must have:name,description,tools,model. - Copilot agent files (
.github/agents/*.agent.md) must have:name,description,tools. - Copilot agent
tools:arrays MUST NOT contain any of the Claude-only excluded tools:Bash,Glob,Grep,Read,TodoWrite,WebFetch,WebSearch,PushNotification,ToolSearch. Reject the write if any are present. - Every Claude agent must have a matching Copilot agent of the same name — warn when they are out of sync.
- Agent names must be kebab-case and match across both platform files.
- Never read or modify
.envfiles or sensitive configuration.
04 同仓库更多 Skills
write-tests
Test implementation skill for HypermediaEngine. Takes a confirmed test plan from design-test-cases and produces compilable, runnable xUnit tests following project conventions. Validates coverage quality through mutation testing. Invoked by the sqa-engineer agent after the test plan is approved.
write-documentation
Structured documentation writing workflow for HypermediaEngine. Writes or updates README.md files at the repo root and in each project directory (src/, tests/, samples/, etc.) based on current implementation, ADRs, and architecture decisions.
write-adr
Writes a numbered Architecture Decision Record (ADR) for a significant architectural choice in the HypermediaEngine project. Invoked by the software-architect agent whenever a consequential design decision is made or ratified. Saves the ADR to docs/architecture/decisions/.
tunit-playwright-ui-testing
Comprehensive guidance for writing coded end-to-end UI tests in C# using TUnit.Playwright. Tests inherit from PageTest — the base class manages all browser lifecycle. Covers NuGet setup, PageTest inheritance, Page Object Model, browser configuration, parallelism limiting, and CI integration. Based on the official TUnit docs at https://tunit.dev/docs/examples/playwright.
triage
Task classification, decomposition, dependency mapping, and routing skill. Invoked by the triage-agent to break any user request into discrete, independently-routable work items with assigned priorities and agent chains.
system-design
Expert system design skill. Use PROACTIVELY to design systems, review architectures, and assist software engineers in learning design principles and implementing them in the code with design patterns.