refactor: generic skills build system with auto-discovery (#8)

* refactor: generic skills build system with auto-discovery

- Rename postgres-best-practices-build → skills-build
- Add auto-discovery: scans skills/ for subdirectories with metadata.json
- Build/validate all skills or specific skill with -- argument
- Update root AGENTS.md and CONTRIBUTING.md with new structure
- No configuration needed to add new skills

Usage:
  npm run build                    # Build all skills
  npm run build -- skill-name      # Build specific skill
  npm run validate                 # Validate all skills

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix ci

* more generic impact levels

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Pedro Rodrigues
2026-01-23 15:56:11 +00:00
committed by GitHub
parent 4b49188895
commit bbde7ff5f8
15 changed files with 955 additions and 907 deletions

View File

@@ -1,4 +1,4 @@
name: Postgres Best Practices CI
name: Skills CI
on:
push:
@@ -23,7 +23,7 @@ jobs:
run: npm run ci:check
validate-and-build:
name: Validate and Build
name: Validate and Build Skills
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -33,22 +33,22 @@ jobs:
node-version: '20'
- name: Install dependencies
working-directory: packages/postgres-best-practices-build
working-directory: packages/skills-build
run: npm install
- name: Validate rule files
working-directory: packages/postgres-best-practices-build
- name: Validate all skills
working-directory: packages/skills-build
run: npm run validate
- name: Build AGENTS.md
working-directory: packages/postgres-best-practices-build
- name: Build all skills
working-directory: packages/skills-build
run: npm run build
- name: Check for uncommitted changes
run: |
if [[ -n $(git status --porcelain skills/postgres-best-practices/AGENTS.md) ]]; then
echo "Error: AGENTS.md is not up to date"
if [[ -n $(git status --porcelain 'skills/*/AGENTS.md') ]]; then
echo "Error: AGENTS.md files are not up to date"
echo "Run 'npm run build' and commit the changes"
git diff skills/postgres-best-practices/AGENTS.md
git diff skills/*/AGENTS.md
exit 1
fi