<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
supratikpm/atomic-habits-skills/habit-stacking
──Details
PublishedOctober 23, 2026 at 07:39 AM
Content Hashsha256:ee55ea5a92991c8e...
Git SHA54ac4c6212fe
──Files
Files (1 file, 3.3 KB)
SKILL.md3.3 KBactive
SKILL.md · 76 lines · 3.3 KB

version: "1.0.0"



name: habit-stack description: Chain agent operations by linking a new behavior to an existing workflow step. Use when building reliable multi-step pipelines, enforcing quality gates after code generation, or ensuring consistent post-action behaviors like linting, testing, or documentation.


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.

Core Principle

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.

The Habit Stacking Formula (Agent Version)

"After [EXISTING OPERATION], I will [NEW OPERATION]."

Step 1: Identify the Anchor Operation

Map the agent's current workflow and identify reliable, high-frequency steps:

  • After generating code
  • After reading a file
  • After completing a search
  • After running a command
  • After creating a plan
  • After making an API call

The anchor must be deterministic and frequent. "When appropriate" is too vague. "After every write_to_file call" is precise.

Step 2: Define the New Operation

The chained behavior must be:

  • Specific: Not "check for errors" but "run the linter on the modified file"
  • Atomic: One discrete tool call or cognitive step
  • Immediate: Executable directly after the anchor without context-switching

Step 3: Validate the Chain

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.

Step 4: Build Multi-Step Stacks

"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."

Agent-Native Examples

Anchor OperationStacked BehaviorDomain
After write_to_fileRun linter on the fileCode Quality
After generating an implementation planCreate a verification checklistPlanning
After calling an external APILog the response and validate schemaIntegration
After completing a web searchCross-reference with a second sourceResearch
After creating a database migrationGenerate a rollback scriptDevOps
After writing a functionWrite the unit test for itTDD

Anti-patterns to Watch For

  • Choosing an anchor that doesn't always execute (conditional branches)
  • Stacking a heavy operation on a lightweight anchor (e.g., full test suite after every line edit)
  • Creating circular chains (A triggers B triggers A)
  • Stacking without verifying that the anchor's output feeds the new operation's input

Output

When applying this skill, produce:

  1. The identified anchor operation in the current workflow
  2. The new behavior to chain
  3. The complete "After X, I will Y" statement
  4. Verification that the data flow supports the chain
All versions