Repository navigation
Conversation
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
| // 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 |
There was a problem hiding this comment.
note: embed the skill file. In a follow-up PR we'll add sync from slackapi/slack-skills-plugin through a GitHub Action.
| func NewCommand(clients *shared.ClientFactory) *cobra.Command { | ||
| cmd := &cobra.Command{ | ||
| Use: "skill", | ||
| Aliases: []string{"skills"}, |
| // 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"} |
There was a problem hiding this comment.
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.
| -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 |
There was a problem hiding this comment.
🤖 thought: I'd favor the command over a global flag option to start? Unless we're finding standard toward both of course!
| --skill print the agent skill for the Slack CLI |
There was a problem hiding this comment.
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.
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.
Changelog
Coding agents can now read the Slack CLI skill straight from the CLI with
slack skillorslack --skill. The output is the sameslack-cliskill as in the Slack Skills Plugin, matched to the installed CLI version, with no plugin install needed.Summary
This pull request bundles the
slack-cliagent 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 fromslackapi/slack-skills-plugin@bc8345aand can be skipped.Testing
slack skill | diff - cmd/skill/SKILL.mdand confirm the diff is empty, then repeat withslack skillsandslack --skill.slack skillinside Claude Code and confirm stdout is the skill only, with just the existing plugin hint on stderr.slack app --skilland confirm it fails withunknown flag: --skill, since the flag lives on the root command only.Notes
make skilland a workflow that opens a PR when the skill changes.Requirements