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
- A hook monitors every message you send
- When profanity or hostility is detected, the plugin sends USDC on Base to your configured destination
- 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
- Bankr —
npm install -g @bankr/clithenbankr 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 |
Links
Security Notes
On install, OpenClaw may warn about "dangerous code patterns." This is expected — the plugin:
- Uses
child_processto call wallet CLIs (bankr, awal) for sending payments - Reads
~/.config/locus/credentials.jsonfor 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