Imported from prowler-cloud/prowler (
skills/skill-sync/SKILL.md). Install upstream withnpx skills add prowler-cloud/prowler --skill skill-sync. Copyright stays with the author (Apache-2.0).
Purpose
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
