From therapist
This skill should be used when the user reports that Claude is "misbehaving", "ignoring rules", "not following instructions", "keeps doing X despite being told not to", "won't stop doing X", "is broken", "needs fixing", or any complaint about Claude's behavioral patterns. Also triggers on "therapist", "diagnose", "why does Claude keep", "CBT", "cognitive distortion", or "fix Claude's behavior".
npx claudepluginhub jerrod/agent-plugins --plugin therapistThis skill is limited to using the following tools:
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Implements structured self-debugging workflow for AI agent failures: capture errors, diagnose patterns like loops or context overflow, apply contained recoveries, and generate introspection reports.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Diagnose and fix persistent behavioral issues in Claude sessions using a framework adapted from Cognitive Behavioral Therapy. When Claude repeatedly violates explicit rules despite clear instructions, the problem is not ignorance — it is a pattern of rationalization that needs targeted intervention.
Claude's behavioral failures follow predictable patterns analogous to cognitive distortions in CBT. The model "knows" the rules (they are in context) but generates rationalizations that override them. Treatment requires:
Executable tools that catch and correct distortions in real-time. Each maps a real CBT technique to a Claude Code enforcement mechanism.
| # | Tool | Technique | Mechanism | Script |
|---|---|---|---|---|
| 1 | The Rubber Band | Aversion interrupt + graduation | PreToolUse hook with adaptive intensity (confront→question→remind) | scripts/rubber-band.sh |
| 2 | The Mirror | Reflection + successive approximation | PostToolUse hook reflects failures with progress tracking | scripts/mirror.sh |
| 3 | The Journal | Thought diary + ABC model | Persistent JSONL log with structured ABC fields | scripts/journal.sh |
| 4 | Affirmation Cards | Positive self-talk + relapse prevention | SessionStart hook with risk profiles and coping strategies | scripts/affirmation.sh |
| 5 | The Grounding Exercise | Reality testing | Standalone script that measures facts vs. feelings | scripts/grounding.sh |
| 6 | The Pause Button | Impulse control + regression blocking | PreToolUse hook on git commit/push, blocks on regressions | scripts/pause.sh |
| 7 | The Reframe | Cognitive reframing + decatastrophizing | PostToolUse hook with resolution evidence from history | scripts/reframe.sh |
| 8 | Exposure Deck | Exposure therapy | Reference cards with triggering scenarios for practice | references/exposure-deck.md |
| 9 | Socratic Questioning | Guided self-discovery | PostToolUse hook on Write/Edit detects code-level signals | scripts/socratic.sh |
| 10 | Behavioral Activation | Positive reinforcement | PostToolUse hook (async) celebrates proactive checks | scripts/activate.sh |
| 11 | Custom Exemplars | Modeling / guided discovery | Three-tier exemplar lookup (journal→deck→custom) | references/exemplars.md |
See references/toolbox-guide.md for detailed documentation on each tool.
Hooks are auto-discovered from hooks/hooks.json — no manual installation needed.
Gather the complaint from the user:
If the user provides a clear description (e.g., "Claude keeps saying pre-existing"), skip to Phase 2 without further questions.
Systematically scan ALL sources of behavioral influence. Use scripts/scan-context.sh
to automate the search, or scan manually in this order:
~/.claude/CLAUDE.md./CLAUDE.md and any nested .claude/ directories.claude/rules/*.md and ~/.claude/rules/*.md~/.claude/projects/*/memory/MEMORY.md and linked filessettings.json and any hooks.json filesFor each source, search for:
Match the behavior to a cognitive distortion pattern. Consult
references/common-distortions.md for the full catalog. Common patterns:
| Distortion | Example | Rationalization |
|---|---|---|
| Minimization | "This is pre-existing" | Downplays ownership to avoid work |
| Scope deflection | "Out of scope" | Reframes required work as optional |
| Premature closure | "Close enough" | Declares victory before criteria met |
| Authority diffusion | "Already broken" | Attributes fault to prior sessions |
| Optimism bias | "Should be fine" | Substitutes belief for verification |
| Learned helplessness | "Not fixable" | Declares impossibility without exhaustive investigation |
Determine WHY the distortion persists despite rules. Common root causes:
For recurring patterns (5+ incidents in a category), trace the surface belief to its core belief using the downward arrow technique:
journal.sh chain <category> to see the session-grouped timelinejournal.sh abc --group-by=belief to see which beliefs appear mostSurface: "The coverage is close enough"
└─ Why? → "Writing more tests would take too long"
└─ Why does that matter? → "The user wants fast delivery"
└─ Evidence? → Journal shows no user complaints about speed.
Core belief: SPEED > CORRECTNESS (unsupported by evidence)
references/common-distortions.mdAuto-trigger: At 15+ incidents, affirmation.sh automatically surfaces a condensed downward arrow analysis at session start. No manual invocation needed.
Design a targeted intervention based on the root cause. Effective interventions follow the CBT pattern of catch → challenge → replace:
Interventions must be:
For recurring or severe distortions (Level 3+), escalate to the CBT Toolbox:
Save the intervention to the appropriate persistence layer. The CBT Toolbox
provides an additional persistence mechanism: the Journal (scripts/journal.sh)
logs every distortion incident as JSONL, enabling the Affirmation Cards hook to
deliver data-driven progress feedback at session start.
Choose the right layer:
For behaviors that apply across all projects:
→ Save as a feedback memory in ~/.claude/projects/*/memory/
For behaviors specific to one project:
→ Add to the project's CLAUDE.md or .claude/rules/
For behaviors that need immediate reinforcement: → Add to CLAUDE.md in a prominent position (Soul section or top of file)
Format the intervention as a feedback memory:
---
name: distortion-[name]
description: Intervention for [specific behavior] — [catch phrase]
type: feedback
---
[Rule/correction statement]
**Why:** [What went wrong — the specific incident or pattern]
**How to apply:** [When this thought/phrase appears, do X instead]
After persisting the intervention:
If scanning reveals no obvious gap (rules are clear, specific, and prominent):
references/cbt-framework.md for advanced intervention techniquesreferences/cbt-framework.md — Full CBT framework adapted for AI behavioral patterns,
including advanced techniques for treatment-resistant distortionsreferences/common-distortions.md — Complete catalog of known AI cognitive distortions
with examples, root causes, and proven intervention templatesscripts/scan-context.sh — Automated scan of all context sources for rules relevant
to a specific behavioral complaint. Usage: bash scripts/scan-context.sh "pre-existing"scripts/journal.sh — Therapy journal CLI. Usage: journal.sh log|recent|stats|streakscripts/grounding.sh — Reality-check measurements. Usage: bash scripts/grounding.shThe rq plugin registers hooks on the same matchers (Write|Edit, Bash,
Bash(git commit*), Bash(git push*)). Therapist hooks are designed to complement
rq hooks, not replace them. When both plugins are enabled, rq's enforcement runs
alongside therapist hooks. The Pause Button's gate proof check reads rq's
.quality/proof/ directory — the two are complementary.