# Seven Habits Coding

> Use when designing or auditing AI coding workflows, deciding human/AI division of labor, diagnosing why Claude Code output feels reactive/off-target/low-quality, or onboarding to a new project and choosing which collaboration disciplines to enforce. Maps Stephen Covey's 7 Habits onto Claude Code practices as a diagnostic mental model.

- Skill: `xiaot945/seven-habits-coding` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add xiaot945/seven-habits-coding`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xiaot945/seven-habits-coding/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: xiaot945 (https://skillmd.com/u/xiaot945)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/xiaot945/seven-habits-coding

---


# Seven Habits for AI Coding

## Overview

Mental model that maps Stephen Covey's *7 Habits of Highly Effective People* onto AI-assisted development with Claude Code. Use as a **diagnostic checklist** when your AI workflow feels chaotic, reactive, or produces low-quality output — not as a ritual to perform on every task.

Core principle: the 7 habits are **principles, not procedures**. They tell you *which discipline is missing*; the existing skills/tools tell you *how to fix it*.

## When to Use

- Auditing your Claude Code workflow for blind spots
- Onboarding a new project — which habits should I bring?
- AI output feels off and you need to find the missing discipline
- Designing team practices for AI-assisted engineering
- Post-mortem after a botched AI task
- Deciding human-vs-AI division of labor on a new task

**Don't use** for routine single-file edits, narrow bug fixes, or one-shot questions — reach for the specific debug/test/docs skill instead.

## The Mapping

| # | Habit (Covey) | AI Coding Practice |
|---|--------------|-------------------|
| 1 | 积极主动 (Be Proactive) | Curate `CLAUDE.md` / `MEMORY.md` / `lessons.md` *before* AI fails. Set up hooks before reactive fixes. Capture corrections as durable memory the moment they happen. Focus on the circle of influence (your prompt, your context, your rules) rather than blaming the model. |
| 2 | 以终为始 (Begin with End in Mind) | Plan mode + spec/acceptance criteria before prompting. TDD: tests are the spec. Define "done" before starting. Mental creation precedes physical creation. |
| 3 | 要事第一 (Put First Things First) | TodoWrite + Quadrant-II discipline. No scope creep mid-task. Architecture decisions *before* the crunch, not during. One battle at a time (don't refactor while debugging). |
| 4 | 双赢思维 (Think Win-Win) | Match work to actor: **human** = judgment, context, ambiguity, "is this the right problem"; **AI** = speed, breadth, mechanical transformation, "execute the plan". Don't micromanage execution; don't outsource judgment. |
| 5 | 知彼解己 (Seek First to Understand) | Read existing code/docs *before* editing. Use `deep-code-read`, `codebase-onboarding`, `context7` for library APIs. Read failing tests fully. Verify APIs — never let the model guess. |
| 6 | 统合综效 (Synergize) | Parallel subagents for independent work. `adversarial-review` / `ultrareview` for risky changes. Mix models (Opus thinks, Sonnet executes, Haiku batches). Cross-check across agents (codex + claude). |
| 7 | 不断更新 (Sharpen the Saw) | Renew across 4 dimensions: **tooling** (`/update`, hook upgrades), **knowledge** (`retro`, `learn`, continuous-learning), **principles** (audit `lessons.md`, prune stale rules), **collaboration** (promote project-scoped patterns to global). |

## Diagnostic Table — Symptom → Missing Habit

When AI output feels off, find the failing habit, then apply the corresponding skill.

| Symptom | Missing | Apply |
|---------|---------|-------|
| AI repeats the same mistake across sessions | 1 | Write to `lessons.md` / `MEMORY.md` |
| AI dives in, ends up wrong direction | 2 | Plan mode, write spec first |
| Task drifts; "while we're here" creep | 3 | TodoWrite, defer non-critical to backlog |
| You're rewriting every line AI produces | 4 | Wrong split — give AI a clearer mechanical task or take judgment back |
| AI hallucinates APIs / fabricates code | 5 | Force `context7` / `deep-code-read` before edits |
| Risky change shipped without challenge | 6 | `adversarial-review` / `ultrareview` |
| Same mistakes month after month | 7 | `retro` + prune `lessons.md` |

## Pre-Task Heuristic (3 questions)

Before any non-trivial AI task, answer:

1. **Habit 2** — Do I have a written plan / spec / acceptance criteria?
2. **Habit 5** — Has the AI (or have I) actually read the relevant existing code?
3. **Habit 6** — Is this risky enough to need a second perspective?

**If two or more answers are "no," stop and address before continuing.**

## Habit → Skill/Tool Cheatsheet

| Habit | Concrete skills/tools to reach for |
|-------|-----------------------------------|
| 1 Proactive | edit `~/.claude/CLAUDE.md`, `lessons.md`, `learn`, `update-config` (hooks), `promote` |
| 2 End in Mind | `plan`, EnterPlanMode, `superpowers:writing-plans`, `tdd`, `superpowers:test-driven-development` |
| 3 First Things First | TodoWrite, TaskCreate, `freeze` (focus boundary), `unfreeze` |
| 4 Win-Win | judgment in main thread; execution via Agent subagents (one task per subagent) |
| 5 Understand First | `deep-code-read`, `codebase-onboarding`, `context7`, project deep-read skills (e.g. `ada-dr-*`) |
| 6 Synergize | `adversarial-review`, `ultrareview`, `superpowers:dispatching-parallel-agents`, `codex`, `plan-*-review` family |
| 7 Sharpen | `retro`, `learn`, `continuous-learning`, `sessions`, `/update`, `gstack-upgrade` |

## Common Mistakes

1. **Ritualizing without judgment.** Principles, not a checklist. A 5-minute fix should not become a 1-hour ceremony — that itself is a habit-3 failure.
2. **Skipping habit 5 because "the model knows the codebase."** It doesn't. Force it to read first; verify before suggesting.
3. **Confusing 4 and 6.** Win-Win = role boundaries between human and AI. Synergy = combining outputs across multiple agents/models. Both matter; neither replaces the other.
4. **Treating habit 7 as optional.** Without renewal the other six decay quietly: stale lessons stop firing, hooks lag tooling, principles drift from current practice.
5. **Using all 7 every time.** That's habit 3 violating itself. Pick the one or two that matter for *this* task.

## When NOT to Apply

- Ten-second edits, typo fixes, single-line changes
- Throwaway prototypes where rigor costs more than rework
- The user explicitly asked for raw code, not a methodology
- A specific skill (debug, test, security) already covers the discipline you need

