whatsapp-automation: Command for Claude Code

.claude/commands/link-whatsapp.md

link-whatsapp is a command for Claude Code from sumioshi/whatsapp-automation. It costs 37 tokens per session (1,391 once invoked), scanned B, original, Apache-2.0.

A command that links the current code repository to a WhatsApp group or direct message and records that connection in the repository and a monitoring panel.

In plain words
What is it for?
It helps connect a repository to an available WhatsApp chat, save the link in project configuration, update the project instructions, and add it to the panel.
Why use it?
It gives coding-agent sessions a known conversation to consult when project information or decisions are discussed in WhatsApp.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

This is sumioshi/whatsapp-automation's own configuration. It tells Claude Code how to work on whatsapp-automation itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything whatsapp-automation configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sumioshi/whatsapp-automation. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sumioshi/whatsapp-automation/main/.claude/commands/link-whatsapp.md
Clone the repo
git clone --depth 1 https://github.com/sumioshi/whatsapp-automation

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for link-whatsapp

README.md
[![agentmods](https://agentmods.dev/badge/commands/sumioshi/whatsapp-automation/link-whatsapp/github.svg)](https://agentmods.dev/commands/sumioshi/whatsapp-automation/link-whatsapp)
Your own site
<a href="https://agentmods.dev/commands/sumioshi/whatsapp-automation/link-whatsapp"><img src="https://agentmods.dev/badge/commands/sumioshi/whatsapp-automation/link-whatsapp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for link-whatsapp

Your own site · 80×15
<a href="https://agentmods.dev/commands/sumioshi/whatsapp-automation/link-whatsapp"><img src="https://agentmods.dev/badge/commands/sumioshi/whatsapp-automation/link-whatsapp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 37 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,391 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00037 $0.01391
Opus 5.5 $0.00015 $0.00556
Sonnet 5.5 $0.00007 $0.00278
Haiku 4.5 $0.00004 $0.00139

Measured 2d ago against content hash c5d4dd61b6f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

link-whatsapp scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

`curl -s [auth] -X POST $PANEL/api/groups -H 'Content-Type: application/json' -d '{"id":"<jid>","watch":true}'`

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- **Local:** `curl -s --max-time 3 http://localhost:3000/api/links`. Se responder JSON, use
.claude/commands/link-whatsapp.md · 76 lines

How it starts

The opening of the file, as written. The whole thing — 76 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Você vai linkar o repositório atual (o cwd) a um grupo ou DM de WhatsApp, pra que qualquer Claude aberto neste repo já saiba qual conversa consultar via o MCP whatsapp-collector.

Caminho canônico — siga nesta ordem, não improvise:

  1. Descubra o cwd absoluto com pwd. Esse é o repoPath.

    Descubra também o repositório no GitHub: git remote get-url origin → converta pra owner/repo (aceita [email protected]:owner/repo.git, [email protected]:owner/repo.git e https://github.com/owner/repo.git). Se não houver remoto, github fica vazio e o agente de triagem não roda pra este chat até existir.

  2. Descubra o painel (híbrido: local → Railway). Nunca hardcode URL nem credenciais — descubra em runtime, nesta ordem:

    • Local: curl -s --max-time 3 http://localhost:3000/api/links. Se responder JSON, use PANEL=http://localhost:3000 sem auth.
    • Railway (se o local estiver fora): use o MCP railway — list_projects, ache o projeto do coletor de WhatsApp (ex.: whatsapp-collector), depois list_services e list_variables do serviço do painel/coletor. Das variáveis, tire: RAILWAY_PUBLIC_DOMAIN (→ PANEL=https://<domínio>) e PANEL_USER/PANEL_PASS (→ curl -u "$PANEL_USER:$PANEL_PASS" em toda chamada).
    • Se nenhum dos dois responder, pule direto pro fallback do passo 6 (lado do repo apenas).
  3. Liste os chats disponíveis. curl -s [auth] $PANEL/api/links → campo chats (cada um: slug, name, messageCount, tipo). Se a lista for grande, filtre por termos do projeto. Se o chat esperado não aparecer, provavelmente está sem watch no coletor — ative com curl -s [auth] -X POST $PANEL/api/groups -H 'Content-Type: application/json' -d '{"id":"<jid>","watch":true}' (o JID sai do MCP listar_grupos); a coleta começa dali pra frente e o slug segue o padrão kebab-case do nome. Mostre as opções relevantes ao usuário e pergunte qual é a conversa deste projeto. Não adivinhe.

  4. Confirme os campos com o usuário (curto): cliente (nome do cliente/projeto), tipo (dm, grupo ou projeto), notas (uma linha de contexto). Sugira o tipo a partir do slug (dm-… → dm).

  5. Grave o link. Caminho preferido — POST no painel, que já escreve os dois lados de uma vez (data/links.json central + .claude/whatsapp.json + linha no CLAUDE.md do repo):

    curl -s [auth] -X POST $PANEL/api/links \
      -H 'Content-Type: application/json' \
      -d '{"slug":"<slug>","repoPath":"<pwd>","cliente":"<cliente>","tipo":"<tipo>","notas":"<notas>","github":"<owner/repo>"}'
    

    Confira a resposta (deve voltar links com a entrada).

    ⚠️ Painel em outra máquina (nuvem): o repoPath é validado no filesystem do servidor, então um caminho local é rejeitado com "repoPath não existe". Isso NÃO quer dizer que o índice ficou indisponível — só que o servidor não alcança o seu repo. Faça o lado do repo você mesmo (passo 6) e repita o POST com "indexOnly": true:

    curl -s [auth] -X POST $PANEL/api/links \
      -H 'Content-Type: application/json' \
      -d '{"slug":"<slug>","repoPath":"<pwd>","cliente":"<cliente>","tipo":"<tipo>","notas":"<notas>","github":"<owner/repo>","indexOnly":true}'
    

    Assim o índice central fica completo e nada fica pendente.

  6. Lado do repo (sempre que o painel não alcançar seu filesystem, e no fallback de painel fora): faça você mesmo —

    • Escreva <pwd>/.claude/whatsapp.json com { "grupo": "<slug>", "cliente": "<cliente>", "tipo": "<tipo>", "notas": "<notas>", "github": "<owner/repo>" }.
    • No <pwd>/CLAUDE.md (crie se não existir), faça upsert do bloco entre os marcadores <!-- wa-link:start --> e <!-- wa-link:end -->, com uma linha tipo: "WhatsApp deste projeto: <slug> (). Consulte o histórico via MCP whatsapp-collector usando esse slug. 'Teve mensagem nova?': caixa_de_entrada com grupos: ["<slug>"] (barato; ler_mensagens só pra ler a conversa). Pra acompanhar ativamente, use /plantao. Detalhes em .claude/whatsapp.json."
    • Avise o usuário: o índice central (painel) não foi atualizado e por quê (fora do ar, ou validação de repoPath do painel na nuvem).

Read the full file on GitHub · 76 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago Changed · +6 lines c5d4dd61b6f0
  2. 2mo ago First seen · 70 lines · 37 tokens per session scan B a8e3873101d9

Subscribe to this mod's changes

link-whatsapp is a command published in the GitHub repository sumioshi/whatsapp-automation (2 stars, last pushed 7d ago), licensed Apache-2.0. It adds 37 tokens to every session and 1,391 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

link-whatsapp compared with commands from other repositories

link-whatsapp next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
link-whatsappsumioshi/whatsapp-automationCommand27d agoApache-2.0B37Claude Code
speckit.archive.runracecraft-lab/PaddockCommand124mo agoMITA16Claude Code
atrstractorjuice/arckit-claudeCommand7yesterdaynoneA17Claude Code
fr-rgpdtractorjuice/arckit-claudeCommand7yesterdaynoneA34Claude Code
performance-bottlenecksruvnet/sublinear-time-solverCommand932d agoMITA0Claude Code
flow-nexus-authruvnet/sublinear-time-solverCommand932d agoMITA11Claude Code
analyzerruvnet/sublinear-time-solverCommand932d agoMITA0Claude Code