# Goal Drift

> Use when running long tasks (10+ steps) to prevent goal drift. Injects active goal reminders via hook. Auto-triggers via goal-guard hook.

- Skill: `johnnylin2121/goal-drift` (Agent Skill)
- Install (CLI): `npx skillmds@latest add johnnylin2121/goal-drift`
- Raw SKILL.md: https://api.skillmd.com/api/skills/johnnylin2121/goal-drift/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Johnnylin2121 (https://skillmd.com/u/johnnylin2121)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/johnnylin2121/goal-drift

---


# Goal Drift Prevention

This skill works with the `goal-guard.ts` hook to keep agents focused during long tasks.

## How It Works

The `goal-guard` hook automatically injects the active goal and next step into every LLM turn. This prevents the common problem of forgetting the original task after 50+ tool calls.

## The Discipline

1. **Read the goal reminder** at the start of each turn
2. **Stay on task** — implement ONLY what the current task covers
3. **Don't gold-plate** — minimal implementation, not "while I'm here" improvements
4. **If you drift**, the goal reminder will catch it on the next turn

## Disabling Per-Session

Set environment variable: `MIMOCODE_GOAL_GUARD=0`

## Configuration

The hook reads from your checkpoint's §1 (Active Intent) and §2 (Next Action). Keep these sections updated for best results.

