Skip to content

Commit 3c19bae

Browse files
zimegClaude
andauthored
feat: add slackbot.skills.info method example (#370)
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
1 parent cb52fd0 commit 3c19bae

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

‎methods/README.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,4 @@ $ slack run chat_post_message.py # Make the request
4646
### slackbot
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).
49+
- **[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).

‎methods/src/slackbot/skills/manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"oauth_config": {
1313
"scopes": {
14-
"bot": ["skills:write"]
14+
"bot": ["skills:read", "skills:write"]
1515
}
1616
},
1717
"settings": {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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.info method
12+
response = client.slackbot_skills_info(
13+
skill_id="F0123ABCD",
14+
)
15+
16+
# Inspect the response
17+
print(response)

0 commit comments

Comments
 (0)