Commit Graph

4 Commits

Author SHA1 Message Date
Daniel Griesser a68d57cfa6 fix(scripts): harden build-skill-tree.sh for bash 3.2 on macOS
Use ${ARRAY[@]+"${ARRAY[@]}"} pattern for all array expansions that
could be empty (category arrays, errors array, function parameters).
Bash 3.2 with set -u treats "${EMPTY[@]}" as an unbound variable error,
while bash 4+ handles it gracefully. The +"..." syntax expands to nothing
when the array is unset/empty, avoiding the crash.

Also fix AGENTS.md claiming CI only runs on skills/** changes — the
validate-skill-tree job runs on all PRs (it's fast enough not to need
path filtering).
2026-03-02 09:21:07 +01:00
Daniel Griesser 5837075bdf feat(scripts): add build-skill-tree.sh validation script
Adds scripts/build-skill-tree.sh — a bash-only script that scans
all skills/*/SKILL.md files, regenerates SKILL_TREE.md from live
frontmatter data, and validates the entire skill hierarchy.

What the script does:

1. Scan — finds all SKILL.md files via find, parses YAML frontmatter
   (name, description, category, parent, role, disable-model-invocation)
   using awk. No external dependencies beyond standard Unix tools.

2. Categorize — groups skills by category field, identifies routers
   by role: router.

3. Generate — rebuilds SKILL_TREE.md with Quick Navigation table,
   per-category skill tables (SDK Setup, Workflow, Feature Setup,
   Internal), and short column values extracted from descriptions.

4. Validate — checks every rule without stopping on first failure:
   - Non-router/non-internal skills must have category, parent, and
     disable-model-invocation: true
   - Internal skills must have disable-model-invocation: true
   - Every skill's parent must exist and have role: router
   - Each skill must appear in its router's SKILL.md
   - All breadcrumb .md links must resolve to real files
   - Warns on unknown categories

5. Stale check — diffs generated vs existing SKILL_TREE.md; writes
   file unless --check is passed (check-only mode for CI).

Uses a temp-directory pattern for per-skill data storage instead of
bash 4 associative arrays, keeping it compatible with macOS bash 3.2.

Also updates SKILL_TREE.md to match the script's generated output
(column values are now extracted from descriptions via sed, ordering
follows find | sort alphabetical).

Co-Authored-By: Claude Sonnet 4.5 (Anthropic)
2026-03-02 09:21:07 +01:00
Daniel Griesser 58692e4360 chore: remove generate-skill-list script
Not needed in this repo — was carried over from sentry-agent-skills
where it's used by the release workflow.

Co-Authored-By: Claude (Anthropic)
2026-02-28 15:52:27 +01:00
Daniel Griesser 1eb0b63777 docs: update AGENTS.md, README, and add skill list script
Update documentation to reflect the full skill catalog ported from
sentry-agent-skills. Skills are now organized into four categories:

- SDK bundles (9): full platform setup wizards with reference docs
- Setup skills (2): AI monitoring, OTel exporter
- Workflow skills (4): code review, PR review, fix issues, create alerts
- Authoring skills (1): SDK skill creator

Also adds scripts/generate-skill-list.sh from sentry-agent-skills for
generating skill lists from SKILL.md frontmatter.

Co-Authored-By: Claude (Anthropic)
2026-02-28 15:52:27 +01:00