Skip to content

Commit 2aca0c7

Browse files
zimegClaude
andcommitted
feat: add slackbot.skills.list method example
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent 24c54e9 commit 2aca0c7

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

‎methods/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ $ slack run chat_post_message.py # Make the request
4747

4848
- **[slackbot.skills.create](https://docs.slack.dev/reference/methods/slackbot.skills.create)**: Creates a skill from markdown instructions, or turns an existing canvas the caller owns into a skill. [Implementation](./src/slackbot/skills/slackbot_skills_create.py).
4949
- **[slackbot.skills.info](https://docs.slack.dev/reference/methods/slackbot.skills.info)**: Returns one Slackbot skill, including its instructions. [Implementation](./src/slackbot/skills/slackbot_skills_info.py).
50+
- **[slackbot.skills.list](https://docs.slack.dev/reference/methods/slackbot.skills.list)**: Lists Slackbot skills from the caller's point of view. Instructions are not included. [Implementation](./src/slackbot/skills/slackbot_skills_list.py).
5051
- **[slackbot.skills.update](https://docs.slack.dev/reference/methods/slackbot.skills.update)**: Changes a Slackbot skill's instructions or metadata. Only the inputs you send are changed; a call that changes nothing succeeds without writing. [Implementation](./src/slackbot/skills/slackbot_skills_update.py).
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
3+
from slack_sdk import WebClient
4+
5+
# Read a token from an environment variable
6+
token = os.environ.get("SLACK_TOKEN")
7+
8+
# Initialize
9+
client = WebClient(token=token)
10+
11+
# Call the slackbot.skills.list method
12+
response = client.slackbot_skills_list(
13+
category="productivity",
14+
filter="library",
15+
limit=100,
16+
)
17+
18+
# Inspect the response
19+
print(response)

0 commit comments

Comments
 (0)