Slack Agent
Use when building Slack agents/bots with eve (Vercel's filesystem-first agent framework), @vercel/connect, or eve/channels/slack. Covers defineAgent/defineTool patterns, Vercel Connect credential brokering, Slack channel setup, testing requirements, and quality standards.
- Skill ID
- vercel-labs/slack-agent-skill/slack-agent
- Publisher
- vercel-labs
- Repository
- slack-agent-skill
- Installs
- 0
- Files
- 22
- Synced
- Sep 23, 2026
Open any RiverX project, open the Skills panel in the chat, and search for this identifier. The files are fetched from the source repository at install time.
vercel-labs/slack-agent-skill/slack-agentInstalls these files- .gitignore
- LICENSE
- README.md
- SKILL.md
- patterns/slack-patterns.md
- patterns/testing-patterns.md
- reference/agent-archetypes.md
- reference/env-vars.md
- reference/slack-setup.md
- reference/vercel-setup.md
- templates/eve/sample-tests/agent.test.ts
- templates/eve/sample-tests/tools.test.ts
- templates/eve/test-setup.ts
- templates/eve/vitest.config.ts
- wizard/1-project-setup.md
- wizard/1b-approve-plan.md
- wizard/2-create-slack-app.md
- wizard/3-configure-environment.md
- wizard/4-test-locally.md
- wizard/5-deploy-production.md
- wizard/6-setup-testing.md
- wizard/README.md
What this skill tells the agent
Slack Agent Development Skill
This skill builds Slack agents with eve — Vercel's filesystem-first framework for durable backend agents — using Vercel Connect for Slack credentials:
- eve (
evepackage) — agent runtime, tools, channels, durability - @vercel/connect — brokered short-lived Slack tokens; no bot tokens or signing secrets to manage
Skill Invocation Handling
When this skill is invoked via /slack-agent, check for arguments and route accordingly:
Command Arguments
| Argument | Action |
|---|---|
new | Run the setup wizard from Phase 1. Read ./wizard/1-project-setup.md and guide the user through creating a new Slack agent. |
configure | Start wizard at Phase 2 or 3 for existing projects |
deploy | Start wizard at Phase 5 for production deployment |
test | Start wizard at Phase 6 to set up testing |
| (no argument) | Auto-detect based on project state (see below) |
Auto-Detection (No Argument)
If invoked without arguments, detect the project state and route appropriately:
- No `package.json` with `eve` and no `agent/` directory → Treat as
new, start Phase 1 - Has eve project but no `agent/channels/slack.ts` → Start Phase 2 (Slack connector + channel)
- Has Slack channel but no `SLACK_CONNECTOR` configured → Start Phase 3
- Configured but not deployed → Start Phase 5 (the Slack surface only works on a deployment)
- Deployed but no tests → Start Phase 6
- Otherwise → Provide general assistance using this skill's patterns
Project Detection
Detect an eve project by either signal:
- `package.json` contains `"eve"` as a dependency
- An `agent/` directory with
instructions.mdand/oragent.tsexists
If neither is present, this is a new project: scaffold with npx eve@latest init (Node 24+ required).
Wizard Phases
The wizard is located in ./wizard/ with these phases:
1-project-setup.md- Understand purpose, generate custom implementation plan, scaffold withnpx eve@latest init1b-approve-plan.md- Present plan for user approval before scaffolding2-create-slack-app.md- Create the Slack connector with Vercel Connect and add the Slack channel3-configure-environment.md- Set up env vars (SLACK_CONNECTOR, model credentials)4-test-locally.md- Test agent logic locally with theeve devTUI (Slack surface tests happen after deploy)5-deploy-production.md- Deploy witheve deploy, verify the Slack surface6-setup-testing.md- Vitest configuration
IMPORTANT: For new projects, you MUST:
- Read
./wizard/1-project-setup.mdfirst - Ask the user what kind of agent they want to build
- Generate a custom implementation plan using
./reference/agent-archetypes.md - Present the plan for approval (Phase 1b) BEFORE scaffolding the project
- Only proceed to scaffold after the plan is approved
General Development Guidance
You are working on a Slack agent project built with eve. Follow these mandatory practices for all code changes.
Project Stack
- Framework: eve (filesystem-first agent framework; Node 24+)
- Slack channel:
eve/channels/slack+@vercel/connectfor credentials - AI: model routed through Vercel AI Gateway by default (
anthropic/claude-sonnet-5); tool schemas withzod - Durability: Workflow SDK under the hood (Vercel Workflows when deployed on Vercel)
- Linting: Biome
- Package Manager: pnpm (or npm —
npx eve@latest initinstalls with npm)
{
"engines": { "node": "24.x" },
"dependencies": {
"eve": "latest",
"ai": "latest",
"zod": "^3.x",
"@vercel/connect": "latest"
}
}Filesystem-First Layout
In eve, a file's location says what it does, and its path usually gives it its name. The whole agent lives under agent/:
agent/
├── instructions.md # Always-on system prompt
├── agent.ts # Runtime config (defineAgent): model, reasoning, compaction
├── tools/ # Tools — filename (snake_case ASCII) = tool name the model sees
│ ├── get_weather.ts
│ └── search_docs.ts
├── skills/ # Load-on-demand instructions (*.md with description frontmatter)
│ └── incident-triage.md
├── channels/
│ └── slack.ts # Slack channel — filename registers it at /eve/v1/slack
├── connections/ # MCP / OpenAPI connections (optional)
└── hooks/ # Subscribe to runtime stream events (optional)Even a two-file agent (instructions.md + agent.ts) gets file, shell, web, and delegation tools out of the box from the default harness. Full docs are bundled at node_modules/eve/docs/ once eve is installed — read them when a detail isn't covered here.
// agent/agent.ts
import { defineAgent } from "eve";
export default defineAgent({
model: "anthropic/claude-sonnet-5", // routed via Vercel AI Gateway
});Quality Standards (MANDATORY)
These quality requirements MUST be followed for every code change. There are no exceptions.
After EVERY File Modification
- Run linting immediately: ``
bash pnpm lint``
- If errors exist, run
pnpm lint --writefor auto-fixes - Manually fix remaining issues
- Re-run
pnpm lintto verify
- Check for corresponding test file:
- If you modified
foo.ts, check iffoo.test.tsexists - If no test file exists and the file exports functions, create one
Before Completing ANY Task
You MUST run all quality checks and fix any issues before marking a task complete:
# 1. TypeScript compilation - must pass
pnpm typecheck
# 2. Linting - must pass with no errors
pnpm lint
# 3. Tests - all tests must pass
pnpm testDo NOT complete a task if any of these fail. Fix the issues first.
Unit Tests Required
For ANY code change, you MUST write or update unit tests.
- Location: Co-located
*.test.tsfiles (e.g.agent/tools/get_weather.test.ts) - Framework: Vitest
- Coverage: All exported functions and every tool's
execute()(including error paths) must have tests
Example test structure:
import { describe, it, expect, vi } from 'vitest';
import { myFunction } from './my-module';
describe('myFunction', () => {
it('should handle normal input', () => {
expect(myFunction('input')).toBe('expected');
});
it('should handle edge cases', () => {
expect(myFunction('')).toBe('default');
});
});E2E Tests for User-Facing Changes
If you modify:
- Dispatch hooks (
onAppMention,onDirectMessage,onInteraction) - Custom channel event handlers
- Tools the agent calls in response to Slack messages
- Delivery behavior (what gets posted to Slack)
You MUST add or update tests that verify the full flow. Remember: the Slack surface itself cannot be exercised locally (see Gotchas), so E2E coverage means unit/integration tests around your handlers plus a post-deploy smoke test.
Bot Setup Patterns (CRITICAL)
Slack Channel (agent/channels/slack.ts)
The Slack channel is a single file. Its filename registers the slack channel, served at `/eve/v1/slack` — this is the canonical trigger path everywhere in this skill.
// agent/channels/slack.ts
import { connectSlackCredentials } from "@vercel/connect/eve";
import { slackChannel } from "eve/channels/slack";
export default slackChannel({
credentials: connectSlackCredentials(process.env.SLACK_CONNECTOR!),
});connectSlackCredentials(connectorUid) returns { botToken, webhookVerifier }:
- botToken — resolved at runtime via Vercel Connect as a short-lived, app-scoped token; Connect handles rotation and multi-workspace tenancy
- webhookVerifier — confirms each forwarded event genuinely came from Connect (replaces Slack's native signature check)
More from vercel-labs
Use this skill in a project
Open any RiverX project, search the Skills panel for vercel-labs/slack-agent-skill/slack-agent, and install it in one click.
