Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
37b20f4
feat(skills): add the sei-skill generator and sync workflow
alexander-sei Sep 30, 2026
20f0acd
feat(skills): host the Foundation skills generated from sei-skill@e24…
alexander-sei Sep 30, 2026
dbcad51
feat(docs): add the skills registry and templates gallery
alexander-sei Sep 30, 2026
39e012c
ci(skills): require generated skills that match the registry
alexander-sei Sep 30, 2026
df9cb5d
fix(skills): correct the unsafe and broken code samples
alexander-sei Sep 30, 2026
38d8046
fix(skills): keep sample fixes and reject bad generator output
alexander-sei Sep 30, 2026
597c163
fix(skills): match precompile ABIs and CLI flags to sei-chain
alexander-sei Sep 30, 2026
0db955e
fix(skills): keep authority checks and treat on-chain strings as data
alexander-sei Sep 30, 2026
4c3b462
ci(skills): validate sync PRs inline and require ANTHROPIC_MODEL
alexander-sei Sep 30, 2026
67fdc59
fix(skills): bind x402 claims to the payer
alexander-sei Sep 30, 2026
6148f6d
fix(skills): gate agent writes on confirmation, keep a real reentranc…
alexander-sei Sep 30, 2026
a16968d
fix(skills): fail closed on validator resync and check receipt status
alexander-sei Sep 30, 2026
06212f3
ci(skills): lint samples for known regressions and pin sync dependencies
alexander-sei Sep 30, 2026
6e5f3d6
fix(skills): correct the remote-signer config and show the write target
alexander-sei Oct 1, 2026
c5a4a92
ci(skills): reject invented [priv-validator] keys
alexander-sei Oct 1, 2026
d23655e
fix(skills): canonicalize x402 hashes and correct archive and provide…
alexander-sei Oct 1, 2026
4eabc00
fix(skills): move the payments skill to x402 v2
alexander-sei Oct 1, 2026
c18b174
ci(skills): reject deprecated @sei-js/x402 packages in samples
alexander-sei Oct 1, 2026
ad59fb2
fix(generator): add a house-style block and harden the CLI
alexander-sei Oct 1, 2026
51ffa82
fix(skills): split fresh state sync from resync and apply the house s…
alexander-sei Oct 1, 2026
4524e1b
ci(skills): accept quoted skill names and narrow the receipt check
alexander-sei Oct 1, 2026
d6905d0
ci(skills): close superseded sync PRs
alexander-sei Oct 1, 2026
6ada975
docs(skills): copy a per-skill install command from each registry card
alexander-sei Oct 1, 2026
0faf74a
docs(templates): keep code out of linked cards and link versions to c…
alexander-sei Oct 1, 2026
6385c8b
fix(redirects): keep /skill and /agents on the sei-docs playbook
alexander-sei Oct 1, 2026
239721b
docs(node): fix the archive and state sync node settings
alexander-sei Oct 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,11 @@ jobs:
run: mint --version && test -f docs.json

- name: Check for broken links
# Parses every .md/.mdx as MDX — including the generated skills under
# .mintlify/skills/, which the Mintlify platform also MDX-parses at deploy
# time. Keeping them in this check surfaces an unparsable generated skill
# here (with file:line) instead of as an opaque deployment failure. Skills
# must therefore stay MDX-clean: no HTML comments, no bare < > or { }
# outside code spans (the GENERATED marker lives inside the frontmatter
# as YAML comments for this reason).
run: mint broken-links
114 changes: 114 additions & 0 deletions .github/workflows/sync-skills.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
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 and repo variable ANTHROPIC_MODEL (a
# current model ID).

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@0.129.0

- 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 }}
ANTHROPIC_MODEL: ${{ vars.ANTHROPIC_MODEL }}
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

# PRs opened with GITHUB_TOKEN don't trigger other workflows, so the sync PR
# never runs validate-docs.yml or link-check.yml. Run their skill checks here.
- name: Validate regenerated skills
run: |
node scripts/check-skills.mjs
npx --yes mint@4.2.952 broken-links

- name: Open PR if skills changed
env:
GH_TOKEN: ${{ github.token }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] The branch push and gh pr create both use github.token, and events created with GITHUB_TOKEN don't trigger other push/pull_request workflows. The generated sync PRs would therefore skip validate-docs.yml (the generated-marker and registry checks) and link-check.yml (MDX parse). That's the review gate this PR relies on for LLM output. Use a GitHub App or PAT token, or run the validation steps inline in this job before opening the PR.

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 }}"
# A reviewer may have pushed fixups to an open sync PR for this ref;
# a force-push would silently discard them.
if [[ -n "$(gh pr list --head "$BRANCH" --state open --json number --jq '.[].number')" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] This only checks for an open PR from the branch for the same ref. When a new sei-skill release dispatches while an older sync PR is still open, a second PR opens and the two overlap on the same files. Consider closing or superseding any open chore/sync-skills-* PR, or using one fixed branch name.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[suggestion] (Also raised by Codex.) The gh pr list call runs inside $(...) within the [[ ]] test, so set -e doesn't apply to it. If the API call fails, the result is an empty string and the test reads it as "no open PR". The script then goes on to git push -f, which can overwrite reviewer fixups on an open sync PR. Run the lookup first and fail if it fails, e.g. open=$(gh pr list --head "$BRANCH" --state open --json number --jq '.[].number') on its own line, then if [[ -n "$open" ]].

echo "An open PR already syncs sei-skill@${{ steps.src.outputs.ref }}; leaving it untouched."
exit 0
fi
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 }}"
# Overwrites a leftover branch from a closed sync PR for the same ref.
git push -f origin "$BRANCH"
new_pr=$(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.")
# Close open sync PRs for older refs, so two PRs never rewrite the same skills.
# Their branches stay, so a reviewer's fixups there can still be ported.
gh pr list --state open --limit 100 --json number,headRefName |
jq -r --arg branch "$BRANCH" '.[] | select((.headRefName | startswith("chore/sync-skills-")) and .headRefName != $branch) | .number' |
while read -r number; do
gh pr close "$number" --comment "Superseded by $new_pr, which syncs sei-skill@${{ steps.src.outputs.ref }}. This branch is kept, so any fixups here can be ported."
done
3 changes: 3 additions & 0 deletions .github/workflows/validate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
- name: Validate docs.json is valid JSON
run: jq empty docs.json

- name: Enforce generated-only agent skills
run: node scripts/check-skills.mjs

- name: Validate snippet theme defaults
run: node scripts/check-snippet-theme-default.mjs

Expand Down
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.DS_Store
node_modules/
.mintlify/
# Mintlify uses .mintlify/ as a local build cache, but .mintlify/skills/ holds
# the hosted agent skills (SKILL.md) that must ship — keep that subtree tracked.
.mintlify/*
!.mintlify/skills/
.next/
.vercel/
dist/
Expand Down
3 changes: 3 additions & 0 deletions .mintignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ STYLE_GUIDE.md
# Draft content
drafts/
*.draft.mdx

# Local output of scripts/build-mintlify-skills.mjs (gitignored)
dist/
Loading
Loading