Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
43 changes: 43 additions & 0 deletions .github/workflows/agent-skills.yml
Original file line number Diff line number Diff line change
@@ -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

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.

💯 praise: persist-credentials: false, with GH_TOKEN set only on the last step, keeps the token away from the step that runs npx.

- 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)

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.

📦 issue (blocking): skills@1 floats to every new 1.x release, and anything it writes to .git/hooks runs in the next step's git commit with GH_TOKEN set. Could we pin an exact version?

Suggested change
(cd "$(dirname "$lock")" && npx --yes skills@1 update --project --yes)
(cd "$(dirname "$lock")" && npx --yes skills@1.9.0 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."

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.

✅ issue (blocking): main's ruleset requires the lint, typecheck, and test checks from ci.yml, but a PR opened with the default github.token never starts pull_request workflows, so each update PR sits unmergeable. Could we pass an app token from actions/create-github-app-token instead?

fi
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ This collections of examples highlights features of a Slack app in the language

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 `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:
Expand Down
Loading