-
Notifications
You must be signed in to change notification settings - Fork 4
feat(docs): Agent Skills registry + Templates gallery #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7cd13b7
309e754
c25bfd8
8c8132d
f7c71c9
9732dc3
8d27410
9337865
0d6f3e7
f065410
03db520
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,92 @@ | ||
| name: Sync agent skills from sei-skill | ||
|
|
||
| # The installable agent skills at .mintlify/skills/<name>/SKILL.md are GENERATED | ||
| # from the canonical sei-skill repo (github.com/sei-protocol/sei-skill) by | ||
| # scripts/build-mintlify-skills.mjs — they are never hand-authored here. This | ||
| # workflow regenerates them and opens a PR for review (generation is LLM-assisted | ||
| # and non-deterministic, so a human reviews before merge). | ||
| # | ||
| # Triggers: | ||
| # - workflow_dispatch (manual; optionally pass a sei-skill ref) | ||
| # - repository_dispatch (sei-skill's release workflow sends type: sei-skill-release | ||
| # with client_payload.ref = the released tag/sha) | ||
| # | ||
| # Requires repo secret: ANTHROPIC_API_KEY | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| ref: | ||
| description: 'sei-skill ref to generate from' | ||
| required: false | ||
| default: 'main' | ||
| repository_dispatch: | ||
| types: [sei-skill-release] | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| defaults: | ||
| run: | ||
| shell: bash | ||
|
|
||
| jobs: | ||
| sync: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| steps: | ||
| - name: Checkout docs | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Checkout sei-skill (canonical source) | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: sei-protocol/sei-skill | ||
| ref: ${{ github.event.client_payload.ref || inputs.ref || 'main' }} | ||
| path: .sei-skill-src | ||
|
|
||
| - name: Set up Node | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '20' | ||
|
|
||
| - name: Install generator dependency | ||
| run: npm install --no-save @anthropic-ai/sdk | ||
|
|
||
| - name: Record sei-skill revision | ||
| id: src | ||
| run: echo "ref=$(git -C .sei-skill-src rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Regenerate skills from sei-skill | ||
| env: | ||
| ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} | ||
| SEI_SKILL_DIR: ${{ github.workspace }}/.sei-skill-src/skill | ||
| SEI_SKILL_REF: ${{ steps.src.outputs.ref }} | ||
| run: node scripts/build-mintlify-skills.mjs --write | ||
|
|
||
| - name: Clean up source + build dirs | ||
| run: rm -rf .sei-skill-src dist | ||
|
|
||
| - name: Open PR if skills changed | ||
| env: | ||
| GH_TOKEN: ${{ github.token }} | ||
| run: | | ||
| set -euo pipefail | ||
| # Stage first: `git diff --quiet` ignores untracked files, so a brand-new | ||
| # skill (or a first run into an empty .mintlify/skills/) would be missed. | ||
| git add .mintlify/skills | ||
| if git diff --cached --quiet; then | ||
| echo 'No skill changes; nothing to do.' | ||
| exit 0 | ||
| fi | ||
| BRANCH="chore/sync-skills-${{ steps.src.outputs.ref }}" | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
| git checkout -b "$BRANCH" | ||
| git commit -m "chore(skills): regenerate from sei-skill@${{ steps.src.outputs.ref }}" | ||
| git push -f origin "$BRANCH" | ||
| gh pr create \ | ||
| --title "chore(skills): regenerate from sei-skill@${{ steps.src.outputs.ref }}" \ | ||
| --body "Automated regeneration of \`.mintlify/skills/\` from [sei-protocol/sei-skill](https://github.com/sei-protocol/sei-skill)@${{ steps.src.outputs.ref }} via \`scripts/build-mintlify-skills.mjs\`. These are generated artifacts — review for quality before merge." \ | ||
| || echo 'PR already exists for this branch; pushed update.' | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,28 @@ jobs: | |
| - name: Validate docs.json is valid JSON | ||
| run: jq empty docs.json | ||
|
|
||
| - name: Enforce generated-only agent skills | ||
| run: | | ||
| set -euo pipefail | ||
| # .mintlify/skills/ is GENERATED from sei-protocol/sei-skill by | ||
| # scripts/build-mintlify-skills.mjs (see .github/workflows/sync-skills.yml). | ||
| # Hand-authored skill content is not allowed in this repo — every | ||
| # SKILL.md must carry the generation marker. | ||
| shopt -s nullglob | ||
| bad=0 | ||
| count=0 | ||
| for f in .mintlify/skills/*/SKILL.md; do | ||
| count=$((count+1)) | ||
| if ! grep -q 'GENERATED FROM sei-protocol/sei-skill' "$f"; then | ||
| echo "::error file=$f::Missing 'GENERATED FROM sei-protocol/sei-skill' marker — edit the source in sei-skill and regenerate; do not hand-author skills here." | ||
| bad=$((bad+1)) | ||
| fi | ||
| done | ||
| if [[ "$bad" -gt 0 ]]; then | ||
| exit 1 | ||
| fi | ||
| echo "All ${count} skill(s) carry the generated-from-sei-skill marker." | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. CI allows zero skillsMedium Severity The new “generated-only agent skills” step only checks markers on files that exist. With Reviewed by Cursor Bugbot for commit 03db520. Configure here. |
||
|
|
||
| - name: Verify all referenced pages exist | ||
| run: | | ||
| set -euo pipefail | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sync succeeds without generation
Medium Severity
The sync job always runs
build-mintlify-skills.mjs --write, but that script only writes.mintlify/skills/whenANTHROPIC_API_KEYis set. Without the secret, generation is skipped,git diff --cachedis empty, and the workflow exits 0 as if nothing were wrong.Reviewed by Cursor Bugbot for commit 03db520. Configure here.