diff --git a/.github/workflows/sync-to-main.yml b/.github/workflows/sync-to-main.yml new file mode 100644 index 0000000..d751c45 --- /dev/null +++ b/.github/workflows/sync-to-main.yml @@ -0,0 +1,44 @@ +name: Sync to Main + +on: + workflow_dispatch: + inputs: + confirm: + description: 'Type "sync" to confirm' + required: true + default: '' + +jobs: + sync: + runs-on: ubuntu-latest + if: github.event.inputs.confirm == 'sync' + steps: + - uses: actions/checkout@v4 + with: + ref: dev + fetch-depth: 0 + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Sync files to main + run: | + # Checkout main branch + git checkout main + + # Remove all tracked files except .git + git rm -rf . || true + + # Checkout specific files from dev + git checkout dev -- skills/ .github/ README.md AGENTS.md CLAUDE.md LICENSE + + # Commit and push if there are changes + git add -A + if git diff --staged --quiet; then + echo "No changes to sync" + else + git commit -m "sync: update from dev branch" + git push origin main + fi diff --git a/AGENTS.md b/AGENTS.md index 5c63c48..f0bafdd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,5 +1,18 @@ # Vue Skills Development Guide +## Branch Strategy + +> **IMPORTANT: Never develop on `main` branch!** +> +> - `main` is the **publishing branch** — it only contains released skills +> - `dev` is the **development branch** — all work happens here +> - Use the "Sync to Main" GitHub Action to publish changes from `dev` to `main` + +| Branch | Purpose | Direct commits | +|--------|---------|----------------| +| `main` | Publishing (`npx skills add vuejs-ai/skills`) | Forbidden | +| `dev` | Development, tests, experiments | Via PR only | + ## Skill Scopes | Skill | Scope | diff --git a/README.md b/README.md index 6e6ec08..56d1a94 100644 --- a/README.md +++ b/README.md @@ -124,8 +124,18 @@ Each skill undergoes systematic testing: **Acceptance criteria**: A skill is only kept if it enables Haiku or Sonnet to solve a problem they couldn't solve without it. +## Contributing + +Development happens on the `dev` branch. The `main` branch is reserved for published skills only. + +1. Create a feature branch from `dev` +2. Submit a PR to `dev` +3. After approval, changes are merged to `dev` +4. Maintainers sync `dev` → `main` via GitHub Action when ready to publish + ## Related projects +- [antfu/skills](https://github.com/antfu/skills) - Anthony Fu's curated collection of agent skills for Vue/Nuxt/Vite development - [vueuse/vueuse-skills](https://github.com/vueuse/vueuse-skills) - Agent skills for VueUse development - [onmax/nuxt-skills](https://github.com/onmax/nuxt-skills) - Agent skills for Nuxt development