Add GitHub Action to auto-sync SKILL.md copies on push to main

This commit is contained in:
lbzepoqo
2026-04-06 02:33:43 +08:00
parent 6c3e2f6147
commit 7a794d065e
2 changed files with 39 additions and 1 deletions
+36
View File
@@ -0,0 +1,36 @@
name: Sync SKILL.md
on:
push:
branches: [main]
paths:
- skills/caveman/SKILL.md
jobs:
sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Copy to duplicate locations
run: |
cp skills/caveman/SKILL.md caveman/SKILL.md
cp skills/caveman/SKILL.md plugins/caveman/skills/caveman/SKILL.md
- name: Rebuild caveman.skill ZIP
run: |
mkdir -p _zip_tmp/caveman
cp skills/caveman/SKILL.md _zip_tmp/caveman/SKILL.md
cd _zip_tmp && zip -r ../caveman.skill caveman/
cd .. && rm -rf _zip_tmp
- name: Commit if changed
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git diff --quiet && exit 0
git add caveman/SKILL.md plugins/caveman/skills/caveman/SKILL.md caveman.skill
git commit -m "chore: sync SKILL.md copies and caveman.skill"
git push
+3 -1
View File
@@ -5,12 +5,14 @@ Improvements to the SKILL.md prompt are welcome — open a PR with before/after
## How
1. Fork repo
2. Edit `skills/caveman/SKILL.md`
2. Edit `skills/caveman/SKILL.md` — this is the only copy you need to touch
3. Open PR with:
- **Before:** what caveman say now
- **After:** what caveman say with change
- One sentence why change better
> **Note:** `caveman/SKILL.md`, `plugins/caveman/skills/caveman/SKILL.md`, and `caveman.skill` are auto-synced by CI after merge. Do not edit them directly.
Small focused change > big rewrite. Caveman like simple.
## Ideas