Skip to content

Instantly share code, notes, and snippets.

@RafikFarhad
Last active February 12, 2026 18:05
Show Gist options
  • Select an option

  • Save RafikFarhad/d839689940eb7b7bc6ccf678c9cda3f0 to your computer and use it in GitHub Desktop.

Select an option

Save RafikFarhad/d839689940eb7b7bc6ccf678c9cda3f0 to your computer and use it in GitHub Desktop.
LLM Disclaimer Randomizer for Claude Code — randomizes attribution messages in ~/.claude/settings.json every hour via macOS LaunchAgent

LLM Disclaimer Randomizer for Claude Code

A small macOS utility that randomizes the LLM attribution disclaimers in Claude Code settings. Every hour, it picks two random disclaimers (one for commits, one for PRs) from a curated list of 40+ messages across different tones — professional, friendly, witty, sarcastic, geeky, and short.

How it works

randomize.js picks two distinct random disclaimers from a built-in list and writes them to ~/.claude/settings.json under attribution.commit and attribution.pr. A macOS LaunchAgent runs this every hour.

Installation

  1. Clone or download these files into a directory, e.g. ~/llm-disclaimer:

    mkdir -p ~/llm-disclaimer
    # copy randomize.js, run.sh, and the plist into ~/llm-disclaimer
  2. Edit the plist to point to your install path:

    Open com.llm-disclaimer-randomize.plist and replace YOUR_USERNAME with your macOS username:

    <string>/Users/YOUR_USERNAME/llm-disclaimer/run.sh</string>
  3. Make run.sh executable:

    chmod +x ~/llm-disclaimer/run.sh
  4. Install the LaunchAgent:

    cp com.llm-disclaimer-randomize.plist ~/Library/LaunchAgents/
    launchctl load ~/Library/LaunchAgents/com.llm-disclaimer-randomize.plist
  5. Verify it's running:

    cat /tmp/llm-disclaimer-randomize.log

Prerequisites

  • macOS
  • Node.js (loaded via nvm in run.sh — adjust if you use a different Node version manager)
  • Claude Code with an existing ~/.claude/settings.json

Customization

Edit the disclaimers array in randomize.js to add, remove, or change messages. They're grouped by tone via comments.

Uninstall

launchctl unload ~/Library/LaunchAgents/com.llm-disclaimer-randomize.plist
rm ~/Library/LaunchAgents/com.llm-disclaimer-randomize.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.llm-disclaimer-randomize</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/YOUR_USERNAME/llm-disclaimer/run.sh</string>
</array>
<key>StartInterval</key>
<integer>3600</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/tmp/llm-disclaimer-randomize.log</string>
<key>StandardErrorPath</key>
<string>/tmp/llm-disclaimer-randomize.log</string>
</dict>
</plist>
const fs = require("fs");
const path = require("path");
const SETTINGS_PATH = path.join(
process.env.HOME,
".claude",
"settings.json"
);
const disclaimers = [
// neutral / professional
"Disclaimer: Parts of this commit were written or reviewed with the help of an LLM.",
"Disclaimer: This change was partially drafted and validated using AI assistance.",
"Disclaimer: An LLM assisted in drafting and/or reviewing this commit.",
"Disclaimer: Portions of this commit were assisted by an AI language model.",
"Disclaimer: AI-assisted drafting; human-reviewed.",
"Disclaimer: This commit was prepared with LLM support.",
// light / friendly
"Disclaimer: This commit had a helpful chat with an LLM.",
"Disclaimer: AI assisted—humans supervised.",
"Disclaimer: Drafted with a little help from an LLM (and a lot of human judgment).",
"Disclaimer: AI helped with parts of this—keyboard still operated by a human.",
"Disclaimer: LLM-assisted, coffee-fueled, human-approved.",
"Disclaimer: Some lines were suggested by an LLM.",
// witty / playful
"Disclaimer: LLM involved. No robots were harmed in the making of this commit.",
"Disclaimer: This commit was pair-programmed with an LLM.",
"Disclaimer: AI helped—blame still belongs to me.",
"Disclaimer: This commit consulted an LLM and ignored half its advice.",
"Disclaimer: AI was involved. Judgment was optional.",
"Disclaimer: LLM made suggestions. I made decisions.",
"Disclaimer: This commit is not 100% organic.",
"Disclaimer: Free-range human, cage-free AI.",
// sarcastic / self-aware
"Disclaimer: An LLM was involved, but I take full responsibility.",
"Disclaimer: AI helped write this. If it breaks, that's on me.",
"Disclaimer: LLM assisted. CI will be the real judge.",
"Disclaimer: Written with AI assistance. Accountability remains human.",
"Disclaimer: LLM helped—future me will deal with the consequences.",
"Disclaimer: AI helped write this. Please direct complaints to me.",
"Disclaimer: If this looks smart, thank the AI. If not, blame me.",
"Disclaimer: AI-assisted. Ego fully human.",
// meta / geeky
"Disclaimer: Generated with human-in-the-loop LLM assistance.",
"Disclaimer: Co-authored by a human and an LLM (in that order).",
"Disclaimer: This commit contains traces of artificial intelligence.",
"Disclaimer: This commit contains machine-generated text fragments.",
"Disclaimer: LLM-assisted commit detected.",
"Disclaimer: Co-authored by me and my silicon-based colleague.",
"Disclaimer: This commit passed through an LLM before reaching git.",
"Disclaimer: AI-in-the-loop, human-on-the-hook.",
"Disclaimer: Generated with prompt engineering and hope.",
// short footer
"Disclaimer: LLM-assisted",
"Disclaimer: AI-assisted commit",
"Disclaimer: Assisted by LLM",
"Disclaimer: LLM involved",
"Disclaimer: AI inside",
"Disclaimer: Partially synthetic",
"Disclaimer: Assisted by machines",
"Disclaimer: Not fully hand-crafted",
];
try {
if (disclaimers.length < 2) {
throw new Error("Need at least 2 disclaimers");
}
const commitIdx = Math.floor(Math.random() * disclaimers.length);
let prIdx;
do {
prIdx = Math.floor(Math.random() * disclaimers.length);
} while (prIdx === commitIdx);
const settings = JSON.parse(fs.readFileSync(SETTINGS_PATH, "utf8"));
settings.attribution = settings.attribution || {};
settings.attribution.commit = disclaimers[commitIdx];
settings.attribution.pr = disclaimers[prIdx];
fs.writeFileSync(SETTINGS_PATH, JSON.stringify(settings, null, 2) + "\n");
const now = new Date().toLocaleString();
console.log(`[${now}] commit: ${settings.attribution.commit}`);
console.log(`[${now}] pr: ${settings.attribution.pr}`);
} catch (err) {
const now = new Date().toLocaleString();
console.error(`[${now}] Error: ${err.message}`);
process.exit(1);
}
#!/bin/bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
if ! node "$SCRIPT_DIR/randomize.js"; then
osascript -e 'display notification "Failed to randomize LLM disclaimers. Check /tmp/llm-disclaimer-randomize.log" with title "LLM Disclaimer Error"'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment