mirror of
https://github.com/xr843/Master-skill.git
synced 2026-05-10 05:16:25 +00:00
3f81cbb955
Slash command discoverability cleanup. Claude Code users typically have
50+ skills installed; bare-word commands like /atisha and /zhiyi got
scattered across the /-completion list. v0.6 prefixes all 14 master
slash commands with master- so they cluster under /m<tab> and clearly
signal "this is a Master-skill master skill".
Scope of rename
---------------
* Slash commands: /zhiyi → /master-zhiyi, /huineng → /master-huineng,
... all 14 affected.
* Directory layout: prebuilt/<slug>/ → prebuilt/master-<slug>/ for all
14 masters (git mv preserves history).
* Frontmatter: each prebuilt/master-<slug>/SKILL.md updates `name:` to
master-<slug>.
* compare-masters and create-master meta-skills are intentionally
unchanged — they're already prefixed by their nature, and
/master-compare-masters would be doublespeak.
Decoupling: fojin.app/chat is NOT affected
------------------------------------------
The fojin web frontend's master dropdown uses bare slug IDs (atisha,
huineng, ...) and is already grouped under "法师模式" in its UI. Backend
master_profiles.py keeps `id="atisha"` etc. unchanged. No fojin-side
migration required. The two surfaces (Claude Code slash + fojin
dropdown) are now formally decoupled by design, not coincidence.
Compatibility
-------------
* NPX installer accepts both forms: `npx master-skill install zhiyi`
(short) and `install master-zhiyi` (full) both resolve to the same
prebuilt/master-zhiyi/ source. Install destination is always
~/.claude/skills/master-<slug>/. Backward-compatible uninstall
handles legacy non-prefixed installs (~/.claude/skills/zhiyi/).
* The cli.mjs already used `master-${name}` for install destinations
(since v0.3 NPX installer was added), so existing v0.4/v0.5 NPX
users were already getting the prefix in skills/ — only the source
prebuilt/ layout and slash commands change in v0.6.
Files updated
-------------
* 14 directories renamed (28 files moved, 0 content changes).
* 14 SKILL.md frontmatter `name:` fields.
* prebuilt/compare/SKILL.md: 43 slug references updated to prefixed form.
* bin/cli.mjs: resolveMasterDir helper accepts both short and full;
cmdInstall and cmdUninstall handle legacy paths.
* .github/workflows/validate-and-test.yml: fidelity-smoke MASTERS
rotation array updated to all 14 prefixed names (was 8 hardcoded
汉传 only — now properly rotates across the full set).
* scripts/{validate,cite,query,test-fidelity}.py: --master arg help
text examples.
* README.md + README_EN.md: situational guidance table, install
snippets, master cards. New v0.6 release banner.
* SKILL.md (project-level) preset list with new slash names.
* ETHICS.md Tier table slug references (4).
* All plugin manifests bumped 0.5.0 → 0.6.0 with description noting
the /master-<slug> invocation pattern.
* CHANGELOG.md: [0.6.0] section with breaking-change notice and
migration commands for existing NPX users.
Validation
----------
* python scripts/validate.py --strict ✓ 15 masters pass
* python scripts/validate-fidelity.py ✓ all valid
* python scripts/test-fidelity.py --all --dry-run ✓
* pytest tests/ ✓ 31 passed, 6 skipped
* node bin/cli.mjs list ✓ shows all 14 with
master- prefix
* node bin/cli.mjs install zhiyi ✓ resolves to
prebuilt/master-zhiyi/
* node bin/cli.mjs install master-zhiyi ✓ resolves to same
Migration for existing v0.4/v0.5 users
--------------------------------------
npx master-skill@0.5 uninstall zhiyi huineng xuanzang ...
# OR: rm -rf ~/.claude/skills/{zhiyi,huineng,...}
npx master-skill@latest install --all
Then start a new Claude Code session; the new slash commands are
/master-zhiyi, /master-huineng, etc.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
139 lines
4.4 KiB
YAML
139 lines
4.4 KiB
YAML
name: Validate & Test
|
||
|
||
on:
|
||
push:
|
||
paths:
|
||
- 'prebuilt/**'
|
||
- 'scripts/**'
|
||
- 'prompts/**'
|
||
- 'tools/**'
|
||
pull_request:
|
||
paths:
|
||
- 'prebuilt/**'
|
||
- 'scripts/**'
|
||
- 'prompts/**'
|
||
- 'tools/**'
|
||
|
||
jobs:
|
||
validate:
|
||
name: Validate SKILL.md & fidelity structure
|
||
runs-on: ubuntu-latest
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v5
|
||
with:
|
||
python-version: '3.11'
|
||
|
||
- name: Install dependencies
|
||
run: pip install requests pypinyin pyyaml
|
||
|
||
- name: Lint SKILL.md frontmatter
|
||
run: python scripts/validate.py --strict
|
||
|
||
- name: Validate fidelity.jsonl structure
|
||
run: python scripts/validate-fidelity.py
|
||
|
||
- name: Dry-run fidelity tests
|
||
run: python scripts/test-fidelity.py --all --dry-run
|
||
|
||
fidelity-smoke:
|
||
name: Fidelity smoke (1 master × 1 fixture)
|
||
runs-on: ubuntu-latest
|
||
needs: validate
|
||
# Cost cap: one basic-difficulty question per PR, Sonnet 4.6 pricing
|
||
# with ~10k-token system prompt → under $0.05/PR. Forks have no secret
|
||
# access — treat missing secret as advisory pass so external PRs can land.
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
with:
|
||
fetch-depth: 0
|
||
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v5
|
||
with:
|
||
python-version: '3.11'
|
||
|
||
- name: Install dependencies
|
||
run: pip install anthropic requests pypinyin
|
||
|
||
- name: Pick smoke target
|
||
id: pick
|
||
run: |
|
||
# If the PR touches a specific prebuilt master, smoke-test that one.
|
||
# Otherwise rotate by day-of-year so coverage stays uniform across all 14.
|
||
BASE="${{ github.base_ref || 'main' }}"
|
||
CHANGED=$(git diff --name-only "origin/${BASE}...HEAD" 2>/dev/null \
|
||
| grep -oP 'prebuilt/\K[^/]+' | grep -v '^compare$' | head -n1 || true)
|
||
if [ -z "$CHANGED" ]; then
|
||
MASTERS=(master-xuanzang master-kumarajiva master-huineng master-zhiyi \
|
||
master-fazang master-yinguang master-ouyi master-xuyun \
|
||
master-atisha master-tsongkhapa master-milarepa \
|
||
master-buddhaghosa master-mahasi-sayadaw master-ajahn-chah)
|
||
IDX=$(( $(date +%j) % ${#MASTERS[@]} ))
|
||
CHANGED=${MASTERS[$IDX]}
|
||
fi
|
||
echo "master=$CHANGED" >> "$GITHUB_OUTPUT"
|
||
echo "Smoke target: $CHANGED"
|
||
|
||
- name: Run fidelity smoke
|
||
env:
|
||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||
run: |
|
||
if [ -z "${ANTHROPIC_API_KEY:-}" ]; then
|
||
echo "::warning::ANTHROPIC_API_KEY not configured — smoke is advisory on this run (expected on forks)."
|
||
echo '{"skipped": true, "reason": "no_api_key"}' > fidelity-smoke.json
|
||
exit 0
|
||
fi
|
||
python scripts/test-fidelity.py \
|
||
--master "${{ steps.pick.outputs.master }}" \
|
||
--max-tests 1 \
|
||
--json > fidelity-smoke.json
|
||
python - <<'PY'
|
||
import json, sys
|
||
with open("fidelity-smoke.json") as f:
|
||
data = json.load(f)
|
||
# --master returns a single-element list
|
||
r = data[0] if isinstance(data, list) else data
|
||
failed = r.get("failed", 0)
|
||
total = r.get("total", 0)
|
||
print(f"Fidelity smoke: {total - failed}/{total} passed for {r.get('master', '?')}")
|
||
sys.exit(1 if failed else 0)
|
||
PY
|
||
|
||
- name: Upload smoke results
|
||
if: always()
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: fidelity-smoke-${{ github.run_id }}
|
||
path: fidelity-smoke.json
|
||
if-no-files-found: ignore
|
||
|
||
fidelity-full:
|
||
name: Fidelity tests — full suite (manual only)
|
||
runs-on: ubuntu-latest
|
||
if: github.event_name == 'workflow_dispatch'
|
||
needs: validate
|
||
steps:
|
||
- uses: actions/checkout@v4
|
||
|
||
- name: Set up Python
|
||
uses: actions/setup-python@v5
|
||
with:
|
||
python-version: '3.11'
|
||
|
||
- name: Install dependencies
|
||
run: pip install anthropic requests pypinyin
|
||
|
||
- name: Run fidelity tests
|
||
env:
|
||
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
|
||
run: python scripts/test-fidelity.py --all --json > fidelity-results.json
|
||
|
||
- name: Upload results
|
||
uses: actions/upload-artifact@v4
|
||
with:
|
||
name: fidelity-results
|
||
path: fidelity-results.json
|