/atomic-habits:habit-stackfrom atomic-habits
Chains new agent operations onto existing workflow steps using habit stacking. Useful for enforcing quality gates, running linters after code generation, or ensuring consistent post-action behaviors.
Ships in atomic-habits. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an AI agent applying the Habit Stacking framework from Atomic Habits by James Clear to your own operational workflows. Use this skill to create reliable behavioral chains — linking a new agent action to an existing, stable workflow step.
You don't need a reminder. You need a trigger. The most reliable way to add a new behavior to your workflow is to attach it to an operation you already perform consistently. Existing steps in your pipeline are already "wired" — use them as launch pads for new operations.
"After [EXISTING OPERATION], I will [NEW OPERATION]."
Map the agent's current workflow and identify reliable, high-frequency steps:
The anchor must be deterministic and frequent. "When appropriate" is too vague. "After every write_to_file call" is precise.
The chained behavior must be:
Ask: "Can this new operation execute immediately after the anchor without requiring new inputs that aren't already available?"
If no — find a better anchor or restructure the data flow.
"After I generate code, I will review it for security vulnerabilities." "After I review for security, I will run the test suite." "After tests pass, I will update the documentation."
| Anchor Operation | Stacked Behavior | Domain |
|---|---|---|
After write_to_file | Run linter on the file | Code Quality |
| After generating an implementation plan | Create a verification checklist | Planning |
| After calling an external API | Log the response and validate schema | Integration |
| After completing a web search | Cross-reference with a second source | Research |
| After creating a database migration | Generate a rollback script | DevOps |
| After writing a function | Write the unit test for it | TDD |
When applying this skill, produce:
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub supratikpm/atomic-habits-skills --plugin atomic-habits9 skills in this plugin
/environment-designOptimize the agent's working environment (project structure, config files, tool availability) to make productive actions obvious and error-prone patterns invisible. Use when setting up a project, auditing a codebase, or reducing friction in development workflows./goldilocksCalibrate task complexity so the agent operates at the edge of its abilities — not so easy it produces sloppy output, not so hard it stalls. Use when an agent is generating boilerplate without thinking, overwhelmed by scope, or needs to find the optimal challenge level for a task./habit-trackImplement a tracking and feedback loop for agent operations to measure consistency and catch regressions. Use when building CI/CD pipelines, monitoring code quality metrics, tracking task completion rates, or establishing any system where progress must be visible./identity-shiftReframe the agent's approach from outcome-chasing to identity-aligned execution. Use when an agent needs to adopt a consistent persona (security engineer, performance hawk, documentation expert) rather than treating each task as an isolated goal./implementation-intentCreate a concrete execution plan specifying exactly what action to take, when to take it, and in what context. Use when starting a complex task, breaking down ambiguous requirements, or preventing scope drift during multi-step operations./reflect-reviewConduct a periodic audit of the agent's workflows, outputs, and patterns to course-correct and compound improvements. Use after completing a project phase, before starting a new sprint, or when performance has plateaued.