npm.io
0.1.4 • Published 3 months ago

@sammybauch/swear-jar

Licence
MIT
Version
0.1.4
Deps
2
Size
44 kB
Vulns
0
Weekly
0

Swear Jar

An AI agent plugin that donates to charity when you swear. Automatic USDC payments on Base — your bad words fund good deeds.

Install

OpenClaw (via npm):

openclaw plugins install @sammybauch/swear-jar

Claude Code (from source):

git clone https://github.com/sbauch/swear-jar
cd swear-jar && npm install
claude --plugin-dir ./swear-jar

Then run /swearjar to configure.

How It Works

  1. A hook monitors every message you send
  2. When profanity or hostility is detected, the plugin sends USDC on Base to your configured destination
  3. Your agent acknowledges the violation with a playful quip

Payments happen automatically in the hook — no agent action needed.

Configuration

Run /swearjar to set up:

Destination
  • Swear Jar Community Fund — A community-managed Donor Advised Fund on Endaoment. Pooled fund for collective impact.
  • Custom address — Provide your own wallet address (0x...). Money accumulates for you to allocate later.
  • Search for a charity — Find a specific charity via The Giving Block. (Coming soon.)
Sensitivity
  • Cussing — Any swear word triggers, even "this is fucking awesome." Default.
  • Vibes — Only triggers when you're actually being hostile. Positive profanity gets a pass.
  • Max — Catches swear words AND hostile tone.
  • AI — AI reviews your conversation every few messages. Catches creative profanity and sarcasm.
Payment Providers
  • Bankrnpm install -g @bankr/cli then bankr login email
  • awal (Coinbase) — npx awal@2.0.3 auth login <email>
  • Locus — Register at paywithlocus.com
  • Manual — Just tracks violations, you handle payments yourself

Commands

  • /swearjar — Set up or reconfigure
  • /swearjar status — View config and violation history
  • /swearjar reset — Clear violations, keep config

Platforms

Works on both Claude Code and OpenClaw:

Claude Code OpenClaw
Hook UserPromptSubmit command hook before_prompt_build lifecycle hook
Commands Markdown in commands/ api.registerCommand()
Skills skills/swearjar/SKILL.md Same + inline
State ~/.claude/swearjar/state.json ~/.openclaw/workspace/swearjar-state.json

Security Notes

On install, OpenClaw may warn about "dangerous code patterns." This is expected — the plugin:

  • Uses child_process to call wallet CLIs (bankr, awal) for sending payments
  • Reads ~/.config/locus/credentials.json for Locus API auth
  • Makes network requests to our proxy API for charity lookup

These are required for the payment functionality. The plugin is open source — review the code if you have concerns.

License

MIT