command-management
Create, modify, and delete GitHub Copilot prompt files (.github/prompts/*.prompt.md) and Claude command files (.claude/commands/*.md) safely using a discovery-first, non-destructive workflow. Invoked by agent-manager whenever a command or prompt needs to be created, modified, or deleted.
- License 许可
- GPL-3.0
- 最近更新
- 2026-06-06
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- command-management
- model
- claude-sonnet-4-6
- tools
- Read, Write, Edit, Glob, Grep, Bash, TodoWrite
- description
- Create, modify, and delete GitHub Copilot prompt files (.github/prompts/*.prompt.md) and Claude command files (.claude/commands/*.md) safely using a discovery-first, non-destructive workflow. Invoked by agent-manager whenever a command or prompt needs to be created, modified, or deleted.
03 SKILL.md 正文
Use this skill when a user asks to create, update, or remove a command or prompt on either the Claude Code or GitHub Copilot platform in this repository.
This skill is platform-aware and actionable. It always discovers existing command and prompt files first, then applies minimal, reversible changes. Both platforms are kept in sync unless a platform-specific scope is explicitly requested.
Inputs Expected
- Operation:
create|modify|delete - Platform target:
claude|copilot|both(default:both) - Command/prompt name: kebab-case identifier matching the linked skill name
- Description: what the command does (used in frontmatter
description) - Body: the command content (usage examples, workflow summary, safety defaults)
If any required input is missing, ask only the minimum clarifying questions needed to proceed.
Phase 0 — Context Load (silent)
- Read
.claude/CLAUDE.mdandAGENTS.md. - Invoke
Skill("manage-memory", args: "agent-manager"). - Read repository governance files relevant to command and prompt ownership.
- Discover current command and prompt surfaces before proposing edits.
Phase 1 — Discovery And Classification
- Glob
.claude/commands/*.md— list all existing Claude command files. - Glob
.github/prompts/*.prompt.md— list all existing Copilot prompt files. - Build an inventory table:
Name Claude command path Copilot prompt path Linked skill Status - Check for drift (command exists on one platform but not the other).
- Classify request into one mutation strategy:
create— neither platform file exists for the given namemodify— one or both platform files exist and need updatingdelete— one or both platform files must be removedsync— files exist on both platforms but have drifted out of sync
Decision rule:
- If operation is
modifyordeleteand the target file is not discoverable, pause and ask for disambiguation instead of guessing.
Phase 2 — Plan The Change
- Identify exact file paths for all affected files.
- Determine minimum edit set:
- For
create: new file(s) to write - For
modify: field(s) or section(s) to update - For
delete: file(s) to archive/remove - For
sync: diff both files and reconcile to the authoritative source
- For
- Confirm scope with the caller if ambiguous (e.g., only one platform was targeted).
- For
delete, require explicit confirmation before any irreversible removal.
Phase 3 — Execute
create
Claude command — write .claude/commands/<name>.md:
---
description: <one-line description>
---
<usage section with Skill() call signature>
## Usage
- `Skill("<skill-name>", args: "create <args>")`
- `Skill("<skill-name>", args: "modify <args>")`
- `Skill("<skill-name>", args: "delete <args>")`
## Expected Workflow
<numbered summary of what the skill does>
## Safety Defaults
<list any destructive-action guardrails>
Copilot prompt — write .github/prompts/<name>.prompt.md:
---
description: "<one-line description>"
agent: "agent"
argument-hint: "<short arg hint>"
---
<concise summary paragraph>
## Modes
<list of supported modes/args>
## Expected Workflow
<numbered summary mirroring the SKILL.md phases>
## Safety Defaults
<list any destructive-action guardrails>
modify
- Read both existing files.
- Apply requested changes to
description, body sections, or usage examples. - Keep both files in sync unless a platform-specific change is explicitly requested.
- Preserve all unrelated content.
delete
- Default to soft delete: rename to
<name>.md.deprecated(Claude) or<name>.prompt.md.deprecated(Copilot). - Hard delete only with explicit
hard-deleteflag and user confirmation. - Report what was removed or archived.
sync
- Diff the Claude command and Copilot prompt for the same name.
- Identify which is authoritative (typically the one most recently updated, or the one linked to a living skill).
- Reconcile the non-authoritative file to match, preserving platform-specific frontmatter fields.
Phase 4 — Validation
- Confirm all written files parse as valid Markdown with correct YAML frontmatter.
- Verify frontmatter contains at minimum a
descriptionfield. - Check that the linked skill (
Skill("<name>", ...)) reference in the command body resolves to an existing skill file. - Report any drift found (e.g., command exists but no matching prompt, or vice versa).
Quality Gate
- No command or prompt is written without a
descriptionin its frontmatter. - Soft delete is always the default for
deleteoperations. - Both platform files must be written or updated together unless scope is explicitly restricted.
- No
.envor sensitive configuration files are read or modified.
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.