slack-token-extractor

slack-token-extractor is a skill for Claude Code, Codex from crypdick/pynchy. It costs 34 tokens per session (616 once invoked), scanned A, original, MIT.

A tool for refreshing Slack browser-session tokens used by an integration. It keeps a saved browser login so tokens can be extracted again after they expire.

In plain words
What is it for?
Setting up a persistent Slack browser session, completing the first human login, and refreshing tokens for later headless use on a server.
Why use it?
It helps restore Slack access when the integration reports authentication errors, without requiring a new login every time.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/crypdick/pynchy/slack-token-extractor
Any agent
npx skills add crypdick/pynchy --skill slack-token-extractor
Clone the repo
git clone --depth 1 https://github.com/crypdick/pynchy

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for slack-token-extractor

README.md
[![agentmods](https://agentmods.dev/badge/skills/crypdick/pynchy/slack-token-extractor.svg)](https://agentmods.dev/skills/crypdick/pynchy/slack-token-extractor)
Your own site
<a href="https://agentmods.dev/skills/crypdick/pynchy/slack-token-extractor"><img src="https://agentmods.dev/badge/skills/crypdick/pynchy/slack-token-extractor.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 616 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00034 $0.00616
Opus 5 $0.00017 $0.00308
Sonnet 5 $0.00007 $0.00123
Haiku 4.5 $0.00003 $0.00062

Measured 4d ago against content hash c206715f81d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

slack-token-extractor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/pynchy/plugins/integrations/slack_token_extractor/skills/slack-token-extractor/SKILL.md · 64 lines

How it starts

The opening of the file, as written. The whole thing — 64 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Slack Token Extractor

Refresh expired Slack browser session tokens (xoxc/xoxd) used by Slack MCP server.

System requirements

Need system Chrome/Chromium binary — CHROME_PATH must set in .env (e.g. CHROME_PATH=/usr/bin/google-chrome-stable). Playwright bundled Chromium never used — services fingerprint as bot traffic.

On headless servers, setup_slack_session also need VNC stack for interactive login:

apt install xvfb x11vnc novnc

Plugin check missing deps at startup, log warnings.

How it works

Use Playwright persistent browser contexts — after one manual login (human handle CAPTCHA/magic-link), later token extractions run headless using saved session.

First-time setup (requires human)

Before tokens auto-refresh, human must log in once:

setup_slack_session(workspace_name="acme")

Open visible Chromium window. Human complete Slack login flow (CAPTCHA, magic link, SSO — whatever Slack require). Session saved for future headless use.

On headless server (no X display), tool auto-start virtual display with noVNC web access on port 6080. Before calling setup_slack_session, tell human open http://<server>:6080/vnc.html?autoconnect=true in browser so can interact with login page.

Hardware security keys (YubiKey, FIDO2): noVNC cannot forward WebAuthn challenges — key must physically connect to machine running browser. If Slack login need hardware key, run setup_slack_session on local machine with key attached, then rsync profile to server:

rsync -az data/playwright-profiles/acme/ server:/path/to/pynchy/data/playwright-profiles/acme/

Refreshing tokens

Once session set up, tokens refresh headless:

refresh_slack_tokens(
    workspace_name="acme",
    xoxc_var="SLACK_XOXC_ACME",
    xoxd_var="SLACK_XOXD_ACME",
)

Tool navigate to Slack using saved session, extract fresh tokens, write to .env. pynchy service auto-restart on .env changes.

Error handling

  • "Not logged in — persistent session expired" — Saved browser session expired. Human need run setup_slack_session again.
  • "Failed to extract xoxc/xoxd" — Browser reached Slack client but tokens not found. Slack may have changed storage format.
  • "Login not completed within Xs" — Human not finish manual login in time. Try again with longer timeout_seconds.

Read the full file on GitHub · 64 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 64 lines · 34 tokens per session scan A c206715f81d7

Subscribe to this mod's changes

slack-token-extractor is a skill published in the GitHub repository crypdick/pynchy (10 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 616 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-browser

Browse the web for any task — research topics, read articles, interact with web apps, fill forms, take screenshots, extract data, and test web pages. Use whenever a browser would be useful, not just when the user explicitly asks.

nanocoai/nanoclaw · 51 tokens

p5js

Production pipeline for interactive and generative visual art using p5.js. Creates browser-based sketches, generative art, data visualizations, interactive experiences, 3D scenes, audio-reactive visuals, and motion graphics — exported as HTML, PNG, GIF, MP4, or SVG. Covers: 2D/3D rendering, noise and particle systems…

moltis-org/moltis · 152 tokens

add-dial-tool

Give chosen NanoClaw agents a real phone number as a container tool — the dial CLI baked into the agent image plus OneCLI credential injection for api.getdial.ai, scoped per agent, so the agents you pick can send SMS, place AI voice calls, and receive verification codes from inside the sandbox. Independent of the Dial…

nanocoai/nanoclaw · 117 tokens

slack-agent-flow

Let an existing Slack agent create new agents that arrive as their own Slack bots — provisioned app, operator DM, and a shared three-way room, hot-started without a host restart.

nanocoai/nanoclaw · 43 tokens

add-ollama-tool

Add Ollama MCP server so the container agent can call local models and optionally manage the Ollama model library.

nanocoai/nanoclaw · 28 tokens

add-signal

Add Signal channel integration via signal-cli device-link. Native adapter — no Chat SDK bridge.

nanocoai/nanoclaw · 22 tokens