{"_id":"@asafrose/agent-slack","_rev":"4-d774bf749f5a8c0c421348b91d500c8b","name":"@asafrose/agent-slack","dist-tags":{"latest":"0.3.4"},"versions":{"0.2.0":{"name":"@asafrose/agent-slack","version":"0.2.0","keywords":["slack","cli","mcp","agent","claude","automation"],"author":{"name":"Asaf Rosentswaig"},"license":"MIT","_id":"@asafrose/agent-slack@0.2.0","maintainers":[{"name":"asafrosentswaig","email":"asafr1993@gmail.com"}],"homepage":"https://github.com/Asafrose/agent-slack#readme","bugs":{"url":"https://github.com/Asafrose/agent-slack/issues"},"bin":{"agent-slack":"bin/agent-slack.ts"},"dist":{"shasum":"9ff5985f9817c1f52949faea2122225cf52df46b","tarball":"https://registry.npmjs.org/@asafrose/agent-slack/-/agent-slack-0.2.0.tgz","fileCount":28,"integrity":"sha512-EMPj6BeSuZfRomA5rfRtGT8meX2cSB9/KXwZBqr0Yik3pywI26i2/7SjGNbA/5qc6mn5UTarJuSsROqaZHwwCQ==","signatures":[{"sig":"MEUCIHGHJy8fDdXXDBUd27/Aunn2Xlir9p8Ft0sxtV7W5u75AiEAzOFASWWJOWBbOAWr3YYmoc8PQngcbNg9Fw+fA8TnjF0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":80584},"type":"module","gitHead":"aab476d71d163bb409d9c19f5115130a82e62888","scripts":{"lint":"eslint .","test":"bun test","format":"prettier --write .","lint:fix":"eslint . --fix","format:check":"prettier --check ."},"_npmUser":{"name":"asafrosentswaig","email":"asafr1993@gmail.com"},"repository":{"url":"git+https://github.com/Asafrose/agent-slack.git","type":"git"},"_npmVersion":"11.4.1","description":"Slack CLI tool for AI agents - replaces MCP Slack tools with a token-efficient CLI","directories":{},"_nodeVersion":"22.13.1","dependencies":{"commander":"^12.0.0","@slack/web-api":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","prettier":"^3.8.1","bun-types":"latest","@eslint/js":"^10.0.1","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5"},"_npmOperationalInternal":{"tmp":"tmp/agent-slack_0.2.0_1771516048933_0.5527792273094254","host":"s3://npm-registry-packages-npm-production"}},"0.3.2":{"name":"@asafrose/agent-slack","version":"0.3.2","keywords":["slack","cli","mcp","agent","claude","automation"],"author":{"name":"Asaf Rosentswaig"},"license":"MIT","_id":"@asafrose/agent-slack@0.3.2","maintainers":[{"name":"asafrosentswaig","email":"asafr1993@gmail.com"}],"homepage":"https://github.com/Asafrose/agent-slack#readme","bugs":{"url":"https://github.com/Asafrose/agent-slack/issues"},"bin":{"agent-slack":"bin/agent-slack.ts"},"dist":{"shasum":"ddb3d71004b5ee74b873167be3dd00ded7cd8cf4","tarball":"https://registry.npmjs.org/@asafrose/agent-slack/-/agent-slack-0.3.2.tgz","fileCount":28,"integrity":"sha512-3l90j/dDgaq0SO366bPoA/syG8Sa1Bni+rYvf2xNSF7vZckjU0vfGKKdDpVAyTjbOGaWBu3MD1iDohDCbgnNHQ==","signatures":[{"sig":"MEUCIEaNADleT7UlZMhN69bOrG6XdeKUhXdPziZynRdR8eEaAiEApcU8NtiPu+zA6yjBRFraUBo0xYHk1i2b3H2COY5kKOs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@asafrose%2fagent-slack@0.3.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":81516},"type":"module","gitHead":"60b85cee36227e821501346ff53f0e2775a7b3b8","scripts":{"lint":"eslint .","test":"bun test","format":"prettier --write .","lint:fix":"eslint . --fix","format:check":"prettier --check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c39da220-899b-41ce-9e65-5ef85bf3031e"}},"repository":{"url":"git+https://github.com/Asafrose/agent-slack.git","type":"git"},"_npmVersion":"11.6.2","description":"Slack CLI tool for AI agents - replaces MCP Slack tools with a token-efficient CLI","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^12.0.0","@slack/web-api":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","prettier":"^3.8.1","bun-types":"latest","@eslint/js":"^10.0.1","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5"},"_npmOperationalInternal":{"tmp":"tmp/agent-slack_0.3.2_1771683684125_0.8859654650539606","host":"s3://npm-registry-packages-npm-production"}},"0.3.3":{"name":"@asafrose/agent-slack","version":"0.3.3","keywords":["slack","cli","mcp","agent","claude","automation"],"author":{"name":"Asaf Rosentswaig"},"license":"MIT","_id":"@asafrose/agent-slack@0.3.3","maintainers":[{"name":"asafrosentswaig","email":"asafr1993@gmail.com"}],"homepage":"https://github.com/Asafrose/agent-slack#readme","bugs":{"url":"https://github.com/Asafrose/agent-slack/issues"},"bin":{"agent-slack":"bin/agent-slack.ts"},"dist":{"shasum":"666cfda243c02c9cb660f179e57b031827198986","tarball":"https://registry.npmjs.org/@asafrose/agent-slack/-/agent-slack-0.3.3.tgz","fileCount":28,"integrity":"sha512-kzM2TKrhKSkup0gHdONsVfjzqbgOClKs6XGa5bDubjvqvUC3mFlFG19/FMrqUdo60I9puHp5R6ltpRTF/KDiLw==","signatures":[{"sig":"MEUCIQCMIJ1j9NIOnvzwS2B9no3+HRu4h8ozdW/XTYjHnrowuwIgVVMlXwSTfXL7Wg5l+/bSc455jYzIbgZz1vWgoHJCAWU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@asafrose%2fagent-slack@0.3.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":81517},"type":"module","gitHead":"e2e273c762176634a93b6cac636f2d619a987c97","scripts":{"lint":"eslint .","test":"bun test","format":"prettier --write .","lint:fix":"eslint . --fix","format:check":"prettier --check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c39da220-899b-41ce-9e65-5ef85bf3031e"}},"repository":{"url":"git+https://github.com/Asafrose/agent-slack.git","type":"git"},"_npmVersion":"11.6.2","description":"Slack CLI tool for AI agents - replaces MCP Slack tools with a token-efficient CLI","directories":{},"_nodeVersion":"24.13.0","dependencies":{"commander":"^12.0.0","@slack/web-api":"^7.0.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^10.0.0","prettier":"^3.8.1","bun-types":"latest","@eslint/js":"^10.0.1","typescript-eslint":"^8.56.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5"},"_npmOperationalInternal":{"tmp":"tmp/agent-slack_0.3.3_1771684416087_0.026202639343057887","host":"s3://npm-registry-packages-npm-production"}},"0.3.4":{"name":"@asafrose/agent-slack","version":"0.3.4","description":"Slack CLI tool for AI agents - replaces MCP Slack tools with a token-efficient CLI","type":"module","bin":{"agent-slack":"bin/agent-slack.ts"},"repository":{"type":"git","url":"git+https://github.com/Asafrose/agent-slack.git"},"keywords":["slack","cli","mcp","agent","claude","automation"],"author":{"name":"Asaf Rosentswaig"},"license":"MIT","scripts":{"test":"bun test","lint":"eslint .","lint:fix":"eslint . --fix","format":"prettier --write .","format:check":"prettier --check ."},"dependencies":{"@slack/web-api":"^7.0.0","commander":"^12.0.0"},"devDependencies":{"@eslint/js":"^10.0.1","bun-types":"latest","eslint":"^10.0.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.5","prettier":"^3.8.1","typescript-eslint":"^8.56.0"},"gitHead":"8fa9aa83e3ed449afd18040ceb25a771e96ba094","_id":"@asafrose/agent-slack@0.3.4","bugs":{"url":"https://github.com/Asafrose/agent-slack/issues"},"homepage":"https://github.com/Asafrose/agent-slack#readme","_nodeVersion":"24.13.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-QBLz5MukbJ3i4iGlHBC8HFKm1rw7dYFed+rFxjUbVE4UZj8yHjm1kzKjG6EOcHDpubqd6WjGyo0HGcmWvNvKDg==","shasum":"301258e05ff2cd05b47dc1bce04a802536d8777c","tarball":"https://registry.npmjs.org/@asafrose/agent-slack/-/agent-slack-0.3.4.tgz","fileCount":28,"unpackedSize":82325,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@asafrose%2fagent-slack@0.3.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDWfuli8VoGJMC/1GiYrb3hzAhTqaO/1h6Xgqt5Q1QmzAIgTMFrAlLf+ubwxqdNvuWT1LwUpqxVtILheT/dUiopT+E="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:c39da220-899b-41ce-9e65-5ef85bf3031e"}},"directories":{},"maintainers":[{"name":"asafrosentswaig","email":"asafr1993@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/agent-slack_0.3.4_1771747438077_0.032793059435894056"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-19T15:47:28.828Z","modified":"2026-02-22T08:03:58.635Z","0.2.0":"2026-02-19T15:47:29.076Z","0.3.2":"2026-02-21T14:21:24.315Z","0.3.3":"2026-02-21T14:33:36.223Z","0.3.4":"2026-02-22T08:03:58.241Z"},"bugs":{"url":"https://github.com/Asafrose/agent-slack/issues"},"author":{"name":"Asaf Rosentswaig"},"license":"MIT","homepage":"https://github.com/Asafrose/agent-slack#readme","keywords":["slack","cli","mcp","agent","claude","automation"],"repository":{"type":"git","url":"git+https://github.com/Asafrose/agent-slack.git"},"description":"Slack CLI tool for AI agents - replaces MCP Slack tools with a token-efficient CLI","maintainers":[{"name":"asafrosentswaig","email":"asafr1993@gmail.com"}],"readme":"# agent-slack\n\nA Bun CLI + Claude Code plugin that replaces the 12 Slack MCP server tools with a single, token-efficient CLI. Instead of spending ~18K tokens per session on MCP tool descriptions, Claude loads a lightweight skill file and calls `agent-slack` via Bash.\n\n## Prerequisites\n\n- [Bun](https://bun.sh/) v1.0+\n- A Slack workspace you can authorize against\n\n## Authentication\n\n```bash\nagent-slack login\n```\n\nThis opens your browser for Slack OAuth authorization. Click \"Allow\" and the token is saved to `~/.agent-slack/config.json`.\n\n```bash\nagent-slack read-user-profile   # verify it works\nagent-slack logout               # remove stored token\n```\n\n## Installation\n\n### Homebrew (recommended)\n\n```bash\nbrew tap asafrose/agent-slack\nbrew install agent-slack\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/Asafrose/agent-slack.git\ncd agent-slack\nbun install\nbun link\n```\n\n## Usage\n\n```bash\nagent-slack <command> [flags]\nagent-slack --help\nagent-slack <command> --help\n```\n\n### Commands\n\n| Command             | Description                           | Replaces MCP Tool                 |\n| ------------------- | ------------------------------------- | --------------------------------- |\n| `send-message`      | Send a message to a channel           | `slack_send_message`              |\n| `schedule-message`  | Schedule a message for later          | `slack_schedule_message`          |\n| `draft-message`     | Create a draft message                | `slack_send_message_draft`        |\n| `search-channels`   | Find channels by name/purpose         | `slack_search_channels`           |\n| `read-channel`      | Read channel message history          | `slack_read_channel`              |\n| `search-messages`   | Search public channel messages        | `slack_search_public`             |\n| `read-thread`       | Read a thread's messages              | `slack_read_thread`               |\n| `search-users`      | Find users by name/email/title        | `slack_search_users`              |\n| `read-user-profile` | Get a user's profile                  | `slack_read_user_profile`         |\n| `search-all`        | Search all channels incl. private/DMs | `slack_search_public_and_private` |\n| `create-canvas`     | Create a Canvas document              | `slack_create_canvas`             |\n| `read-canvas`       | Read a Canvas document                | `slack_read_canvas`               |\n| `login`             | Authenticate with Slack via OAuth     | —                                 |\n| `logout`            | Remove stored Slack token             | —                                 |\n\n### Output Formats\n\nEvery command supports three output modes:\n\n```bash\nagent-slack read-channel --channel C12345              # concise (default, token-efficient)\nagent-slack read-channel --channel C12345 --detailed   # verbose with all fields\nagent-slack read-channel --channel C12345 --json       # raw JSON, pipe to jq\n```\n\n### Message Content Input\n\nCommands that accept text (`send-message`, `schedule-message`, `draft-message`, `create-canvas`) support three input methods:\n\n```bash\n# Inline\nagent-slack send-message --channel C12345 --text \"Hello world\"\n\n# From file (recommended for complex content)\nagent-slack send-message --channel C12345 --text-file /tmp/message.md\n\n# From stdin\necho \"Hello world\" | agent-slack send-message --channel C12345\n```\n\nFor `create-canvas`, use `--content` / `--content-file` instead of `--text` / `--text-file`.\n\n### Examples\n\n```bash\n# Send a message\nagent-slack send-message --channel C12345 --text \"Deploy complete\"\n\n# Search for a channel, get its ID\nagent-slack search-channels --query \"engineering\" --json | jq -r '.channels[0].id'\n\n# Read last 20 messages from a channel\nagent-slack read-channel --channel C12345 --limit 20\n\n# Search messages with Slack search syntax\nagent-slack search-messages --query \"from:<@U12345> in:engineering bug after:2024-01-01\"\n\n# Read a thread\nagent-slack read-thread --channel C12345 --ts 1234567890.123456\n\n# Schedule a message\nagent-slack schedule-message --channel C12345 --text \"Reminder\" --post-at \"2025-03-01T09:00:00Z\"\n\n# Look up a user\nagent-slack read-user-profile --user U12345\n```\n\n## Using as a Claude Code Plugin\n\nThis project is a [Claude Code plugin](https://docs.anthropic.com/en/docs/claude-code). It includes a skill (`skills/slack/SKILL.md`) that teaches Claude how to use the CLI for all Slack operations.\n\n### Setup\n\nInstall the plugin from within Claude Code using the `/plugin` command:\n\n1. Add the marketplace (one-time):\n\n   ```\n   /plugin marketplace add Asafrose/agent-slack\n   ```\n\n2. Install the plugin:\n   ```\n   /plugin install agent-slack@agent-slack\n   ```\n\nYou can choose to install at **user** scope (default, applies to all projects) or **project** scope (applies to the current repository only).\n\nFor local development or testing, you can also load the plugin directly from a local directory:\n\n```bash\nclaude --plugin-dir /path/to/agent-slack\n```\n\nOnce loaded, Claude will automatically use `agent-slack` via Bash whenever Slack tasks arise — no MCP server needed.\n\n### How It Works\n\n- The **skill file** (`skills/slack/SKILL.md`) contains complete documentation of all 12 commands, flags, search syntax, output formats, and error codes\n- It declares `allowed-tools: Bash(agent-slack *)` so Claude can run the CLI without per-command approval\n- It's marked `user-invocable: false` — Claude auto-activates it when Slack tasks are detected\n- The **plugin manifest** (`.claude-plugin/plugin.json`) registers the plugin with Claude Code\n\n### Token Savings\n\nThe 12 MCP Slack tools consume ~18K tokens per session from their tool descriptions alone. This plugin replaces all of them with a single skill file that Claude loads on demand, dramatically reducing per-session token overhead.\n\n## Development\n\n### Running Tests\n\n```bash\nbun test              # all tests (unit + integration)\nbun test tests/unit   # unit tests only\nbun test tests/integration  # integration tests only\n```\n\n### Project Structure\n\n```\nagent-slack/\n├── .claude-plugin/plugin.json      # Claude Code plugin manifest\n├── skills/slack/SKILL.md           # Skill: teaches Claude to use the CLI\n├── bin/agent-slack.ts              # CLI entry point\n├── src/\n│   ├── cli.ts                      # Commander program, registers subcommands\n│   ├── client.ts                   # Slack WebClient factory (auth via config)\n│   ├── config.ts                   # Loads/saves ~/.agent-slack/config.json\n│   ├── constants.ts                # OAuth config (client ID, worker URL, scopes)\n│   ├── output.ts                   # Concise / detailed / JSON formatters\n│   ├── errors.ts                   # Slack API error handling\n│   ├── input.ts                    # Text input resolution (inline/file/stdin)\n│   ├── formatters/messages.ts      # Shared message formatting\n│   └── commands/                   # 14 subcommand implementations (incl. login/logout)\n├── worker/                         # Cloudflare Worker (OAuth token exchange proxy)\n│   ├── src/index.ts                # Worker entry point\n│   ├── wrangler.toml               # Worker config\n│   └── package.json\n├── tests/\n│   ├── unit/                       # Mocked unit tests per module\n│   ├── integration/cli.test.ts     # End-to-end CLI invocation tests\n│   └── helpers/mock-slack.ts       # Shared Slack API mock factory\n├── package.json\n└── tsconfig.json\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}