agentleFS
VercelKnown publishervercel-labs/chat-sdk-form-bot/AGENTS.md

chat-sdk-form-bot

AGENTS.md3 starsChanged 8 months agoApache-2.0View on GitHub

A Slack bot template that triages form submissions. External services POST JSON to /api/form, the bot posts an interactive card to Slack, and reviewers can forward via email or mark as spam. Use these skills when working on this project:

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository7 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use these skills when working on this project:

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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
AGENTS.md

Chat SDK Form Bot

A Slack bot template that triages form submissions. External services POST JSON to /api/form, the bot posts an interactive card to Slack, and reviewers can forward via email or mark as spam.

Stack

  • Chat SDK (chat + @chat-adapter/slack + @chat-adapter/state-redis) — Slack bot framework
  • Hono — HTTP server and routing
  • Resend — Email forwarding
  • Redis — Submission storage (7-day TTL)
  • Vitest — Testing
  • Ultracite — Linting and formatting

Project Structure

src/
  index.ts            Hono app with HTTP routes (POST /api/form, POST /api/webhooks/slack)
  bot.ts              Chat SDK bot instance and action handlers
  lib/
    cards.ts          Card and modal builders (Chat SDK JSX components)
    email.ts          Resend email forwarding
    endpoint.ts       Optional webhook endpoint forwarding
    submissions.ts    Redis CRUD for form submissions
    local.ts          Local dev server entrypoint (@hono/node-server)
tests/
  *.test.ts           Unit tests

Commands

pnpm dev              # Start dev server (tsx watch, port 3000)
pnpm build            # Compile TypeScript to dist/
pnpm test             # Run tests with coverage
pnpm type-check       # Type-check without emitting
pnpm check            # Lint and format check (ultracite)
pnpm fix              # Auto-fix lint and format issues
pnpm validate         # Run check + type-check + test

Skills

Use these skills when working on this project:

  • chat-sdk — Chat SDK API, event handlers, cards, modals, streaming, and adapters
  • slack-agent — Slack-specific development patterns, testing, and deployment
  • hono — Hono routing, middleware, validation, and Vercel deployment

Key Patterns

  • The Hono app (src/index.ts) exports a default fetch handler for Vercel deployment. src/lib/local.ts wraps it with @hono/node-server for local dev only.
  • Chat SDK card components use function calls (Card(), Button(), etc.), not JSX — the tsconfig does not set jsxImportSource.
  • The bot uses bot.onAction() and bot.onModalSubmit() for interactivity, not event subscriptions.
  • Slack webhook route is at /api/webhooks/slack via bot.webhooks.slack.

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.