/pachca:pachca-botsfrom Pachca
Guides building Pachca bots and integrations: choosing between incoming/outgoing webhooks, bot tokens, events, buttons, forms, link unfurling, and the bot showcase.
Ships in Pachca. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A bot in Pachca is a service member of the workspace: it has a name, avatar and nickname, sits in chats, writes messages and receives events on its own behalf; it acts for an employee only when that employee authorizes it (→ pachca-oauth). Every integration is built on a bot. This skill is the decision guide and the rules; the live pages hold the details.
Hand off: an LLM agent living in Pachca, including one that does not hear a mention → pachca-ai-agent; acting with an employee's own rights → pachca-oauth; generic API work (pagination, 429, errors, SDK) → pachca-api.
| The integration must… | Turn on | Not enough / watch out |
|---|---|---|
| Post notifications from a service | Incoming webhook | Posts to all conversations and channels the bot is in; cannot target one chat, thread or DM |
| Write to a specific chat, DM, thread from code | Bot token | Send with the token (pachca_send_message, pachca messages create) |
| Answer employees (DM, mention, command) | Outgoing webhook + token | Pick the message mode, or the bot hears nothing |
| Ask an employee inside a message | Buttons, then a form | Needs the «Нажатие кнопок» event and a handler that answers in seconds |
| Show cards for internal links | Link-sharing event + domains | Only an admin or the owner turns it on |
| Work with an employee's own data | Authorization on behalf of an employee | → pachca-oauth |
| Let employees find and connect the bot themselves | Public bot, or publication in the showcase | Published ≠ reachable; see Showcase below |
In the interface a bot is created with only a name and nickname; each capability is a separate tab of the bot card («Основное», «Входящий вебхук», «Исходящий вебхук», «API», «OAuth»; in the English interface General, Incoming webhook, Outgoing webhook), switched on when needed. Created via API, a bot also gets a token and an incoming webhook by default (empty: true gives the bare interface variant); see step 2 below. Name controls to the person exactly as the interface shows them.
pachca-oauth.Who may create bots: admins and employees, unless the owner or an admin restricted it to admins. UI creation works on web and desktop, not in mobile apps.
_, ends with _bot, unique in the workspace. Via API (pachca_create_bot, pachca bots create) only the name is required.access_token once; it is never shown again (UI or API) — a lost token is reissued. With empty: true the bot is created like in the UI: no token, no incoming webhook. Leave scopes out then: with it the main token is created, but its value does not come back.trigger_on and commands) listens to commands with an empty command list, so it hears nothing: set trigger_on: "all_messages" or list the commands in commands.chat_id (pachca_add_members, pachca members add). A mention in a thread adds only a public bot, and a new bot is not public by default. DMs need no adding, but not every employee can open one (see Chat access).Agent doing this with tools: creating a bot or token returns a secret shown once — give it to the person in your reply, never post it in a chat or commit it. Deleting a bot is final (tokens revoked, webhooks and authorizations stop). An Owner or Administrator can suspend it instead, which can be undone (→ pachca-admin): when that is open to you, ask first and offer it. Reissuing a token kills the old value at once: tell the person that every service using it needs the new one.
bot_self:webhook:write (the bot sets its own outgoing webhook URL) and bot_self:write (the bot rotates its own token). The main token of a bot created by API without webhook.scopes gets a default set without these and without user_status:read — grant them explicitly.pachca_get_bot_scopes (pachca bots list-scopes) lists what can be granted; pachca_get_token_info (pachca oauth token-info) shows what the current token has.bots:read and bots:write. A chat owner who may edit the bot never sees its tokens.pachca_reissue_bot_token, pachca bots reissue-token) — the old value dies instantly — then update the services. Keep tokens in env vars or a secret store, never in code.pachca_update_bot with outgoing_url: "" and events: [] in one call (without events_history_enabled: true). An empty outgoing_url alone only pauses delivery and keeps the old secret. Deletion also resets events, mode, commands, history and «Игнорировать свои сообщения»: note them from pachca_get_bot first and restore them after. The answer of the restoring pachca_update_bot call already carries the new webhook.secret_token for a token whose owner may manage the bot's tokens; otherwise read it with pachca_get_bot (view: "full").webhook.scopes and the two rotation methods act on. Details: tokens.pachca_add_members (pachca members add), bot id in member_ids. Add to a thread alone with its chat_id: the bot sees the thread and its parent message, not the chat history.@nickname mention in a thread adds the bot only if it is a «Публичный бот» and the author is not a guest or multi-guest. A bot outside the parent chat is added this way only while the workspace setting «Использовать сквозные треды» is on (the default). A non-public bot is never added by a mention, even when its creator or an admin writes it: add it by the thread's chat_id as above. A mention in a conversation or channel adds no one.entity_type: "user"). A bot cannot be added to an existing DM between two people.Settings that bite («Основное» tab, settings): a new bot is editable only by its creator (admins do not even see it until the creator ticks «Администраторы» in «Кто может редактировать настройки бота»); chat owners may change settings and webhooks but not name, tokens, OAuth, showcase or deletion. A bot can be in tags only if anyone may add it and «Ограничить одним чатом» is off; setting "who can add" to creator or creator-and-admins, or turning on «Ограничить одним чатом», removes it from tags and tag-joined chats at once — ask first.
entity_type user), the bot is mentioned (a mention made in the app arrives in content as @ plus the bot's name, one sent by API as @nickname: match both as whole words outside code, details → pachca-ai-agent), the message starts with a command, or the conversation obviously continues (e.g. a thread with the bot and one employee; check members via chat info).user_id with the bot id (get it from pachca_get_my_card / pachca profile get with the bot token). The setting also drops reactions anyone puts on the bot's own messages: a bot that counts reactions on its own poll needs it off and the user_id check instead.pachca_get_user (pachca users get, scope users:read) and cache bot: true per user_id. Skip bot authors (also when counting employees for the continuation check) unless reacting to them is the point, or two bots that answer each other loop forever.pachca_create_thread (pachca threads add) returns the existing thread if there is one, then send with entity_type: "thread".user_id.messages:create, threads:create, reactions:write, messages:read, chats:read, profile:read, plus users:read to recognize other bots.skip_invite_mentions: true keeps them out. With it off, only members of the parent chat are added, and the flag changes nothing (→ pachca-messaging, Mentions). Rate and per-chat daily limits: limits.Must-haves; procedure and payload notes in references/events.md:
http/https; local and internal addresses are refused. Develop through a tunnel, or read the event history: polled, or as a live stream with no public URL (events.md, section 7).3xx (an http URL that redirects to https, a route that adds a trailing slash, a login page) counts as a failed answer and is not retried. A form submission follows one redirect at most. Check that a POST to the URL gets a 2xx directly.Pachca-Signature (HMAC-SHA256 of the raw body with the Signing secret) and reject a webhook_timestamp more than a minute away from now.200 immediately, queue the work. Pachca waits 5 s for a regular event and re-sends it only when it could not connect; an error code or a timeout is never retried. A button click waits up to 30 s, but the employee sees an error only for a failed answer within the first 3 s. A form submission waits 3 s. Neither is re-sent. Turn on event history to recover missed events; it is read with the bot's own token.update is not always an edit: it also comes when nothing in the message changed (events.md, section 6).id for attachments, buttons, forwards.button_click) event.buttons array removes all buttons), reply, or open a form with trigger_id (lives 3 s).pachca_send_message buttons schema. A row never wraps, so keep 5–6 buttons per row for narrow screens. Buttons.A form opens only from a Data-button click in the bot's message, by trigger_id, and the submission must be answered within seconds: 3 in the webhook response, 5 with pachca_answer_form (pachca views submit-response) for a bot without a webhook URL. Open the form first, do the rest after. An agent working in a chat cannot meet these windows — use a message instead, or build a handler. Full procedure: references/forms.md.
entity_id is null.skip: true (the author hid the preview; if sent anyway it is skipped, not an error). Send previews with pachca_add_link_preview (pachca messages unfurl) and the message_id from the event.link_preview_enabled, on its incoming webhook tab). It is on by default and turns back on when the incoming webhook is deleted, so links from a bot without an incoming webhook usually arrive. Link previews.message field, or a Liquid or Mustache template over any JSON.application/json, application/x-www-form-urlencoded, multipart/form-data; anything else gets 415 and nothing is posted.200 does not mean posted: the webhook answers 200 and posts later, to every conversation and channel the bot is in (threads and DMs do not count). Nothing appears, still with 200, when the bot is in none (body OK), when the template result is empty (body empty_message) or when the text is over the length limit (body empty_message, or OK when it fits in characters but not in bytes, typical for Cyrillic). A template syntax error posts a "template error" message into the chats (body syntax_error with Liquid, OK with Mustache).webhook.last_request_body in bot info (pachca_get_bot with view: "full") for a token with bots:write whose owner may manage the bot's tokens.empty: true bot or a re-enabled webhook — pass template_engine with kind.404); re-enabling gives a new one — update the service. Incoming webhooks.pachca_get_bot, pachca bots get) has outgoing_url, message_new in events, and trigger_on: all_messages or a non-empty commands; the bot is a member of that chat, an open one included; in commands mode the command is the literal first word, so @nickname /task and /task, never match; the URL is the final address, not a redirect. Then turn on event history, send a test message again and read the history with the bot token (pachca_get_webhook_events, or pachca bots list-events with the token in PACHCA_TOKEN; an employee connection has no such tool, which says nothing about the history): the event is there → your URL or handler; no event → settings or membership.5xx or timeout as "Pachca will retry" — it will not.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/pachcaВход в Пачку (Pachca) для агента: подключить агента или MCP-клиента (MCP через браузер или токеном, плагин, CLI), проверить подключение, выбрать токен, разобрать отказ 401/403 инструмента или CLI и отсутствие инструмента (роль, тариф, тип токена, участие в чате). Когда: «подключи Пачку», «настрой MCP Пачки», «войди в Пачку через CLI», «каким токеном подключить агента», «экран входа MCP», «агент получил 403 insufficient_scope», «нет инструмента Пачки (экспорт, журнал аудита)», «что умеет Пачка», "connect Pachca", "set up Pachca MCP", "Pachca CLI login", "which token for my agent or MCP client", "MCP sign-in screen", "MCP tool or CLI returned 401/403", "a Pachca tool is missing". Not for: writing messages → pachca-messaging; search and summaries → pachca-search; administration, who may create tokens → pachca-admin; building a bot → pachca-bots; an agent living in Pachca → pachca-ai-agent; OAuth for employees → pachca-oauth; a token for a script or service, 401/403 in your own code → pachca-api./pachca-adminАдминистрирование пространства Пачки: сотрудники (пригласить, сменить роль, приостановить, удалить), теги и участники чатов, доступ к API и «Все токены», журнал аудита, экспорт, DLP, безопасный контур и шифрование, и что требует владельца, администратора или «Корпорации». Load before a tool call that changes an employee: delete only after a yes to your question. Когда: «пригласи сотрудника», «уволь / удали сотрудника», «сделай администратором», «добавь в тег», «добавь / удали участника чата», «кто в закрытом канале, где я не состою», «доступ к API ограничен», «отзови доступ сотрудника к API», «журнал аудита», «выгрузи переписку», «правило DLP», "invite an employee", "offboard a user", "change role", "add or remove chat members", "let employees create tokens", "export messages". Not for: a missing tool or a general 401/403 → pachca; who is in a tag or chat → pachca-search; writing messages → pachca-messaging; a bot's own token → pachca-bots; an app acting for employees → pachca-oauth; scripts → pachca-api./pachca-ai-agentРешить, бот или MCP, и сделать AI-агента в Пачке в виде бота: его зовут упоминанием в чате или треде либо пишут ему в личный чат, он собирает контекст треда, показывает таймер agent-thinking, отвечает в треде и оформляет длинный ответ карточкой .md. Когда: «AI-агент в Пачке», «агент отвечает по упоминанию в треде», «агент не слышит упоминание», «бот-агент в личных сообщениях», «как агенту собрать контекст треда», «реакция agent-thinking», «длинный ответ агента карточкой .md», «бот или MCP», "AI agent bot in Pachca", "agent replies when mentioned", "agent does not hear a mention", "read thread context", "thinking indicator", "agent reply as an .md card", "bot vs MCP". Not for: working in Pachca from Claude or Cursor through MCP → pachca, pachca-messaging, pachca-search; drafts and scheduled messages (a bot cannot make them), sending a file or report from Claude, Cursor or the CLI → pachca-messaging; webhooks, tokens and settings of any bot → pachca-bots; acting on behalf of an employee → pachca-oauth./pachca-apiAPI Пачки из кода, скриптов и CI: токен и права для скрипта или сервиса, обход всех страниц, ошибки и повторы без дублей (401/403/422, 429, 5xx), файлы в коде, SDK и генератор, CLI в скриптах, массовые выгрузки, поиск метода. Когда: «напиши скрипт для API Пачки», «какой токен дать скрипту, сервису или CI», «мой код получает 401/403/422 от API», «упёрлись в 429», «поиск вернул 504 timeout, повторить?», «обойти все страницы», «скрипт, который выгружает всех сотрудников», «загрузка файла из кода», «SDK Пачки», «какой метод API», "call the Pachca API from code", "token for a script or CI job", "401/403/422 in my code", "cursor pagination", "429 Retry-After", "upload a file from my code", "Pachca SDK", "pachca CLI in CI", "which endpoint". Not for: connecting an agent or MCP client, a 401/403 from an MCP tool → pachca; writing messages, a file to a chat now → pachca-messaging; bots, webhooks, events → pachca-bots; OAuth for employees → pachca-oauth; token policy, all-tokens tab, message export → pachca-admin./pachca-messagingПисать в Пачку: разметка, упоминания, куда писать (тред, ответ с цитатой, личный чат), черновик, который отправит сотрудник, пост об изменениях, отложенные и регулярные сообщения в чат, файлы, пересылка, реакции, закрепление, «Важное», правка, удаление, поиск нужного сообщения, когда сначала спросить, лимиты. Когда: «напиши в чат», «отправь сообщение», «ответь в треде», «напиши в личку», «упомяни», «подготовь черновик, я отправлю сам», «напиши пост об изменениях», «запланируй сообщение», «напоминай в канал каждый понедельник», «отправь отчёт файлом .md», «перешли сообщение», «поставь реакцию», «закрепи сообщение», «отметь как важное», «исправь сообщение», "send a message", "reply in the thread", "DM someone", "draft for me to send", "schedule a message", "pin". Not for: search or summaries as the goal, a reminder for an employee → pachca-search; watch a thread, wait for replies → pachca-watch-thread; buttons, forms, clicks → pachca-bots; an AI agent as a bot → pachca-ai-agent; uploads from code → pachca-api./pachca-oauthАвторизация от имени сотрудника в Пачке (OAuth 2.0 с PKCE): когда боту нужен собственный токен сотрудника, вкладка OAuth, адреса возврата и набор прав, ссылка на авторизацию, обмен кода на токен, проверка владельца токена, хранение токена каждого сотрудника, повторная авторизация, отзыв доступа, список проверок перед запуском. Когда: «бот от имени сотрудника», «авторизация от имени сотрудника», «OAuth в Пачке», «client_id и client_secret», «redirect URI», «обменять код на токен», «PKCE», «экран согласия моего бота», «кнопка Предоставить доступ», «сотрудник отозвал доступ», «токен сотрудника вернул 401 или 403», "Pachca OAuth", "act on behalf of a user", "authorization code flow", "exchange code for token", "my bot's OAuth consent screen", "per-user token for my bot". Not for: a bot acting as itself, webhooks, showcase, a leaked bot token → pachca-bots; MCP sign-in, a 401/403 from an MCP tool or the CLI → pachca; your own token in a script → pachca-api; revoking access on the All tokens tab → pachca-admin.npx claudepluginhub pachca/openapi --plugin pachcaOther plugins' skills for the same job