name: skill-sync description: > Sync skill metadata with the Auto-invoke sections in AGENTS.md. Trigger: When you change a skill's metadata (metadata.scope/metadata.auto_invoke), regenerate the Auto-invoke tables, or run ./skills/skill-sync/assets/sync.sh. license: MIT metadata: author: GGA Team version: "1.0" scope: [root] auto_invoke: - "After creating/modifying a skill" - "Regenerate AGENTS.md Auto-invoke tables (sync.sh)" - "Troubleshoot why a skill is missing from AGENTS.md auto-invoke" allowed-tools: Read, Edit, Write, Glob, Grep, Bash
When to Use It
- •After creating a new skill under
skills/. - •After updating the metadata (
scopeorauto_invoke) of an existing skill. - •When troubleshooting a missing skill entry in an
AGENTS.mdAuto-invoke section.
Critical Patterns
- •ALWAYS run the script from a compatible shell (Git Bash on Windows) to avoid incompatibilities.
- •NEVER edit the "Auto-invoke Capabilities" tables manually; the script overwrites them.
- •ALWAYS ensure
SKILL.mdhas valid YAML frontmatter before syncing. - •ALWAYS include the
rootscope when the skill must appear in the top-levelAGENTS.md.
Purpose (Overview)
Every skill that should show up in an Auto-invoke section must define these metadata fields.
auto_invoke can be a single string or a list of actions:
yaml
metadata: author: YourName version: "1.0" scope: [root, backend] # AGENTS.md files to update # Option A: single action auto_invoke: "Creating/modifying components" # Option B: multiple actions # auto_invoke: # - "Creating/modifying components" # - "Refactoring business logic"
Scope Values
| Scope | Updated File |
|---|---|
root | AGENTS.md (root of project) |
copilot | .github/copilot-instructions.md |
<custom> | Auto-detected AGENTS.md in subdirectories matching scope name |
Examples:
- •
scope: [root]→ Updates/AGENTS.md - •
scope: [root, backend]→ Updates/AGENTS.mdand/Backend/AGENTS.md(if exists) - •
scope: [api, web]→ Updates any subdirectory containing "api" or "web" with AGENTS.md
Skills can define multiple scopes: scope: [root, backend, api]
Usage
After Creating/Modifying a Skill
bash
./skills/skill-sync/assets/sync.sh
What the Script Does
- •Reads every
skills/*/SKILL.mdfile. - •Extracts
metadata.scopeandmetadata.auto_invoke. - •Generates Auto-invoke tables for each
AGENTS.md. - •Rewrites the
### Auto-invoke Skillssection in every file.
Commands
bash
# Sync every AGENTS.md ./skills/skill-sync/assets/sync.sh # Dry run (preview changes) ./skills/skill-sync/assets/sync.sh --dry-run # Sync a specific scope ./skills/skill-sync/assets/sync.sh --scope backend