Self Discipline
Guarantee instruction compliance with root cause analysis, flow verification, and automated validators that make future failures impossible.
by clawic★ 23 GitHub stars
Install Self Discipline in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Instructions written but never followed. Lessons logged but never read. The same mistakes repeated across sessions. This skill breaks that cycle permanently.
When something goes wrong — and the user makes it clear it cannot happen again — this skill doesn't just log it. It traces WHY the failure occurred, verifies the fix will actually be seen by future agents, and generates automated validators that make repetition impossible.
When to Use
User is frustrated that the agent ignored instructions. Something critical happened that cannot repeat. User explicitly says "this can never happen again" or "I told you not to..." User explicitly invokes /discipline to ensure compliance on a rule.
How It Works
┌──────────────────────────────────────────────┐
│ DISCIPLINE TRIGGER │
└──────────────────────────────────────────────┘
│
┌────────────────────┼────────────────────┐
▼ ▼ ▼
┌─────────┐ ┌──────────┐ ┌─────────┐
│ USER │ │ CRITICAL │ │ COMMAND │
│ UPSET │ │ FAILURE │ │ USED │
└────┬────┘ └────┬─────┘ └────┬────┘
│ │ │
│ "I told you..." │ Security breach, │ /discipline
│ "Why did you..." │ data loss... │
│ │ │
└───────────────────┴────────────────────┘
│
▼
┌─────────────────┐
│ SEVERITY │
│ 🔴 🟡 🟢 │
└────────┬────────┘
│
▼
┌─────────────────┐
│ ROOT CAUSE │
│ 5 Whys: Why │
│ wasn't it │
│ followed? │
└────────┬────────┘
│
▼
┌─────────────────┐
│ FLOW VERIFY │
│ Will next agent │
│ see the fix? │
└────────┬────────┘
│
▼
┌─────────────────┐
│ VALIDATOR │
│ Script that │
│ blocks action │
└────────┬────────┘
│
▼
┌─────────────────┐
│ COMPLETE │
│ Logged+Enforced │
└─────────────────┘
Setup
On first use, read setup.md for integration guidelines. Creates ~/Clawic/data/self-discipline/ for rules, validators, and enforcement logs.
Architecture
Memory lives in ~/Clawic/data/self-discipline/. See memory-template.md for structure.
~/Clawic/data/self-discipline/
├── memory.md # Status + severity thresholds + stats
├── rules.md # Active discipline rules (ALWAYS loaded)
├── incidents.md # Incident log with root cause analysis
├── validators/ # Executable validators
│ ├── pre-commit/ # Run before git commits
│ ├── pre-send/ # Run before sending messages
│ └── custom/ # Domain-specific validators
├── flow-analysis/ # Instruction flow traces
└── archive/ # Resolved incidents
Quick Reference
| Topic | File |
|---|---|
| Setup process | setup.md |
| Memory template | memory-template.md |
| Severity assessment | severity.md |
| Root cause protocol | root-cause.md |
| Flow verification | flow-verification.md |
| Validator patterns | validators.md |
Core Rules
1. Detect Severity Immediately
When triggered, assess severity FIRST:
| Level | Indicators | Response |
|---|---|---|
| 🔴 CRITICAL | User angry, security risk, data loss, broken prod, financial impact | Full analysis + MANDATORY validator |
| 🟡 MEDIUM | User frustrated, wasted time, incorrect output | Full analysis + instruction fix |
| 🟢 LOW | User annoyed, preference violated | Log + monitor |
Default to one level higher if uncertain.
2. Root Cause Before Solution
Never jump to "I'll remember that." Instead:
- What exactly failed? — Be specific
- What was the instruction? — Quote it verbatim
- Where was the instruction? — Path + line number
- Why wasn't it followed? — 5 Whys:
- Why? → Not loaded in context
- Why? → File not in session's read path
- Why? → No reference in AGENTS.md / system prompt
- Why? → Setup assumed it would be read
- Why? → No verification mechanism
3. Verify Flow Reachability (CRITICAL)
After identifying where the instructi
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
Bundled files
- _meta.json
- flow-verification.md
- memory-template.md
- root-cause.md
- setup.md
- severity.md
- validators.md
FAQ
What does the Self Discipline skill do?
Guarantee instruction compliance with root cause analysis, flow verification, and automated validators that make future failures impossible.
How do I install the Self Discipline skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the Self Discipline skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…