From db1543da21ba84411ea51b2a5563ebc20b69cb8d Mon Sep 17 00:00:00 2001 From: Michael Brooks Date: Wed, 18 Nov 2026 16:45:05 -0600 Subject: [PATCH] ci: open a pull request when the agent skills update --- .github/workflows/agent-skills.yml | 43 ++++++++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 45 insertions(+) create mode 100644 .github/workflows/agent-skills.yml diff --git a/.github/workflows/agent-skills.yml b/.github/workflows/agent-skills.yml new file mode 100644 index 0000000..779fe51 --- /dev/null +++ b/.github/workflows/agent-skills.yml @@ -0,0 +1,43 @@ +name: Update agent skills + +on: + schedule: + - cron: "0 9 * * *" + workflow_dispatch: + +jobs: + skills: + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: write + pull-requests: write + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 + with: + node-version: 24.x + - name: Update the skills in each skills-lock.json + run: | + while IFS= read -r lock; do + (cd "$(dirname "$lock")" && npx --yes skills@1 update --project --yes) + done < <(find . -name skills-lock.json -not -path "*/node_modules/*") + - name: Open a pull request with the updates + env: + GH_TOKEN: ${{ github.token }} + run: | + git add -- '*skills-lock.json' '*.agents/skills/*' '*.claude/skills/*' + if git diff --cached --quiet; then exit 0; fi + gh auth setup-git + state="$(gh pr view agent-skills --json state --jq .state 2>/dev/null || true)" + if [ "$state" = "OPEN" ] && git fetch --quiet --depth 2 origin agent-skills && [ "$(git rev-parse FETCH_HEAD^)" = "$(git rev-parse HEAD)" ] && git diff --cached --quiet FETCH_HEAD; then exit 0; fi + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + git switch -C agent-skills + git commit -m "chore: update agent skills" + git push --force origin agent-skills + if [ "$(gh pr view agent-skills --json state --jq .state 2>/dev/null)" != "OPEN" ]; then + gh pr create --head agent-skills --title "chore: update agent skills" --body "Updates the agent skills in \`skills-lock.json\` to the latest versions." + fi diff --git a/README.md b/README.md index 127cd1a..915a249 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ All implementations share the same Slack listener layer and the same user experi Install the [Slack MCP and Skills Plugin](https://docs.slack.dev/ai/slack-skills-plugin/) so your coding agent can create, run, and deploy Slack apps, look up Web API methods and scopes, and build Block Kit without guessing. +`.github/workflows/agent-skills.yml` checks daily for updates to the agent skills in each `skills-lock.json` and opens a pull request when they change. To let it open pull requests in your own repository, turn on **Allow GitHub Actions to create and approve pull requests** in **Settings > Actions > General**. + ### Claude Code Run this in a Claude Code session: