Skip to content

feat: add slackbot.skills and admin.slackbot.skills methods - #1683

Closed
zimeg wants to merge 2 commits into
mainfrom
zimeg-feat-slackbot-skills
Closed

zimeg wants to merge 2 commits into
mainfrom
zimeg-feat-slackbot-skills

Conversation

@zimeg

@zimeg zimeg commented Nov 11, 2026

Copy link
Copy Markdown
Member

This pull request adds the 11 Slackbot skills Web API methods to the sync and async clients.

  • slackbot.skills.create, .delete, .info, .library.add, .library.remove, .list, .update (skills:read / skills:write)
  • admin.slackbot.skills.list, .publish, .setAutoEnabled, .unpublish (admin.skills:read / admin.skills:write)
  • New com.slack.api.model.slackbot.Skill model, shared by the create, info, list and update responses, plus SkillMcpServer for the mcp_servers argument.
  • Request field Javadoc copies the argument descriptions from the docs.slack.dev reference pages.
  • Response fields are typed from the docs examples and confirmed against live responses. This adds invalid_mcp_servers (create and update) and invalid_usergroup_ids (setAutoEnabled), which the docs name in the errors table but don't show in an example.
  • mcp_servers is sent as a JSON array of {service_type, app_id, server_id} objects. The reference pages only say "array". The API rejects plain strings ("must provide an object") and any other keys ("invalid additional property"). An empty list sends [], which clears the list on update.
  • skill_ids, creator_ids and usergroup_ids are sent comma-joined, like other ID arrays in this SDK.
  • JsonDataRecorder now writes a typed sample for empty mcp_servers arrays instead of "".

Testing

The new test_with_remote_apis tests were run against an Enterprise Grid developer sandbox using an org-installed test app:

mvn test -pl slack-api-client '-Dtest=test_with_remote_apis.methods.slackbot_skills_Test,test_with_remote_apis.methods_admin_api.AdminApi_slackbot_skills_Test'
  • slackbot_skills_Test uses SLACK_SDK_TEST_BOT_TOKEN (needs canvases:write, skills:read, skills:write). It creates a skill from instructions, then calls info, update (including an unknown MCP server), owned list, library remove and add, and delete. It also turns a new canvas into a skill and deletes it, and runs async list and info.
  • AdminApi_slackbot_skills_Test uses SLACK_SDK_TEST_GRID_ORG_ADMIN_USER_TOKEN (needs admin.skills:read, admin.skills:write, skills:write). It lists with each sort, then creates a skill, publishes it, runs a partial publish to check failed_skills, and auto-enables it. With SLACK_SDK_TEST_GRID_IDP_USERGROUP_ID_2 set it also auto-enables for a user group and checks an unknown group. Finally it sets no_one, unpublishes, and deletes the skill.
  • Both tests pass with setFailOnUnknownProperties(true), and every test skill is deleted at the end.
  • The existing test apps need these scopes added before the tests pass in the full remote suite.

Category (place an x in each of the [ ])

  • bolt (Bolt for Java)
  • bolt-{sub modules} (Bolt for Java - optional modules)
  • slack-api-client (Slack API Clients)
  • slack-api-model (Slack API Data Models)
  • slack-api-*-kotlin-extension (Kotlin Extensions for Slack API Clients)
  • slack-app-backend (The primitive layer of Bolt for Java)

Requirements

Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.

🤖 Generated with Claude Code

Adds the 11 Slackbot skills Web API methods to the sync and async
clients: slackbot.skills.{create,delete,info,library.add,library.remove,
list,update} and admin.slackbot.skills.{list,publish,setAutoEnabled,
unpublish}. A shared Skill model backs the create, info, list and update
responses, and SkillMcpServer types the mcp_servers argument.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg added this to the 1.54.1 milestone Nov 11, 2026
@zimeg zimeg added enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client project:slack-api-model project:slack-api-model semver:minor labels Nov 11, 2026
@zimeg zimeg self-assigned this Nov 11, 2026
@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.49123% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.92%. Comparing base (c847d97) to head (f5b49d5).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...java/com/slack/api/methods/RequestFormBuilder.java 93.65% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1683      +/-   ##
============================================
+ Coverage     73.75%   73.92%   +0.16%     
- Complexity     4679     4737      +58     
============================================
  Files           487      487              
  Lines         14669    14783     +114     
  Branches       1528     1534       +6     
============================================
+ Hits          10819    10928     +109     
- Misses         2939     2942       +3     
- Partials        911      913       +2     
Flag Coverage Δ
jdk-14 73.92% <96.49%> (+0.16%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Orders the slackbot.skills methods case-insensitively, ahead of
slackLists, to match the Node and Python SDKs. The generated
rate_limit_tiers.json keeps its case-sensitive order.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg

zimeg commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

A note on placement: the slackbot.skills.* methods come before slackLists.* in Methods, MethodsClient, AsyncMethodsClient, both implementations, MethodsRateLimits, RequestFormBuilder and MethodsTest, because method names are sorted case-insensitively. slackbot (b) sorts before slackLists (l). This matches the Node and Python SDKs. The exception is metadata/web-api/rate_limit_tiers.json, which RateLimitsDumpTest generates in case-sensitive order, so there slackLists.* stays first.

@zimeg

zimeg commented Nov 12, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of a stack with one pull request per method, following a skill from creation to deletion: #1685 through #1695. The branch is kept.

@zimeg zimeg closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement M-T: A feature request for new functionality project:slack-api-client project:slack-api-client project:slack-api-model project:slack-api-model semver:minor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant