agentleFS
ai-analyst-labai-analyst-lab/ai-analyst/.claude/skills/setup-slack/SKILL.md

setup-slack

Skill304 starsChanged 2 months agoMITView on GitHub

Connect a user's own AI Analyst Lab Slack identity through browser OAuth, store the personal user token locally, verify the workspace and target channel, and prepare one previewed Web API post. Use when the user asks to connect Slack, set up Slack, post to show-and-tell, or diagnose Slack.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 7 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not configure or search for a Slack MCP server.

    line 15
  2. Distinctive:

    Do not ask the user to paste the token into chat.

    line 41
  3. Very specific:

    Stop if the resolved channel id is not C0ACN1QM0RL.

    line 75
  4. Very specific:

    Write the proposed message to a temporary file under working/.

    line 79
  5. Very specific:

    Use the user's personal xoxp- token, never a shared bot token.

    line 96
  6. Distinctive:

    Never print, inspect, summarize, or transmit the token.

    line 97
  7. Distinctive:

    Verify the workspace before resolving or writing to a channel.

    line 98
  8. Distinctive:

    Verify the exact channel id before writing.

    line 99
  9. Distinctive:

    Never retry an uncertain write.

    line 101
  10. Distinctive:

    Do not configure Slack MCP for this path.

    line 102

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup Slack

Purpose

Connect the user's own Slack account to the AI Analyst Lab workspace. Use Slack's browser OAuth flow for authorization and the repository's direct Web API helper for verification and posting. Do not configure or search for a Slack MCP server.

Course connection

  • Authorization page: https://slack-auth.shane-aea.workers.dev
  • Expected workspace: AI Analyst Lab
  • Expected workspace id: T0ACPJ21WRG
  • Expected public channel: show-and-tell
  • Expected channel id: C0ACN1QM0RL
  • Personal token environment variable: SLACK_USER_TOKEN

Instructions

1. Prepare the local environment file

Confirm .env is ignored by Git. Preserve every existing variable. Add these non-secret values and an empty token line if they are not already present:

SLACK_USER_TOKEN=
SLACK_WORKSPACE_NAME=AI Analyst Lab
SLACK_WORKSPACE_ID=T0ACPJ21WRG
SLACK_CHANNEL_NAME=show-and-tell
SLACK_CHANNEL_ID=C0ACN1QM0RL

Do not ask the user to paste the token into chat. Do not read, echo, or print its value.

2. Open browser authorization

Open the authorization page in the user's default browser. Tell the user to confirm that Slack shows the AI Analyst Lab workspace and asks for only these permissions:

  • send messages as the user;
  • view basic information about public channels.

Slack creates a personal token beginning with xoxp-. The user must copy it from the browser and paste it directly after SLACK_USER_TOKEN= in .env, then save the file. The token must never go into the conversation, a screenshot, a commit, or a saved report. Claude Code does not need to be restarted.

3. Verify the account and workspace

Run:

python scripts/slack_web_api.py verify

Show the non-secret workspace and user information. Stop if the workspace id is not T0ACPJ21WRG.

4. Verify the destination

Run:

python scripts/slack_web_api.py resolve --channel-name show-and-tell

Stop if the resolved channel id is not C0ACN1QM0RL.

5. Preview before any post

Write the proposed message to a temporary file under working/. Run the helper's preview command and show the user the exact message, workspace, and destination. Do not post until the user explicitly approves that preview.

6. Post once and retain the link

After approval, run:

python scripts/slack_web_api.py post --message-file working/slack-message.txt --send

Return the response timestamp and permalink. Ask the user to open Slack and confirm that the message appears once under their own name.

Rules

  1. Use the user's personal xoxp- token, never a shared bot token.
  2. Never print, inspect, summarize, or transmit the token.
  3. Verify the workspace before resolving or writing to a channel.
  4. Verify the exact channel id before writing.
  5. Preview the exact message and require approval before the write.
  6. Never retry an uncertain write. Inspect Slack first.
  7. Do not configure Slack MCP for this path.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.