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 only on the push step keeps the token away from the update step.

- 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 and runs in a job that can write. A bad release could drop a .git/hooks file or a $GITHUB_PATH shim that the next step runs with GH_TOKEN. Could we pin an exact version, like skills@1.9.0?

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 here requires the six lint and test checks from CI, but a PR opened with the default GITHUB_TOKEN never triggers ci.yml. Each update PR would wait on them until someone re-triggers it. Could we use an app token from actions/create-github-app-token for the push and gh pr create?

fi
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading