[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B36FYYH6E9SWY4V3TF4RSJ":3,"skill-same:01M7B36FYYH6E9SWY4V3TF4RSJ":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7B36FYYH6E9SWY4V3TF4RSJ","slack-bot",null,"Slack bot integration patterns using the Chat SDK. Use when working with Slack webhook handling, message processing, slash commands, OAuth installation, identity verification, or markdown-to-Slack conversion. Triggers on files in apps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F.","gethamster\u002Fskills","gethamster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F215697643?v=4","01M7B2R6PGB3SDZZ71E0WE2S74","Hamster","01M7B2R6Q21HWJRXZZWB78BNDG",4,"MIT","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fslack-bot\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: slack-bot\ndescription: \"Slack bot integration patterns using the Chat SDK. Use when working with Slack webhook handling, message processing, slash commands, OAuth installation, identity verification, or markdown-to-Slack conversion. Triggers on files in apps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F.\"\nversion: \"1.1.0\"\n---\n\n# Slack Bot Integration\n\nSlack bot module built on the [Chat SDK](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fchat) (`chat` + `@chat-adapter\u002Fslack`). Handles DMs, slash commands, OAuth installation, and identity verification.\n\n## Quick Reference\n\n| Task | File | Notes |\n| --- | --- | --- |\n| Add a sub-command | `slack-slash-commands.service.ts` | Add to `SubCommand` type + `getSubCommandMap()` |\n| Change message processing | `slack-chat-handler.service.ts` | `handleMessage()` → `processIncomingText()` is the shared flow |\n| Modify webhook behavior | `slack-webhook.controller.ts` | Single `POST \u002Fwebhooks\u002Fslack\u002Fevents` endpoint |\n| Update OAuth flow | `slack-bot-install.controller.ts` | `GET \u002Fwebhooks\u002Fslack\u002Finstall\u002Fcallback`; `stateParam` typed as `unknown` with runtime string guard |\n| Start OAuth install flow | `slack-bot-install.controller.ts` | `GET \u002Fwebhooks\u002Fslack\u002Finstall` redirects to Slack authorize |\n| Change account linking | `slack-bot-verify.controller.ts` | `POST \u002Fv1\u002Fslack-bot\u002Fverify` (authenticated) |\n| Verify page (frontend) | `apps\u002Fweb\u002Fapp\u002Fauth\u002Fslack\u002Fverify\u002F` | Scoped to installation's account via cookie hint |\n| Modify verification logic | `slack-bot-verify.service.ts` | Token redemption + Slack confirmation message |\n| Feature-flag the connector | `feature-flags.config.ts` | `enableConnectorSlackBot` \u002F `NEXT_PUBLIC_ENABLE_CONNECTOR_SLACK_BOT` |\n| Edit markdown conversion | `utils\u002Fmarkdown-to-slack.ts` | Preserve code blocks first, then transform |\n| Manage identities\u002Fthreads | `external-bot.repository.ts` | Shared with `external-bot` module |\n\n## Architecture\n\n```\napps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F\n├── chat-bot.provider.ts              # Chat SDK singleton (SlackAdapter + Redis state)\n├── slack-webhook.controller.ts       # Webhook: POST \u002Fwebhooks\u002Fslack\u002Fevents\n├── slack-webhook.service.ts          # Webhook validation, payload size limits, signature verification\n├── slack-chat-handler.service.ts     # SDK event handlers, message + file attachment processing\n├── slack-slash-commands.service.ts   # Slash command registry\n├── linear-feedback.service.ts        # Submits feedback as Linear issues via @kit\u002Fshared\u002Flinear-feedback\n├── slack-bot-install.controller.ts   # OAuth install callback\n├── slack-bot-verify.controller.ts    # Account linking verification\n├── slack-bot-verify.service.ts       # Token redemption + Slack confirmation\n├── slack-bot.module.ts\n├── dto\u002F\n│   ├── slack-verify.dto.ts\n│   └── slack-verify-response.dto.ts\n└── utils\u002F\n    ├── markdown-to-slack.ts          # Markdown -> Slack mrkdwn\n    ├── progressive-status.ts         # Progressive status messages during AI processing (timer chain + cleanup)\n    ├── slack-api.ts                  # Slack API helpers (postMessage, postEphemeral, update, delete, reactions, token resolution)\n    ├── slack-thread-context.ts       # Thread context fetch + synthetic attachment builder\n    └── to-web-request.ts             # Express -> Web API Request\n\napps\u002Fai\u002Fsrc\u002Fmodules\u002Fexternal-bot\u002F    # Shared identity\u002Finstallation layer\n├── external-bot.repository.ts           # DB: identities, threads, installations + bot token fallback\n├── external-bot.service.ts              # Business logic: verification, thread orchestration, polling\n└── external-bot.module.ts\n```\n\n**Dependencies**: `ExternalBotModule` (identity\u002Fthreads), `AiAgentModule` (AI processing), `DocumentsModule` (file extraction via `ChatFileProcessorService`), `ConfigModule`, `RedisModule`.\n\n## Feature Flag\n\nThe Slack Bot connector tile in the web UI is gated behind:\n\n```\nNEXT_PUBLIC_ENABLE_CONNECTOR_SLACK_BOT=true|false\n```\n\nSchema key: `enableConnectorSlackBot` in `apps\u002Fweb\u002Fconfig\u002Ffeature-flags.config.ts`. When disabled, the tile is hidden from the context-settings service grid.\n\n**Env vars**: `SLACK_BOT_SIGNING_SECRET`, `SLACK_BOT_CLIENT_ID`, `SLACK_BOT_CLIENT_SECRET`, `SLACK_BOT_ENCRYPTION_KEY` (encrypts OAuth state in Redis). All required per environment — each env (local, tux, prod) has its own Slack bot app.\n\n## Token Storage: Redis + DB Fallback\n\nBot OAuth tokens live in **two places** — Redis (primary, fast) and the database (durable fallback). This means a Redis flush doesn't force workspaces to reinstall the Slack app.\n\n- **On OAuth install**: The install flow is kicked off from the team context-settings \"Add Connection\" page via an install dialog. It hits `GET \u002Fwebhooks\u002Fslack\u002Finstall`, which redirects to Slack's authorize URL with a `state` param encoding the installing `accountId`. On callback, the SDK stores the encrypted token in Redis. The install callback stores the token in Supabase Vault via `store_external_bot_token()` and saves the vault reference in `external_bot_installations.bot_token_secret_id`. If `accountId` was present in the state, it is bound to the installation (`account_id` column) via `bindInstallationAccount()` (first-writer-wins: only sets when NULL). **Note**: `verifyAndDecodeState` accepts `unknown` and rejects non-string values (e.g. array from repeated query params) before calling string methods.\n- **On token resolution**: `resolveSlackBotToken()` tries Redis first. On miss (flush, key corruption, encryption key rotation), it reads from the Vault via `get_external_bot_token()`, returns the token, and re-syncs it to Redis so subsequent requests are fast again. Vault persistence ensures that the user doesn't have to reinstall the app into the workspace on cache miss.\n- **On webhook**: `SlackWebhookController.ensureInstallation()` calls `resolveSlackBotToken()` before the SDK processes the request, transparently restoring Redis from DB if needed\n- **On Redis flush**: Token is restored from DB automatically — no user action required\n\n## Threading Model\n\nIn Slack's API, `ts` (timestamp) is the unique identifier for a message — a string like `\"1234567890.123456\"` that doubles as both ID and timestamp. Replying to a thread means passing the parent message's `ts` as `thread_ts`.\n\n**Variable naming in `slack-chat-handler.service.ts`**:\n\n- `incomingMessageTs` — the ts of the message the user just sent (Slack's `ts`)\n- `threadTs` — the thread root ts, only present for replies (Slack's `thread_ts`)\n- `threadAnchorTs` — resolved thread identifier: `threadTs ?? incomingMessageTs`\n\nEach Slack thread (`channel:thread_ts`) maps 1:1 to a Hamster thread. The `platformChannelId` stored in `external_bot_threads` encodes this as `{channelId}:{threadAnchorTs}`.\n\n### DMs\n\n- **Top-level DM**: Each new message starts a brand-new Hamster thread. The bot replies as a Slack thread reply (using `postSlackThreadReply` with the message's own `ts` as `thread_ts`), which anchors the conversation. The handler does NOT call `thread.subscribe()` — subscribing at the channel level would capture all future DMs instead of letting each start a new thread.\n- **DM thread reply**: Continues the existing Hamster thread mapped to that Slack thread. Uses `thread.subscribe()` so follow-ups route to `onSubscribedMessage`. Replies via SDK `thread.post()`.\n\n### Channels\n\n- **Top-level @mention**: Starts a brand-new Hamster thread, same as a top-level DM. The bot replies as a Slack thread reply (using `postSlackThreadReply` with the message's own `ts` as `thread_ts`), anchoring a new thread. Does NOT call `thread.subscribe()` — subscribing at the channel level would capture all future @mentions instead of letting each start a new thread. The SDK's `onNewMention` handler only fires on actual @mentions, so regular channel messages are ignored.\n- **Thread @mention**: Processes normally. Thread context (prior messages) is fetched via `fetchSlackThreadContext` and attached as a synthetic `slack-thread-context.md` file so the AI agent has full conversation context.\n\n## Message Processing Flow\n\n`onNewMention` and `onSubscribedMessage` both delegate to `handleMessage` → `processIncomingText`. The SDK treats DMs as mentions, so `onNewMention` is the correct handler for both DMs and channel @mentions:\n\n```\n1. Strip bot mention from raw event text (\u003C@UBOTID> → empty) to get actual user content\n2. Early exit: no text + no attachments → silent return\n3. Parse Slack IDs (channel via decodeThreadId, teamId from raw event)\n4. Reject file-only messages (no text after mention stripping) → ephemeral hint to user\n5. Identity resolution (findIdentity)\n   ├── Not found → check installation has account binding\n   │   ├── No installation or no account_id → silent rejection (fail-closed), stop\n   │   └── Has account binding → send verification link with account_id hint via ephemeral message\n   └── Found → continue\n6. Subscribe to thread (skipped for top-level messages)\n7. Determine platformChannelId = {channelId}:{threadAnchorTs}\n8. Get or create Hamster thread (aiClient for auth, human userId as created_by)\n9. Download + extract file attachments and fetch thread context\n10. Create user message (human userId as created_by, source: 'slack', chat_state: 'getting_started')\n11. Add hourglass reaction to user's message (fire-and-forget processing indicator)\n12. Start progressive status messages (fire-and-forget timer chain, posts + updates a threaded message)\n13. Process AI inline via aiAgentService.processThreadMessage()\n14. Deliver replies:\n    ├── Top-level message (DM or channel @mention) → postSlackThreadReply (anchors Slack thread)\n    └── Thread reply → thread.post() via SDK\n15. Cancel status messages + delete status message (in finally block)\n16. Remove hourglass reaction (fire-and-forget, in finally block — removed on both success and failure)\n```\n\n### File Attachments\n\nFile attachments are downloaded from Slack, extracted via `ChatFileProcessorService`, and passed to the AI as `syntheticAttachments` in message metadata.\n\n**Flow**: `processSlackAttachments` → `getEligibleAttachments` → `processInBatches` (bounded concurrency) → `processOneAttachment` (download + extract).\n\n**Download strategies** (tried in order):\n\n1. SDK `attachment.fetchData()` — primary\n2. Slack `files.info` API — fallback (inline `content` for text, `url_private_download` for binary)\n\n**Size enforcement** (three layers):\n\n1. `getEligibleAttachments` — pre-filters by `attachment.size` metadata before downloading\n2. `downloadFromUrl` — checks `Content-Length` header before reading the response body\n3. `downloadFromUrl` — checks `arrayBuffer.byteLength` after download (catches missing\u002Finaccurate `Content-Length`)\n\n**Limits**: `MAX_FILE_SIZE_BYTES` (50 MB per file), `MAX_ATTACHMENTS_PER_MESSAGE` (8 per message), `MAX_CONCURRENT_DOWNLOADS` (3 parallel).\n\n**Webhook payload limit**: 1 MB (`MAX_PAYLOAD_BYTES`) for all events. File content is downloaded separately via `fetchData()` \u002F `files.info` — the webhook payload only contains JSON metadata.\n\n**Oversized file feedback**: When files exceed the size limit, an ephemeral message lists the skipped file names so the user knows why they were dropped.\n\n### Processing Indicator\n\nTwo fire-and-forget feedback mechanisms run during AI processing:\n\n1. **Hourglass reaction** (`PROCESSING_REACTION` in `slack-chat-handler.service.ts`) — added at start, removed in `finally` block. Requires `reactions:write` scope.\n2. **Progressive status messages** (`utils\u002Fprogressive-status.ts`) — threaded reply posted at 1s, updated in-place at 10s\u002F20s with randomly selected messages (5 per stage), then **deleted** on completion.\n\n```\n0s → hourglass reaction added\n1s → status message posted (randomly picked from bank)\n10s\u002F20s → status message updated in place\nAI responds → status message deleted, reaction removed\n```\n\n### RLS Ownership Pattern\n\nAll DB writes use the **AI user client** (`aiClient` where `auth.uid() = aiUserId`) for authentication. However, `created_by` is set to the **human user's** ID (the actual message author). This means `created_by ≠ auth.uid()` — the repository intentionally avoids `INSERT...RETURNING` (no `.select()` after insert) because the RLS creator-shortcut SELECT policy would not match.\n\nThe human user is tracked in thread metadata (`human_user_id`). The AI client passes `is_thread_owner` checks for participant and thread_item INSERT operations.\n\n## Key Patterns\n\n### Express to Web Request\n\nThe Chat SDK expects Web API `Request` objects:\n\n```typescript\nconst webRequest = toWebRequest(req, { includeBody: true });\nconst sdkResponse = await this.bot.webhooks.slack(webRequest, {\n  waitUntil: (task) => backgroundTasks.push(task),\n});\n```\n\n### Sending Messages Outside Webhook Context\n\nUse the shared helpers in `utils\u002Fslack-api.ts`. They handle the HTTP call, response parsing, and error formatting.\n\n| Helper | Slack API | Visibility | Use case |\n| --- | --- | --- | --- |\n| `postSlackMessage` | `chat.postMessage` | Everyone in the channel | Public notifications |\n| `postSlackThreadReply` | `chat.postMessage` (with `thread_ts`) | Everyone in the thread | AI replies to top-level messages — DMs and channel @mentions (anchors a Slack thread) |\n| `postSlackEphemeral` | `chat.postEphemeral` | Only the target user | Verification links, confirmations, errors |\n| `updateSlackMessage` | `chat.update` | Everyone in the channel | Edit a message in place (best-effort, swallows `message_not_found` \u002F `cant_update_message`) |\n| `deleteSlackMessage` | `chat.delete` | N\u002FA (message removed) | Delete a message (best-effort, swallows `message_not_found`) |\n| `addSlackReaction` | `reactions.add` | Everyone (emoji on message) | Processing indicator (best-effort, swallows `already_reacted`) |\n| `removeSlackReaction` | `reactions.remove` | Everyone (removes emoji) | Clear processing indicator (best-effort, swallows `no_reaction`) |\n\nResolve the bot token first with `resolveSlackBotToken` (tries Redis, falls back to DB, re-syncs):\n\n```typescript\nimport { postSlackEphemeral, postSlackMessage, resolveSlackBotToken } from '.\u002Futils\u002Fslack-api';\n\nconst slackAdapter = this.bot.getAdapter('slack');\nconst botToken = await resolveSlackBotToken(slackAdapter, teamId, this.externalBotRepo);\n\n\u002F\u002F Visible only to the target user\nawait postSlackEphemeral(botToken, channelId, userId, 'Only you can see this');\n\n\u002F\u002F Visible to everyone in the channel\nawait postSlackMessage(botToken, channelId, 'Everyone can see this');\n```\n\n**Security**: Prefer `postSlackEphemeral` for anything containing tokens, links, or user-specific state. Never post verification URLs via `postSlackMessage` or `thread.post()` — they leak one-time tokens to other channel members.\n\n### ID Extraction\n\nAlways extract `team_id` from raw events, not SDK abstractions. The Chat SDK normalizes messages into a generic shape, but workspace\u002Fguild\u002Ftenant IDs are platform-specific (`team_id` in Slack, `guild_id` in Discord, `tenantId` in Teams). The `external-bot` layer supports all three, so we read from `message.raw` to get the untouched platform payload. Use `decodeThreadId` for channel:\n\n```typescript\n\u002F\u002F Team ID from raw event\nconst parsed = RawEventSchema.safeParse(message.raw);\nconst teamId = parsed.success ? (parsed.data.team ?? parsed.data.team_id) : undefined;\n\n\u002F\u002F Channel ID from thread\nconst decoded = this.bot.getAdapter('slack').decodeThreadId(thread.id);\nconst channelId = decoded.channel;\n```\n\n### Slash Commands (Per-Environment with Sub-Commands)\n\nEach environment has its own Slack app and slash command: `\u002Fhamster` (prod), `\u002Fhamster-tux` (staging), `\u002Fhamster-local` (local). All route through the same sub-command system — the first word after the command is the sub-command (e.g. `\u002Fhamster logout`). Running the command with no arguments shows help.\n\n**Available sub-commands**: `help`, `logout`, `feedback`\n\n**Adding a new sub-command**:\n\n```typescript\n\u002F\u002F 1. Add to SubCommand type\ntype SubCommand = 'help' | 'logout' | 'feedback' | 'mycommand';\n\n\u002F\u002F 2. Add handler method\nprivate async handleMyCommand(event: SlashCommandEvent): Promise\u003Cvoid> {\n  await this.replyEphemeral(event, 'Response text here.');\n}\n\n\u002F\u002F 3. Register in getSubCommandMap()\n['mycommand', { handler: (event) => this.handleMyCommand(event), description: 'Description shown in help' }],\n```\n\n**Important**: Register sub-commands in `getSubCommandMap()`, not `getCommandMap()`. The top-level app commands (`\u002Fhamster`, etc.) are registered automatically from `APP_COMMANDS`.\n\n## Session Expiry (30-Day)\n\nIdentity sessions expire after 30 days of inactivity. The `last_active_at` column on `external_bot_identities` tracks the last message timestamp. On each incoming message, `resolveIdentity()` checks if `Date.now() - lastActiveAt > 30 days`. If expired, the identity is deleted and the user must re-verify. The expiry constant is `SESSION_EXPIRY_MS` in `slack-chat-handler.service.ts`.\n\n## Membership Cleanup\n\nWhen a user is removed from a team account (`accounts_memberships` DELETE), a trigger (`cleanup_bot_identities_on_membership_delete`) automatically deletes their `external_bot_identities` rows for that account. This prevents orphaned identities from letting removed users continue posting via the bot.\n\n## Documentation\n\n- **This file** (`SKILL.md`) — Update when adding\u002Fchanging sub-commands, services, architecture, or internal patterns.\n- **`docs\u002Ffeatures\u002Fslack-bot.md`** — Update when changes affect users (new commands, changed behavior, new capabilities).\n\n## Critical Rules\n\n1. **Set `chat_state: 'getting_started'`** — Slack messages must use the getting_started chat state so the orchestrator handles them correctly\n2. **Disable inline ask questions** — Slack does not support interactive ask_questions; the agent must respond with plain text only\n3. **Fail closed on missing account binding** — If the installation has no `account_id`, do NOT mint a verification token. Send an ephemeral \"not fully connected\" message and return early. The install flow must bind an account first.\n4. **Never subscribe top-level messages** — Calling `thread.subscribe()` on a top-level message (DM or channel @mention) captures all future messages in the channel, breaking new-thread creation. Only subscribe thread replies (`raw.thread_ts` present).\n\n## Verification Flow (Frontend)\n\nThe verify page at `apps\u002Fweb\u002Fapp\u002Fauth\u002Fslack\u002Fverify\u002F` is scoped to the installation's account:\n\n```\npromptVerification() builds URL: \u002Fauth\u002Fslack\u002Fverify\u002Fauth?token=xxx&account_id=yyy\n  → auth\u002Froute.ts sets two cookies: slack_verify_token + slack_verify_account_id\n  → page.tsx reads account hint cookie, queries external_bot_installations filtered to that account_id\n  → VerifyForm auto-selects the single account (no multi-select shown)\n  → linkSlackAccountAction clears both cookies on success\n```\n\n- The `account_id` in the URL is the installation's bound account — the only one `redeemVerificationToken` will accept\n- `loadTeamAccounts(expectedAccountId?)` queries `external_bot_installations` with RLS (`has_role_on_account`), optionally filtered by the hint\n- Falls back to showing all installed accounts if the cookie hint is missing (e.g. old verification links)\n\n## Testing\n\n```bash\npnpm --filter hamster-ai test -- --run apps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F\n```\n\nMock the Chat SDK bot with handler capture:\n\n```typescript\nconst mockBot = { onNewMention: vi.fn(), onSubscribedMessage: vi.fn(), onSlashCommand: vi.fn() };\nservice.onModuleInit();\n\u002F\u002F onNewMention takes a single callback arg (the SDK treats DMs as mentions)\nconst handler = mockBot.onNewMention.mock.calls[0]![0];\nawait handler(mockThread, mockMessage);\n```\n\n## Local Development\n\nSlack delivers webhooks via server-to-server HTTPS requests and verifies endpoint certificates, so `localhost` (plain HTTP, no public DNS) can't receive them. A Cloudflare Tunnel exposes the local API on a public HTTPS URL that Slack can reach.\n\n1. **Start the dev server with tunnel**:\n\n```bash\npnpm dev:with-slack\n```\n\n1. **Copy the `TUNNEL_URL`** printed in the terminal output (e.g. `https:\u002F\u002Ffork-margin-hitting-disks.trycloudflare.com`)\n2. **Update the Slack app manifest** at https:\u002F\u002Fapp.slack.com\u002Fapp-settings\u002FT0962GGFR3R\u002FA0AK7LG9RC5\u002Fapp-manifest — replace all URL prefixes with the tunnel URL\n3. **Verify the URL** by clicking `Click here to verify` in the banner at the top of the screen\n4. **Add Slack bot connection** by going to context-settings and installing `Slack Bot` for your team.\n5. **Open the App in Slack** and message the Hamster Bot. It will send a verification link. Once completed you'll be able to have a conversation with Hamster.\n","# Slack Bot Integration\n\nSlack bot module built on the [Chat SDK](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fchat) (`chat` + `@chat-adapter\u002Fslack`). Handles DMs, slash commands, OAuth installation, and identity verification.\n\n## Quick Reference\n\n| Task | File | Notes |\n| --- | --- | --- |\n| Add a sub-command | `slack-slash-commands.service.ts` | Add to `SubCommand` type + `getSubCommandMap()` |\n| Change message processing | `slack-chat-handler.service.ts` | `handleMessage()` → `processIncomingText()` is the shared flow |\n| Modify webhook behavior | `slack-webhook.controller.ts` | Single `POST \u002Fwebhooks\u002Fslack\u002Fevents` endpoint |\n| Update OAuth flow | `slack-bot-install.controller.ts` | `GET \u002Fwebhooks\u002Fslack\u002Finstall\u002Fcallback`; `stateParam` typed as `unknown` with runtime string guard |\n| Start OAuth install flow | `slack-bot-install.controller.ts` | `GET \u002Fwebhooks\u002Fslack\u002Finstall` redirects to Slack authorize |\n| Change account linking | `slack-bot-verify.controller.ts` | `POST \u002Fv1\u002Fslack-bot\u002Fverify` (authenticated) |\n| Verify page (frontend) | `apps\u002Fweb\u002Fapp\u002Fauth\u002Fslack\u002Fverify\u002F` | Scoped to installation's account via cookie hint |\n| Modify verification logic | `slack-bot-verify.service.ts` | Token redemption + Slack confirmation message |\n| Feature-flag the connector | `feature-flags.config.ts` | `enableConnectorSlackBot` \u002F `NEXT_PUBLIC_ENABLE_CONNECTOR_SLACK_BOT` |\n| Edit markdown conversion | `utils\u002Fmarkdown-to-slack.ts` | Preserve code blocks first, then transform |\n| Manage identities\u002Fthreads | `external-bot.repository.ts` | Shared with `external-bot` module |\n\n## Architecture\n\n```\napps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F\n├── chat-bot.provider.ts              # Chat SDK singleton (SlackAdapter + Redis state)\n├── slack-webhook.controller.ts       # Webhook: POST \u002Fwebhooks\u002Fslack\u002Fevents\n├── slack-webhook.service.ts          # Webhook validation, payload size limits, signature verification\n├── slack-chat-handler.service.ts     # SDK event handlers, message + file attachment processing\n├── slack-slash-commands.service.ts   # Slash command registry\n├── linear-feedback.service.ts        # Submits feedback as Linear issues via @kit\u002Fshared\u002Flinear-feedback\n├── slack-bot-install.controller.ts   # OAuth install callback\n├── slack-bot-verify.controller.ts    # Account linking verification\n├── slack-bot-verify.service.ts       # Token redemption + Slack confirmation\n├── slack-bot.module.ts\n├── dto\u002F\n│   ├── slack-verify.dto.ts\n│   └── slack-verify-response.dto.ts\n└── utils\u002F\n    ├── markdown-to-slack.ts          # Markdown -> Slack mrkdwn\n    ├── progressive-status.ts         # Progressive status messages during AI processing (timer chain + cleanup)\n    ├── slack-api.ts                  # Slack API helpers (postMessage, postEphemeral, update, delete, reactions, token resolution)\n    ├── slack-thread-context.ts       # Thread context fetch + synthetic attachment builder\n    └── to-web-request.ts             # Express -> Web API Request\n\napps\u002Fai\u002Fsrc\u002Fmodules\u002Fexternal-bot\u002F    # Shared identity\u002Finstallation layer\n├── external-bot.repository.ts           # DB: identities, threads, installations + bot token fallback\n├── external-bot.service.ts              # Business logic: verification, thread orchestration, polling\n└── external-bot.module.ts\n```\n\n**Dependencies**: `ExternalBotModule` (identity\u002Fthreads), `AiAgentModule` (AI processing), `DocumentsModule` (file extraction via `ChatFileProcessorService`), `ConfigModule`, `RedisModule`.\n\n## Feature Flag\n\nThe Slack Bot connector tile in the web UI is gated behind:\n\n```\nNEXT_PUBLIC_ENABLE_CONNECTOR_SLACK_BOT=true|false\n```\n\nSchema key: `enableConnectorSlackBot` in `apps\u002Fweb\u002Fconfig\u002Ffeature-flags.config.ts`. When disabled, the tile is hidden from the context-settings service grid.\n\n**Env vars**: `SLACK_BOT_SIGNING_SECRET`, `SLACK_BOT_CLIENT_ID`, `SLACK_BOT_CLIENT_SECRET`, `SLACK_BOT_ENCRYPTION_KEY` (encrypts OAuth state in Redis). All required per environment — each env (local, tux, prod) has its own Slack bot app.\n\n## Token Storage: Redis + DB Fallback\n\nBot OAuth tokens live in **two places** — Redis (primary, fast) and the database (durable fallback). This means a Redis flush doesn't force workspaces to reinstall the Slack app.\n\n- **On OAuth install**: The install flow is kicked off from the team context-settings \"Add Connection\" page via an install dialog. It hits `GET \u002Fwebhooks\u002Fslack\u002Finstall`, which redirects to Slack's authorize URL with a `state` param encoding the installing `accountId`. On callback, the SDK stores the encrypted token in Redis. The install callback stores the token in Supabase Vault via `store_external_bot_token()` and saves the vault reference in `external_bot_installations.bot_token_secret_id`. If `accountId` was present in the state, it is bound to the installation (`account_id` column) via `bindInstallationAccount()` (first-writer-wins: only sets when NULL). **Note**: `verifyAndDecodeState` accepts `unknown` and rejects non-string values (e.g. array from repeated query params) before calling string methods.\n- **On token resolution**: `resolveSlackBotToken()` tries Redis first. On miss (flush, key corruption, encryption key rotation), it reads from the Vault via `get_external_bot_token()`, returns the token, and re-syncs it to Redis so subsequent requests are fast again. Vault persistence ensures that the user doesn't have to reinstall the app into the workspace on cache miss.\n- **On webhook**: `SlackWebhookController.ensureInstallation()` calls `resolveSlackBotToken()` before the SDK processes the request, transparently restoring Redis from DB if needed\n- **On Redis flush**: Token is restored from DB automatically — no user action required\n\n## Threading Model\n\nIn Slack's API, `ts` (timestamp) is the unique identifier for a message — a string like `\"1234567890.123456\"` that doubles as both ID and timestamp. Replying to a thread means passing the parent message's `ts` as `thread_ts`.\n\n**Variable naming in `slack-chat-handler.service.ts`**:\n\n- `incomingMessageTs` — the ts of the message the user just sent (Slack's `ts`)\n- `threadTs` — the thread root ts, only present for replies (Slack's `thread_ts`)\n- `threadAnchorTs` — resolved thread identifier: `threadTs ?? incomingMessageTs`\n\nEach Slack thread (`channel:thread_ts`) maps 1:1 to a Hamster thread. The `platformChannelId` stored in `external_bot_threads` encodes this as `{channelId}:{threadAnchorTs}`.\n\n### DMs\n\n- **Top-level DM**: Each new message starts a brand-new Hamster thread. The bot replies as a Slack thread reply (using `postSlackThreadReply` with the message's own `ts` as `thread_ts`), which anchors the conversation. The handler does NOT call `thread.subscribe()` — subscribing at the channel level would capture all future DMs instead of letting each start a new thread.\n- **DM thread reply**: Continues the existing Hamster thread mapped to that Slack thread. Uses `thread.subscribe()` so follow-ups route to `onSubscribedMessage`. Replies via SDK `thread.post()`.\n\n### Channels\n\n- **Top-level @mention**: Starts a brand-new Hamster thread, same as a top-level DM. The bot replies as a Slack thread reply (using `postSlackThreadReply` with the message's own `ts` as `thread_ts`), anchoring a new thread. Does NOT call `thread.subscribe()` — subscribing at the channel level would capture all future @mentions instead of letting each start a new thread. The SDK's `onNewMention` handler only fires on actual @mentions, so regular channel messages are ignored.\n- **Thread @mention**: Processes normally. Thread context (prior messages) is fetched via `fetchSlackThreadContext` and attached as a synthetic `slack-thread-context.md` file so the AI agent has full conversation context.\n\n## Message Processing Flow\n\n`onNewMention` and `onSubscribedMessage` both delegate to `handleMessage` → `processIncomingText`. The SDK treats DMs as mentions, so `onNewMention` is the correct handler for both DMs and channel @mentions:\n\n```\n1. Strip bot mention from raw event text (\u003C@UBOTID> → empty) to get actual user content\n2. Early exit: no text + no attachments → silent return\n3. Parse Slack IDs (channel via decodeThreadId, teamId from raw event)\n4. Reject file-only messages (no text after mention stripping) → ephemeral hint to user\n5. Identity resolution (findIdentity)\n   ├── Not found → check installation has account binding\n   │   ├── No installation or no account_id → silent rejection (fail-closed), stop\n   │   └── Has account binding → send verification link with account_id hint via ephemeral message\n   └── Found → continue\n6. Subscribe to thread (skipped for top-level messages)\n7. Determine platformChannelId = {channelId}:{threadAnchorTs}\n8. Get or create Hamster thread (aiClient for auth, human userId as created_by)\n9. Download + extract file attachments and fetch thread context\n10. Create user message (human userId as created_by, source: 'slack', chat_state: 'getting_started')\n11. Add hourglass reaction to user's message (fire-and-forget processing indicator)\n12. Start progressive status messages (fire-and-forget timer chain, posts + updates a threaded message)\n13. Process AI inline via aiAgentService.processThreadMessage()\n14. Deliver replies:\n    ├── Top-level message (DM or channel @mention) → postSlackThreadReply (anchors Slack thread)\n    └── Thread reply → thread.post() via SDK\n15. Cancel status messages + delete status message (in finally block)\n16. Remove hourglass reaction (fire-and-forget, in finally block — removed on both success and failure)\n```\n\n### File Attachments\n\nFile attachments are downloaded from Slack, extracted via `ChatFileProcessorService`, and passed to the AI as `syntheticAttachments` in message metadata.\n\n**Flow**: `processSlackAttachments` → `getEligibleAttachments` → `processInBatches` (bounded concurrency) → `processOneAttachment` (download + extract).\n\n**Download strategies** (tried in order):\n\n1. SDK `attachment.fetchData()` — primary\n2. Slack `files.info` API — fallback (inline `content` for text, `url_private_download` for binary)\n\n**Size enforcement** (three layers):\n\n1. `getEligibleAttachments` — pre-filters by `attachment.size` metadata before downloading\n2. `downloadFromUrl` — checks `Content-Length` header before reading the response body\n3. `downloadFromUrl` — checks `arrayBuffer.byteLength` after download (catches missing\u002Finaccurate `Content-Length`)\n\n**Limits**: `MAX_FILE_SIZE_BYTES` (50 MB per file), `MAX_ATTACHMENTS_PER_MESSAGE` (8 per message), `MAX_CONCURRENT_DOWNLOADS` (3 parallel).\n\n**Webhook payload limit**: 1 MB (`MAX_PAYLOAD_BYTES`) for all events. File content is downloaded separately via `fetchData()` \u002F `files.info` — the webhook payload only contains JSON metadata.\n\n**Oversized file feedback**: When files exceed the size limit, an ephemeral message lists the skipped file names so the user knows why they were dropped.\n\n### Processing Indicator\n\nTwo fire-and-forget feedback mechanisms run during AI processing:\n\n1. **Hourglass reaction** (`PROCESSING_REACTION` in `slack-chat-handler.service.ts`) — added at start, removed in `finally` block. Requires `reactions:write` scope.\n2. **Progressive status messages** (`utils\u002Fprogressive-status.ts`) — threaded reply posted at 1s, updated in-place at 10s\u002F20s with randomly selected messages (5 per stage), then **deleted** on completion.\n\n```\n0s → hourglass reaction added\n1s → status message posted (randomly picked from bank)\n10s\u002F20s → status message updated in place\nAI responds → status message deleted, reaction removed\n```\n\n### RLS Ownership Pattern\n\nAll DB writes use the **AI user client** (`aiClient` where `auth.uid() = aiUserId`) for authentication. However, `created_by` is set to the **human user's** ID (the actual message author). This means `created_by ≠ auth.uid()` — the repository intentionally avoids `INSERT...RETURNING` (no `.select()` after insert) because the RLS creator-shortcut SELECT policy would not match.\n\nThe human user is tracked in thread metadata (`human_user_id`). The AI client passes `is_thread_owner` checks for participant and thread_item INSERT operations.\n\n## Key Patterns\n\n### Express to Web Request\n\nThe Chat SDK expects Web API `Request` objects:\n\n```typescript\nconst webRequest = toWebRequest(req, { includeBody: true });\nconst sdkResponse = await this.bot.webhooks.slack(webRequest, {\n  waitUntil: (task) => backgroundTasks.push(task),\n});\n```\n\n### Sending Messages Outside Webhook Context\n\nUse the shared helpers in `utils\u002Fslack-api.ts`. They handle the HTTP call, response parsing, and error formatting.\n\n| Helper | Slack API | Visibility | Use case |\n| --- | --- | --- | --- |\n| `postSlackMessage` | `chat.postMessage` | Everyone in the channel | Public notifications |\n| `postSlackThreadReply` | `chat.postMessage` (with `thread_ts`) | Everyone in the thread | AI replies to top-level messages — DMs and channel @mentions (anchors a Slack thread) |\n| `postSlackEphemeral` | `chat.postEphemeral` | Only the target user | Verification links, confirmations, errors |\n| `updateSlackMessage` | `chat.update` | Everyone in the channel | Edit a message in place (best-effort, swallows `message_not_found` \u002F `cant_update_message`) |\n| `deleteSlackMessage` | `chat.delete` | N\u002FA (message removed) | Delete a message (best-effort, swallows `message_not_found`) |\n| `addSlackReaction` | `reactions.add` | Everyone (emoji on message) | Processing indicator (best-effort, swallows `already_reacted`) |\n| `removeSlackReaction` | `reactions.remove` | Everyone (removes emoji) | Clear processing indicator (best-effort, swallows `no_reaction`) |\n\nResolve the bot token first with `resolveSlackBotToken` (tries Redis, falls back to DB, re-syncs):\n\n```typescript\nimport { postSlackEphemeral, postSlackMessage, resolveSlackBotToken } from '.\u002Futils\u002Fslack-api';\n\nconst slackAdapter = this.bot.getAdapter('slack');\nconst botToken = await resolveSlackBotToken(slackAdapter, teamId, this.externalBotRepo);\n\n\u002F\u002F Visible only to the target user\nawait postSlackEphemeral(botToken, channelId, userId, 'Only you can see this');\n\n\u002F\u002F Visible to everyone in the channel\nawait postSlackMessage(botToken, channelId, 'Everyone can see this');\n```\n\n**Security**: Prefer `postSlackEphemeral` for anything containing tokens, links, or user-specific state. Never post verification URLs via `postSlackMessage` or `thread.post()` — they leak one-time tokens to other channel members.\n\n### ID Extraction\n\nAlways extract `team_id` from raw events, not SDK abstractions. The Chat SDK normalizes messages into a generic shape, but workspace\u002Fguild\u002Ftenant IDs are platform-specific (`team_id` in Slack, `guild_id` in Discord, `tenantId` in Teams). The `external-bot` layer supports all three, so we read from `message.raw` to get the untouched platform payload. Use `decodeThreadId` for channel:\n\n```typescript\n\u002F\u002F Team ID from raw event\nconst parsed = RawEventSchema.safeParse(message.raw);\nconst teamId = parsed.success ? (parsed.data.team ?? parsed.data.team_id) : undefined;\n\n\u002F\u002F Channel ID from thread\nconst decoded = this.bot.getAdapter('slack').decodeThreadId(thread.id);\nconst channelId = decoded.channel;\n```\n\n### Slash Commands (Per-Environment with Sub-Commands)\n\nEach environment has its own Slack app and slash command: `\u002Fhamster` (prod), `\u002Fhamster-tux` (staging), `\u002Fhamster-local` (local). All route through the same sub-command system — the first word after the command is the sub-command (e.g. `\u002Fhamster logout`). Running the command with no arguments shows help.\n\n**Available sub-commands**: `help`, `logout`, `feedback`\n\n**Adding a new sub-command**:\n\n```typescript\n\u002F\u002F 1. Add to SubCommand type\ntype SubCommand = 'help' | 'logout' | 'feedback' | 'mycommand';\n\n\u002F\u002F 2. Add handler method\nprivate async handleMyCommand(event: SlashCommandEvent): Promise\u003Cvoid> {\n  await this.replyEphemeral(event, 'Response text here.');\n}\n\n\u002F\u002F 3. Register in getSubCommandMap()\n['mycommand', { handler: (event) => this.handleMyCommand(event), description: 'Description shown in help' }],\n```\n\n**Important**: Register sub-commands in `getSubCommandMap()`, not `getCommandMap()`. The top-level app commands (`\u002Fhamster`, etc.) are registered automatically from `APP_COMMANDS`.\n\n## Session Expiry (30-Day)\n\nIdentity sessions expire after 30 days of inactivity. The `last_active_at` column on `external_bot_identities` tracks the last message timestamp. On each incoming message, `resolveIdentity()` checks if `Date.now() - lastActiveAt > 30 days`. If expired, the identity is deleted and the user must re-verify. The expiry constant is `SESSION_EXPIRY_MS` in `slack-chat-handler.service.ts`.\n\n## Membership Cleanup\n\nWhen a user is removed from a team account (`accounts_memberships` DELETE), a trigger (`cleanup_bot_identities_on_membership_delete`) automatically deletes their `external_bot_identities` rows for that account. This prevents orphaned identities from letting removed users continue posting via the bot.\n\n## Documentation\n\n- **This file** (`SKILL.md`) — Update when adding\u002Fchanging sub-commands, services, architecture, or internal patterns.\n- **`docs\u002Ffeatures\u002Fslack-bot.md`** — Update when changes affect users (new commands, changed behavior, new capabilities).\n\n## Critical Rules\n\n1. **Set `chat_state: 'getting_started'`** — Slack messages must use the getting_started chat state so the orchestrator handles them correctly\n2. **Disable inline ask questions** — Slack does not support interactive ask_questions; the agent must respond with plain text only\n3. **Fail closed on missing account binding** — If the installation has no `account_id`, do NOT mint a verification token. Send an ephemeral \"not fully connected\" message and return early. The install flow must bind an account first.\n4. **Never subscribe top-level messages** — Calling `thread.subscribe()` on a top-level message (DM or channel @mention) captures all future messages in the channel, breaking new-thread creation. Only subscribe thread replies (`raw.thread_ts` present).\n\n## Verification Flow (Frontend)\n\nThe verify page at `apps\u002Fweb\u002Fapp\u002Fauth\u002Fslack\u002Fverify\u002F` is scoped to the installation's account:\n\n```\npromptVerification() builds URL: \u002Fauth\u002Fslack\u002Fverify\u002Fauth?token=xxx&account_id=yyy\n  → auth\u002Froute.ts sets two cookies: slack_verify_token + slack_verify_account_id\n  → page.tsx reads account hint cookie, queries external_bot_installations filtered to that account_id\n  → VerifyForm auto-selects the single account (no multi-select shown)\n  → linkSlackAccountAction clears both cookies on success\n```\n\n- The `account_id` in the URL is the installation's bound account — the only one `redeemVerificationToken` will accept\n- `loadTeamAccounts(expectedAccountId?)` queries `external_bot_installations` with RLS (`has_role_on_account`), optionally filtered by the hint\n- Falls back to showing all installed accounts if the cookie hint is missing (e.g. old verification links)\n\n## Testing\n\n```bash\npnpm --filter hamster-ai test -- --run apps\u002Fai\u002Fsrc\u002Fmodules\u002Fslack-bot\u002F\n```\n\nMock the Chat SDK bot with handler capture:\n\n```typescript\nconst mockBot = { onNewMention: vi.fn(), onSubscribedMessage: vi.fn(), onSlashCommand: vi.fn() };\nservice.onModuleInit();\n\u002F\u002F onNewMention takes a single callback arg (the SDK treats DMs as mentions)\nconst handler = mockBot.onNewMention.mock.calls[0]![0];\nawait handler(mockThread, mockMessage);\n```\n\n## Local Development\n\nSlack delivers webhooks via server-to-server HTTPS requests and verifies endpoint certificates, so `localhost` (plain HTTP, no public DNS) can't receive them. A Cloudflare Tunnel exposes the local API on a public HTTPS URL that Slack can reach.\n\n1. **Start the dev server with tunnel**:\n\n```bash\npnpm dev:with-slack\n```\n\n1. **Copy the `TUNNEL_URL`** printed in the terminal output (e.g. `https:\u002F\u002Ffork-margin-hitting-disks.trycloudflare.com`)\n2. **Update the Slack app manifest** at https:\u002F\u002Fapp.slack.com\u002Fapp-settings\u002FT0962GGFR3R\u002FA0AK7LG9RC5\u002Fapp-manifest — replace all URL prefixes with the tunnel URL\n3. **Verify the URL** by clicking `Click here to verify` in the banner at the top of the screen\n4. **Add Slack bot connection** by going to context-settings and installing `Slack Bot` for your team.\n5. **Open the App in Slack** and message the Hamster Bot. It will send a verification link. Once completed you'll be able to have a conversation with Hamster.\n",{"name":5,"version":24,"description":7},"1.1.0","main","fe3bb1476c3ec23d8a366eac0fa8cd9f0852360a","skills\u002F.experimental\u002Fslack-bot",0,"https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills","https:\u002F\u002Fgithub.com\u002Fgethamster","https:\u002F\u002Ftryhamster.com","We're building the AI-native future of work, unlocking the promised acceleration for your whole team, from idea to impact.","2026-11-05 11:33:33",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add gethamster\u002Fskills --skill slack-bot",{"tool":40,"command":41},"bunx","bunx skills add gethamster\u002Fskills --skill slack-bot",{"tool":43,"command":44},"pnpm","pnpm dlx skills add gethamster\u002Fskills --skill slack-bot","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002F.experimental\u002Fslack-bot\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7B5MWYW0KE251276S56KQDZ","writing-waterfall-requirements-documents","Write a waterfall requirements document: elicit, structure and review testable, traceable requirements, then baseline the specification before design.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-waterfall-requirements-documents\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7B5MRCXWWPKREPB1CHQ7H90","writing-vision-and-values-statements","Write a V2MOM vision a reader can test and a ranked list of values that settles real tradeoffs, so the rest of the document has a clear anchor.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-vision-and-values-statements\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7B5MKH2CH22YZAHQW3080VQ","writing-system-prompts-for-claude","Write Claude prompts and CLAUDE.md files that supply exact inputs, scope the task, and define done so the first attempt can be checked.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-system-prompts-for-claude\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7B5ME1Y3X9RNRKP5HKHKACZ","writing-page-specific-website-copy","Website copywriting by page type: write homepage, landing page, pricing page and feature page copy that fits each page's visitor and single job.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-page-specific-website-copy\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7B5M8MQNM8MN8PYH6BVWJ2B","writing-internal-press-releases","How to write an internal press release: the one-page working backwards press release that opens a PR\u002FFAQ document before anything is built.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-internal-press-releases\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7B5M3P3YH1XF37R8PWXXSBK","writing-email-sequences-that-sell","Email sequence copywriting for nurture and sales: give each email one job, write clear subject lines, and close with one specific call to action.","https:\u002F\u002Fgithub.com\u002Fgethamster\u002Fskills\u002Fblob\u002Fmain\u002Fskills\u002Fwriting-email-sequences-that-sell\u002FSKILL.md",[],[]]