Repository navigation
ci: open a pull request when the agent skills update - #98
Conversation
WilliamBergamin
left a comment
There was a problem hiding this comment.
📦 Thanks @mwbrooks! Keeping the pre-installed skills fresh without anyone running npx skills update is a nice win for devs who start from this sample.
One blocking comment on pinning the skills CLI, the rest is praise 🙏
| - 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) |
There was a problem hiding this comment.
📦 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, or commit with git -c core.hooksPath=/dev/null commit?
| (cd "$(dirname "$lock")" && npx --yes skills@1 update --project --yes) | |
| (cd "$(dirname "$lock")" && npx --yes skills@1.9.0 update --project --yes) |
There was a problem hiding this comment.
note: Keeping skills@1 for now, per our DM. The token stays off the npx step, and a pin would mostly add version bumps to chase across 49 samples.
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false |
There was a problem hiding this comment.
💯 praise: persist-credentials: false with GH_TOKEN only on the last step keeps the token away from the step that runs npx.
| 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 |
There was a problem hiding this comment.
💯 praise: skipping the force-push when the open agent-skills PR already holds the same tree on current main keeps the daily run from churning the PR.
WilliamBergamin
left a comment
There was a problem hiding this comment.
📦 @mwbrooks thanks for the follow-up. Keeping skills@1 with the token off the npx step works for us, so that's no longer blocking 🚀
The blocking concerns are resolved; see the latest review.
|
Thanks @zimeg for the review, and @WilliamBergamin for the careful look at the token and the |
Summary
This pull request keeps the pre-installed agent skills current for developers who build from this sample, so their coding agent follows the latest Slack guidance without anyone running
npx skills updateby hand.npx skills@1 update --project --yesand opens onechore: update agent skillspull request when the skills change..agents/skills,.claude/skills, andskills-lock.json, becauseskillsalso writes.grok/and.kiro/folders on update.Testing
Notes
mainofslackapi/slack-skills-plugin, the same asnpx skills update.