Skill Sync skill-sync
Syncs skill metadata to AGENTS.md Auto-invoke sections. Trigger: When updating skill metadata (metadata.scope/metadata.auto_invoke), regenerating Auto-invoke tables, or running ./skills/skill-sync/assets/sync.sh (including --dry-run/--scope).
- Our test
- —
- not tested yet
- GitHub stars
- 15k
- prowler-cloud/prowler
- Added by
- 0
- members
- Updated
- Dec 6
- commit a38d6d6
- Content
- 3 files
- 2 scripts · 33 KB
- License
- Apache 2.0
- free to use
What our test found
Not tested yet. Our model tries every skill on a realistic request and scores the result, the most popular skills first. Until then, the safety checks on the right still apply.
name: skill-sync
description: >
Syncs skill metadata to AGENTS.md Auto-invoke sections.
Trigger: When updating skill metadata (metadata.scope/metadata.auto_invoke), regenerating Auto-invoke tables, or running ./skills/skill-sync/assets/sync.sh (including --dry-run/--scope).
license: Apache-2.0
metadata:
author: prowler-cloud
version: "1.1"
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, BashPurpose
Keeps the Auto-invoke tables of the AGENTS.md files in sync with skill metadata. Run the sync script after creating a skill or changing its metadata.scope / metadata.auto_invoke.
Required Skill Metadata
auto_invoke can be a single string or a list of actions:
metadata:
author: prowler-cloud
version: "1.0"
scope: [root, ui] # Which AGENTS.md files
# Option A: single action
auto_invoke: "Creating/modifying components"
# Option B: multiple actions
# auto_invoke:
# - "Creating/modifying components"
# - "Refactoring component folder placement"Scope Values (only these are valid)
| Scope | Updates | |-------|---------| | root | AGENTS.md (repo root) | | ui | ui/AGENTS.md | | api | api/AGENTS.md | | sdk | prowler/AGENTS.md | | mcp_server | mcp_server/AGENTS.md |
- Use
sdk, NOTprowler, forprowler/AGENTS.md. Any other value is skipped withWarning: No AGENTS.md found for scope '<value>'. docs/AGENTS.mdhas no scope: it is the docs style guide, not a skills index.- Most skills list
roottoo, so the root table is the full index of actions.
What the Script Does
- Reads every
skills/*/SKILL.md(sorted) - Extracts
name,metadata.scopeandmetadata.auto_invoke - Builds one table per scope, rows sorted by action then skill (
LC_ALL=C) - Replaces the existing
## Auto-invoke Skills(component files) or### Auto-invoke Skills(root) section, keeping its heading level, up to the next---line or H2 heading - If a file has no such section, inserts it after the Skills Reference blockquote (the
>block that linksSKILL.mdfiles) - Lists skills missing
scopeorauto_invoke
The generated table is compact (| Action | Skill |). ui/AGENTS.md is re-aligned by the UI Prettier hook on commit, so a formatting-only diff there is expected.
It does NOT update the "Available Skills" description tables in AGENTS.md or skills/README.md: edit those by hand.
Commands
# Preview (writes nothing; prints each generated table)
./skills/skill-sync/assets/sync.sh --dry-run
# Sync all AGENTS.md files
./skills/skill-sync/assets/sync.sh
# Sync one scope only
./skills/skill-sync/assets/sync.sh --scope ui
# Run the script's unit tests (temp dirs only)
bash ./skills/skill-sync/assets/sync_test.sh
# Review the result
git diff -- '*AGENTS.md'Checklist After Modifying Skills
- [ ]
metadata.scopeuses onlyroot,ui,api,sdk,mcp_server - [ ]
metadata.auto_invokedescribes the user action ("Creating new checks"), not the skill - [ ] Ran
./skills/skill-sync/assets/sync.sh --dry-runwith noWarning:lines, then without--dry-run - [ ] Reviewed
git diff -- '*AGENTS.md'(one Auto-invoke section per file, no unrelated changes) - [ ] Added or updated the skill row in the root
AGENTS.mdandskills/README.mdtables