Skip to content

ci: open a pull request when the agent skills update - #320

Merged
mwbrooks merged 1 commit into
mainfrom
mwbrooks-gh-workflow-agent-skills
Nov 19, 2026
Merged

mwbrooks merged 1 commit into
mainfrom
mwbrooks-gh-workflow-agent-skills

Conversation

@mwbrooks

Copy link
Copy Markdown
Member

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 update by hand.

  • A daily workflow runs npx skills@1 update --project --yes in each folder with a skills-lock.json (3 in this repository) and opens one chore: update agent skills pull request when the skills change.
  • The workflow commits only .agents/skills, .claude/skills, and skills-lock.json, because skills also writes .grok/ and .kiro/ folders on update.
  • A README line explains the repository setting that lets the workflow open pull requests in an app created from this sample.

Testing

  • After merge, run Update agent skills from the Actions tab and confirm it opens one pull request that updates the skills in every folder.
  • Run it again and confirm it leaves that pull request unchanged.

Notes

@mwbrooks mwbrooks added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Nov 18, 2026
@mwbrooks mwbrooks self-assigned this Nov 18, 2026
@mwbrooks
mwbrooks marked this pull request as ready for review November 18, 2026 23:16
@mwbrooks
mwbrooks requested a review from a team as a code owner November 18, 2026 23:16

@zimeg zimeg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🧪 @mwbrooks LGTM! Neat that one workflow keeps the skills current for each app here 🎁

@WilliamBergamin WilliamBergamin left a comment

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.

🙏 Thanks @mwbrooks, the find loop picks up all three sample folders without naming them, so one copy of the workflow fits this repo as-is.
Left one optional comment on pinning skills, nothing blocking 💯

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

📦 suggestion (non-blocking): skills@1 floats to each new 1.x release, and anything it writes to .git/hooks or $GITHUB_PATH runs in the next step with GH_TOKEN set. Could we pin an exact version, like skills@1.9.0, or commit with git -c core.hooksPath=/dev/null commit?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

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

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 last step keeps the npx run away from the token, and the explicit pathspecs leave the stray .grok/ and .kiro/ folders out.

@mwbrooks

Copy link
Copy Markdown
Member Author

Thanks @zimeg for the review, and @WilliamBergamin for the careful look at the token and the skills version! 🙇

@mwbrooks
mwbrooks merged commit 1ab245b into main Nov 19, 2026
8 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-gh-workflow-agent-skills branch November 19, 2026 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants