skill-sync
Syncs skill metadata to AGENTS.md Auto-invoke sections. Trigger: After creating/modifying skills, regenerating Auto-invoke tables, or troubleshooting missing skills in AGENTS.md.
Installation
Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.
View source ↗GuidesSkill instructions
Purpose
Keeps AGENTS.md Auto-invoke sections in sync with skill metadata. When you create or modify a skill, run the sync script to automatically update all affected AGENTS.md files.
Required Skill Metadata
Each skill that should appear in Auto-invoke sections needs these fields in metadata:
metadata:
author: your-name
version: "1.0"
scope: [root] # Which AGENTS.md files to update
auto_invoke: "When to invoke this skill" # Single action or list
Scope Values
Scopes are discovered dynamically based on your project structure:
| Scope | Updates |
|---|---|
root |
./AGENTS.md (repository root) |
<directory> |
./<directory>/AGENTS.md |
Examples:
-
scope: [root]updates./AGENTS.md -
scope: [frontend]updates./frontend/AGENTS.md -
scope: [root, backend, frontend]updates all three
Skills can target multiple scopes: scope: [root, api, ui]
Auto-invoke Format
Single action:
auto_invoke: "Creating new components"
Multiple actions:
auto_invoke:
- "Creating new components"
- "Refactoring component structure"
Usage
After Creating/Modifying a Skill
./skills/skill-sync/assets/sync.sh
What It Does
- Reads all
skills/*/SKILL.mdfiles - Extracts
metadata.scopeandmetadata.auto_invoke - Generates Auto-invoke tables for each scope
- Updates the
### Auto-invoke Skillssection in each AGENTS.md
Commands
# Sync all AGENTS.md files
./skills/skill-sync/assets/sync.sh
# Dry run (show what would change)
./skills/skill-sync/assets/sync.sh --dry-run
# Sync specific scope only
./skills/skill-sync/assets/sync.sh --scope frontend
# Run tests
./skills/skill-sync/assets/sync_test.sh
Example
Given this skill metadata:
# skills/my-skill/SKILL.md
metadata:
author: dev
version: "1.0"
scope: [frontend]
auto_invoke: "Creating React components"
The sync script generates in frontend/AGENTS.md:
### Auto-invoke Skills
When performing these actions, ALWAYS invoke the corresponding skill FIRST:
| Action | Skill |
|--------|-------|
| Creating React components | `my-skill` |
Troubleshooting
Skill not appearing in AGENTS.md
- Check
metadata.scopeexists and is valid - Check
metadata.auto_invokeexists - Verify the target AGENTS.md file exists (e.g.,
./frontend/AGENTS.md) - Run with
--dry-runto see what would be generated
Warning: No AGENTS.md found for scope
The scope references a directory that doesn't have an AGENTS.md file. Either:
- Create the AGENTS.md file in that directory
- Remove the scope from the skill's metadata
Checklist After Modifying Skills
- Added
metadata.scopeto new/modified skill - Added
metadata.auto_invokewith action description - Ran
./skills/skill-sync/assets/sync.sh - Verified AGENTS.md files updated correctly
Examples
Read the usage examples in the source repository.
View source ↗Source history
- Indexed on
- 2026-01-20
- Index updated
- 2026-01-26
- Branch
- main
Index and sync dates describe this directory. View the source repository for code history.
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!