slack-sync

slack-sync is a command for coding agents from Elnora-AI/elnora-slack. It costs 22 tokens per session (608 once invoked), scanned A, original, Apache-2.0.

A command that refreshes a local reference cache of Slack users and channels using current data from Slack.

In plain words
What is it for?
Checking authentication, fetching current users and public channels, comparing the results with the existing cache, and updating the generated reference files.
Why use it?
It lets other Slack tasks resolve names to IDs locally, avoiding repeated requests to the Slack service.

Command

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the slack-workspace plugin — 2 skills, 1 command, 1 hook shipped together

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 commands/elnora-ai/elnora-slack/slack-sync
Clone the repo
git clone --depth 1 https://github.com/Elnora-AI/elnora-slack

Or install slack-workspace, the plugin that ships this one along with the rest of its 2 skills, 1 command, 1 hook.

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-sync

README.md
[![agentmods](https://agentmods.dev/badge/commands/elnora-ai/elnora-slack/slack-sync.svg)](https://agentmods.dev/commands/elnora-ai/elnora-slack/slack-sync)
Your own site
<a href="https://agentmods.dev/commands/elnora-ai/elnora-slack/slack-sync"><img src="https://agentmods.dev/badge/commands/elnora-ai/elnora-slack/slack-sync.svg" alt="Measured on agentmods" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 608 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.00022 $0.00608
Opus 5 $0.00011 $0.00304
Sonnet 5 $0.00004 $0.00122
Haiku 4.5 $0.00002 $0.00061

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

Security

Grade A, and why

slack-sync 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 5d 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.

commands/slack-sync.md · 87 lines

How it starts

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

Slack Workspace Sync

Regenerate the workspace reference cache from live Slack data. The cache lets the slack-messages skill resolve names to IDs without an API round-trip.

Prerequisites

The elnora-slack CLI must be on your PATH (npm install -g @elnora-ai/slack) and a bot token must be configured (elnora-slack auth test should succeed). If not, see INSTALL_FOR_AGENTS.md.

Reference cache location

Write the generated files to the first of these that resolves:

  1. $SLACK_REFERENCES_DIR
  2. ${CLAUDE_PLUGIN_ROOT}/references/

The committed *.template.md files are examples only — never overwrite them. Write workspace-users.md and workspace-channels.md (gitignored) alongside.

Step 1: Fetch live data (2 parallel Bash calls)

elnora-slack users list --compact
elnora-slack conversations list --types public_channel --compact

Step 2: Read the current cache

Read both in parallel (fall back to the .template.md for the expected shape if the generated file doesn't exist yet):

  • workspace-users.md
  • workspace-channels.md

Step 3: Diff and update

3a. workspace-users.md — team members

From the users response, keep real humans only:

  • Exclude bots (is_bot: true)
  • Exclude Slackbot (id: USLACKBOT)
  • Exclude deleted/deactivated users (deleted: true, or name starting with deactivateduser)

Build the table with: ID, username, real_name, email (from profile). Keep a Quick Lookup section mapping first name → ID and username — this is what the agent uses for fast resolution.

3b. workspace-channels.md — channels

From the conversations response, drop archived channels. Split into:

  • Active Channels — internal channels (sorted by name)
  • External Channels — channels whose name starts with ext-
  • Routing — map topics to channel names for quick agent routing

Update the *Generated: YYYY-MM-DD* line.

Step 4: Report changes

## Slack Sync Complete

**Updated:** YYYY-MM-DD

### Changes detected
- X new users (names)
- Y users removed (names)
- Z new channels (names)
- N channels archived (names)

### Files updated
- [ ] workspace-users.md
- [ ] workspace-channels.md

Read the full file on GitHub · 87 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. 5d ago First seen · 87 lines · 22 tokens per session scan A ebe2d36d2b7e

Subscribe to this mod's changes

slack-sync is a command published in the GitHub repository Elnora-AI/elnora-slack (1 stars, last pushed 3d ago), licensed Apache-2.0. It adds 22 tokens to every session and 608 once invoked, about $0.0001 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.