Skip to content

feat: add skill command and flag to print agent skill file - #732

Open
mwbrooks wants to merge 5 commits into
mainfrom
mwbrooks-skill-command
Open

mwbrooks wants to merge 5 commits into
mainfrom
mwbrooks-skill-command

Conversation

@mwbrooks

@mwbrooks mwbrooks commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Changelog

Coding agents can now read the Slack CLI skill straight from the CLI with slack skill or slack --skill. The output is the same slack-cli skill as in the Slack Skills Plugin, matched to the installed CLI version, with no plugin install needed.

Summary

This pull request bundles the slack-cli agent skill into the Slack CLI, so any coding agent that has the CLI can learn to drive it, even before the developer installs the Slack Skills Plugin.

slack skill > SKILL.md
slack --skill

💡 This is a quick review: only 74 lines are code once the license header is left out. The rest is tests, generated reference docs, and cmd/skill/SKILL.md, which is copied byte-for-byte from slackapi/slack-skills-plugin@bc8345a and can be skipped.

Testing

  • Run slack skill | diff - cmd/skill/SKILL.md and confirm the diff is empty, then repeat with slack skills and slack --skill.
  • Run slack skill inside Claude Code and confirm stdout is the skill only, with just the existing plugin hint on stderr.
  • Run slack app --skill and confirm it fails with unknown flag: --skill, since the flag lives on the root command only.

Notes

  • The command and flag skip the update check, so an update notice can't end up in a saved skill file.
  • The plugin repo stays the source of truth for the skill. A follow-up adds make skill and a workflow that opens a PR when the skill changes.
  • The plugin is MIT licensed and this repo is Apache 2.0. Both are Slack projects, but a maintainer may want to confirm before merging.

Requirements

Bundle the slack-cli skill from the Slack Skills Plugin into the CLI so
any coding agent with the CLI installed can read it with `slack skill`
or `slack --skill`, without installing the plugin first.
An update notice printed after the skill would end up in the skill when
the output is saved to a file.
@mwbrooks mwbrooks added this to the Next Release milestone Oct 28, 2026
@mwbrooks mwbrooks added enhancement M-T: A feature request for new functionality semver:minor Use on pull requests to describe the release version increment labels Oct 28, 2026
@mwbrooks mwbrooks self-assigned this Oct 28, 2026
@mwbrooks mwbrooks changed the title feat: print the agent skill with the skill command and flag feat: add skill command and flag to print agent skill file Oct 28, 2026
@codecov

codecov Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.16%. Comparing base (6f2fa68) to head (d2d00fe).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #732      +/-   ##
==========================================
+ Coverage   78.13%   78.16%   +0.02%     
==========================================
  Files         238      239       +1     
  Lines       18115    18148      +33     
==========================================
+ Hits        14154    14185      +31     
- Misses       3961     3963       +2     

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

Comment thread cmd/skill/skill.go
Comment on lines +27 to +34
// skillFile is the "slack-cli" agent skill from the Slack Skills Plugin. The
// copy here ships with each release so the skill matches the commands of the
// installed version.
//
// https://github.com/slackapi/slack-skills-plugin/blob/main/skills/slack-cli/SKILL.md
//
//go:embed SKILL.md
var skillFile string

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: embed the skill file. In a follow-up PR we'll add sync from slackapi/slack-skills-plugin through a GitHub Action.

Comment thread cmd/skill/skill.go
func NewCommand(clients *shared.ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "skill",
Aliases: []string{"skills"},

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: alias as skills

Comment thread internal/update/update.go
// Commands that skip update checks only when used alone or with flags
// "manifest" is included because it's an alias that runs "manifest info"
ignoredCommands := []string{"_fingerprint", "manifest", "manifest info", "version"}
ignoredCommands := []string{"--skill", "_fingerprint", "manifest", "manifest info", "skill", "skills", "version"}

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 will disable updates on the skill command and flag so that slack skill > SKILL.md doesn't print the update notification.

Keeps the root command constructor as it was, apart from the check in
its run function.
@mwbrooks
mwbrooks marked this pull request as ready for review October 28, 2026 17:27
@mwbrooks
mwbrooks requested review from a team as code owners October 28, 2026 17:27

@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 Clever approach in a fantastic pattern! I'm approving now but want to start with a smaller surface when landing this because I find odd issue with some combination. Otherwise this is so amazing 🌠

$ slack skill --skill

-f, --force ignore warnings and continue executing command
-h, --help help for slack
--no-color remove styles and formatting from outputs
--skill print the agent skill for the Slack CLI

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: I'd favor the command over a global flag option to start? Unless we're finding standard toward both of course!

Suggested change
--skill print the agent skill for the Slack CLI

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 @zimeg! I'd like to keep the flag.

Most of the CLIs we found that print their own skill use a flag: herdr --skill, tuios --skill, and mcpc help --skill. It also pairs with our slack version and slack --version.

Good catch on the combinations! slack skill --skill and slack --skill skill now print the skill in 12fb1cb.

An agent that doesn't have the skill yet is the one most likely to mix them up, so we should help it succeed.

@zimeg zimeg added the changelog Use on updates to be included in the release notes label Oct 28, 2026
Agents that combine the command and flag, as in `slack skill --skill`
or `slack --skill skill`, now get the skill instead of an unknown flag
error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog Use on updates to be included in the release notes enhancement M-T: A feature request for new functionality semver:minor 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