# Drift Check

> Detect documentation drift (docs out of sync with code). Use after changes, periodically, or when something feels wrong. Returns severity-rated findings with specific fixes.

- Skill: `majiayu000/drift-check` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add majiayu000/drift-check`
- Raw SKILL.md: https://api.skillmd.com/api/skills/majiayu000/drift-check/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing, Research & Search
- Author: majiayu000 (https://skillmd.com/u/majiayu000)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/majiayu000/drift-check

---


# Drift Check

Detect documentation rot by comparing code reality against documented expectations.

## When to Use

- After completing a feature or bug fix
- Before starting work on unfamiliar area
- When behavior doesn't match expectations
- Periodically (weekly recommended)

## Severity Levels

| Severity | Areas | Action Required |
|----------|-------|-----------------|
| 🔴 Critical | Auth/RLS wrong, billing docs incorrect, schema mismatch | Fix immediately |
| 🟠 High | Server action undocumented, invariant violated | Fix this session |
| 🟡 Medium | Route missing from surfaces, stale checklist | Fix soon |
| 🟢 Low | Minor description inaccuracy | Track |

## Check Categories

1. **Server Actions vs Docs** — Actions exist in code but not documented (or vice versa)
2. **Routes vs User Surfaces** — Routes exist but not in feature doc tables
3. **Schema vs Data Model** — Tables/columns don't match docs
4. **RLS vs Permissions Docs** — Policies undocumented or incorrect
5. **Invariants vs Reality** — Can't find code enforcing documented invariants
6. **Workflow Steps vs UI** — Documented steps don't match actual UI

## Quick Check Commands

```bash
# Count server actions
find app/actions -name "*.ts" | wc -l

# Count routes
find app -name "page.tsx" | wc -l

# Recent migrations (verify reflected in docs)
ls -lt supabase/migrations/ | head -5
```

## Output

```markdown
## Drift Check Report — [date]

**Scope**: [full / feature-name]

| Severity | Count |
|----------|-------|
| 🔴 Critical | [n] |
| 🟠 High | [n] |
| 🟡 Medium | [n] |
| 🟢 Low | [n] |

### Issues Found
[For each issue: category, location, finding, remediation]

### No Drift Found
[Areas checked with no issues]
```

## Related

- Detailed check procedures: See [reference/check-procedures.md](reference/check-procedures.md)
- Remediation templates: See [reference/remediation-templates.md](reference/remediation-templates.md)
- Severity scoring matrix: See [reference/severity-matrix.md](reference/severity-matrix.md)
- After finding drift: Run `/doc-update` to fix

