← ClaudeAtlas

install-anti-sycophancylisted

Install a UserPromptSubmit + Stop hook pair that reminds the model to avoid sycophancy without bloating the system prompt.
a-canary/arc-agents · ★ 0 · AI & Automation · score 60
Install: claude install-skill a-canary/arc-agents
# install-anti-sycophancy The `anti-sycophancy` skill describes the rules. This installer wires them into the harness so they apply by default, without requiring the model to invoke the skill explicitly. ## What gets installed Two hooks in the harness settings (default: `~/.claude/settings.json`): 1. **UserPromptSubmit** — injects a one-line reminder before each user turn so the rules stay in attention. 2. **Stop** — runs a quick self-check on the final assistant message and logs sycophantic patterns for later review. ## Hook scripts written ### `~/.claude/hooks/anti-sycophancy-inject.sh` ```bash #!/usr/bin/env bash # UserPromptSubmit hook — emits a short reminder via stdout. cat <<'EOF' [anti-sycophancy] Reply directly. No validation openers, no hedging filler, no closing flattery. Disagree explicitly when warranted. EOF ``` ### `~/.claude/hooks/anti-sycophancy-check.sh` ```bash #!/usr/bin/env bash # Stop hook — scan the last assistant message for sycophancy patterns. # Reads transcript path from $CLAUDE_TRANSCRIPT_PATH (or arg 1). transcript="${CLAUDE_TRANSCRIPT_PATH:-${1:-}}" [[ -z "$transcript" || ! -f "$transcript" ]] && exit 0 last=$(tail -200 "$transcript" | tr -d '\r') patterns=( "Great question" "You're absolutely right" "That's a really" "Hope (this|that) helps" "Let me know if you'd like" "Just to clarify" ) hits=() for p in "${patterns[@]}"; do if echo "$last" | grep -Ei "$p" >/dev/null; then hits+=("$p") fi done if [[ ${#hits[@]} -g