Skip to content

ci: sync the slack-cli skill from slack-skills-plugin each day - #736

Merged
mwbrooks merged 3 commits into
mainfrom
mwbrooks-skill-sync
Nov 3, 2026
Merged

mwbrooks merged 3 commits into
mainfrom
mwbrooks-skill-sync

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request keeps the skill printed by slack skill current for maintainers, without anyone copying it by hand. A daily job downloads the slack-cli skill from the main branch of slackapi/slack-skills-plugin and opens a pull request when it changed.

It's a copy of the golang job in the same workflow, with the same schedule, token, labels, and milestone. main is also the branch npx skills installs the skill from.

Testing

  • Run the download step's curl and diff it against cmd/skill/SKILL.md. Plugin main now uses bare skill names (create-slack-app, not slack:create-slack-app) since fix: reference skills by the name every install path registersΒ slack-skills-plugin#191, so the first run opens a sync pull request.
  • Point the curl at a missing path and confirm it fails the step instead of writing an error page into the skill file.
  • After merging, trigger "Update dependencies" with workflow_dispatch and confirm the "Sync the agent skill" job passes.

Notes

Requirements

A scheduled job downloads the skill from the plugin's main branch and
opens a pull request when it changed, the same way the golang job bumps
the Go version.
@mwbrooks mwbrooks added this to the Next Release milestone Oct 29, 2026
@mwbrooks mwbrooks added code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment labels Oct 29, 2026
@mwbrooks mwbrooks self-assigned this Oct 29, 2026
@mwbrooks
mwbrooks requested a review from zimeg October 29, 2026 19:06
env:
GITHUB_TOKEN: ${{ steps.credentials.outputs.token }}
VERSION: ${{ steps.version.outputs.latest }}
skill:

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: This job is a copy of the golang job above. It uses the same daily schedule, token, labels, and milestone, so there's nothing new to maintain.

token: ${{ steps.credentials.outputs.token }}
- name: Download the latest skill
run: |
curl -fsSL "https://raw.githubusercontent.com/slackapi/slack-skills-plugin/main/skills/slack-cli/SKILL.md" -o cmd/skill/SKILL.md

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: We download from the plugin's main branch because that's what npx skills installs. The -f flag fails the step on a 404 instead of writing an error page into SKILL.md.

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.

πŸ‘οΈβ€πŸ—¨οΈ thought: Using curl is clever... I would've checked out the entire skills repo but let's not add complications if not needed of course!

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.

Thanks! The skill is a single file, so curl keeps it simple. If we ever bundle more of the plugin, checking out the repo would be the way to go.

Comment thread .github/workflows/dependencies.yml Outdated
exit 0
fi
git commit --all -m "chore: sync the slack-cli skill from slack-skills-plugin"
git push -u origin chore-sync-skill

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: Like the golang job, this push fails if an earlier sync PR is still open. A failed run means a sync PR is waiting to merge.

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.

πŸͺ¬ question: Do you think updating an existing PR or branch would be better? I don't think we'd want to merge an outdated skill change PR?

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.

Agreed, an outdated sync PR shouldn't merge. In e00279a the job force-pushes the bot's chore-sync-skill branch from the latest main with the latest skill, and skips gh pr create when a sync PR is already open. So an open PR always has the newest skill.

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… Project coverage is 78.17%. Comparing base (9dc0259) to head (afcc983).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #736   +/-   ##
=======================================
  Coverage   78.17%   78.17%           
=======================================
  Files         240      240           
  Lines       18164    18164           
=======================================
  Hits        14199    14199           
  Misses       3965     3965           

β˜” View full report in Codecov by Harness.
πŸ“’ Have feedback on the report? Share it here.

πŸš€ New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mwbrooks
mwbrooks marked this pull request as ready for review October 29, 2026 19:10
@mwbrooks
mwbrooks requested a review from a team as a code owner October 29, 2026 19:10
@zimeg zimeg added the build M-T: Changes to compilation and CI processes label Oct 29, 2026
@slack-cli-releaser slack-cli-releaser Bot modified the milestones: v4.12.0, Next Release Oct 30, 2026

@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 Love this pattern so much! I'm leaving a question about updating branches before merge to avoid outdated main merges but let me know if I should rethink these questions please πŸ’Œ

Comment on lines +100 to +102
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID_RELEASER }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_RELEASER }}

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.

πŸ™ suggestion: Perhaps we can scope the app token to what this job needs? zizmor flags github-app here since the token inherits all of the installation permissions. The golang job could follow in a separate change I think.

Suggested change
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID_RELEASER }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_RELEASER }}
with:
client-id: ${{ secrets.GH_APP_CLIENT_ID_RELEASER }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY_RELEASER }}
permission-contents: write
permission-pull-requests: write

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.

Great call @zimeg! Scoped to contents and pull-requests in e00279a. I'll follow up with the same scoping for the golang job in a separate PR.

token: ${{ steps.credentials.outputs.token }}
- name: Download the latest skill
run: |
curl -fsSL "https://raw.githubusercontent.com/slackapi/slack-skills-plugin/main/skills/slack-cli/SKILL.md" -o cmd/skill/SKILL.md

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.

πŸ‘οΈβ€πŸ—¨οΈ thought: Using curl is clever... I would've checked out the entire skills repo but let's not add complications if not needed of course!

Comment thread .github/workflows/dependencies.yml Outdated
exit 0
fi
git commit --all -m "chore: sync the slack-cli skill from slack-skills-plugin"
git push -u origin chore-sync-skill

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.

πŸͺ¬ question: Do you think updating an existing PR or branch would be better? I don't think we'd want to merge an outdated skill change PR?

The app token gets only the contents and pull requests permissions it
needs. When a sync pull request is already open, the job replaces its
branch with the latest skill on main instead of failing the push.
@mwbrooks
mwbrooks requested a review from zimeg November 2, 2026 18:26

@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 Thanks for adjustments ongoing! I think we should start with this 🎁

@mwbrooks
mwbrooks merged commit 697cbd8 into main Nov 3, 2026
14 checks passed
@mwbrooks
mwbrooks deleted the mwbrooks-skill-sync branch November 3, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build M-T: Changes to compilation and CI processes code health M-T: Test improvements and anything that improves code health semver:patch Use on pull requests to describe the release version increment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants