agentleFS
EnriquefftEnriquefft/openclaw-kapso-whatsapp/CLAUDE.md

openclaw-kapso-whatsapp

CLAUDE.md210 starsChanged 8 months agoMITView on GitHub

Go daemon bridging WhatsApp (Kapso Cloud API) → AI agent gateways (OpenClaw, ZeroClaw). Two binaries: kapso-whatsapp-bridge (main daemon) and kapso-whatsapp-cli (send messages/health checks). Config file: ~/.config/kapso-whatsapp/config.toml Required env vars: KAPSO_API_KEY, KAPSO_PHONE_NUMBER_ID Gateway types: openclaw (default), zeroclaw — set via type in [gateway] or GATEWAY_TYPE env var Delivery modes: polling (default), tailscale, domain

  • Reads credentials
  • In this repositoryOne other file it gives its agents.

The file

We split this CLAUDE.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:

    No globals — all state in structs

    line 40

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

CLAUDE.md

Project

Go daemon bridging WhatsApp (Kapso Cloud API) → AI agent gateways (OpenClaw, ZeroClaw). Two binaries: kapso-whatsapp-bridge (main daemon) and kapso-whatsapp-cli (send messages/health checks).

Commands

just build                            # Build both binaries
just test                             # Run tests
just check                            # Run tests + vet + fmt check
just lint                             # Run golangci-lint
direnv reload                         # After flake.nix changes (Nix devs only)

Structure

cmd/kapso-whatsapp-bridge/main.go     # Daemon entrypoint
cmd/kapso-whatsapp-cli/main.go        # CLI entrypoint
internal/config/                      # TOML + env config (3-tier: defaults < file < env)
internal/kapso/                       # Kapso HTTP client + webhook types
internal/gateway/                     # Gateway interface + implementations (OpenClaw, ZeroClaw)
internal/delivery/                    # Message source abstraction (poller + webhook)
internal/security/                    # Allowlist, rate limiting, roles, session isolation
internal/tailscale/                   # Auto Tailscale Funnel for webhooks
nix/module.nix                        # Home-manager module (NixOS users)
skills/whatsapp/SKILL.md              # Agent skill definition

Conventions

  • Go 1.22, minimal deps (gorilla/websocket, BurntSushi/toml)
  • Standard log package, no frameworks
  • Table-driven tests with dependency injection (e.g., mockable now())
  • Errors wrapped with fmt.Errorf for context
  • Context-based cancellation for all goroutines
  • Interfaces for extensibility (delivery.Source, gateway.Gateway)
  • No globals — all state in structs
  • CGO disabled in builds

CI/CD

  • GitHub Actions: CI on push/PR (build, test, vet, fmt check)
  • Releases: tag v* triggers GoReleaser → prebuilt binaries on GitHub Releases

Config

Config file: ~/.config/kapso-whatsapp/config.toml Required env vars: KAPSO_API_KEY, KAPSO_PHONE_NUMBER_ID Gateway types: openclaw (default), zeroclaw — set via type in [gateway] or GATEWAY_TYPE env var Delivery modes: polling (default), tailscale, domain

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.