Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Development

doc-drift

Use this skill when the user wants to audit the memory and documents Claude Code loads into context — CLAUDE.md (user global + project + nested), MEMORY.md, @imports, .claude/skills, .claude/agents, .claude/commands, installed plugins — and detect three kinds of issues: outdated claims, mutually contradictory statements, and risky-or-ambiguous wording. Produces a prioritized improvement list at `.drift-reports/`. Zero config. Trigger phrases: "doc drift", "memory drift", "memory audit", "context drift", "docs audit", "문서 점검", "문서 감사", "메모리 감사", "메모리 점검", "outdated 문서", "문서 충돌". NOT for: exhaustive content audit of an entire area (→ full-audit) · harness maturity scoring (→ check-harness) · single-file verification (→ verification). doc-drift only covers drift (contradiction/staleness/risky wording) in already-loaded context.

AlexZio00 · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add AlexZio00/sovereign-skills --skill doc-drift

About this skill


skill_type: analysis tools: Read, Write, Glob, Grep triggers:

  • "/doc-drift"
  • "문서 정합성"
  • "docs 체크" name: doc-drift context: fork user_invocable: true description: | Use this skill when the user wants to audit the memory and documents Claude Code loads into context — CLAUDE.md (user global + project + nested), MEMORY.md, @imports, .claude/skills, .claude/agents, .claude/commands, installed plugins — and detect three kinds of issues: outdated claims, mutually contradictory statements, and risky-or-ambiguous wording. Produces a prioritized improvement list at .drift-reports/. Zero config. Trigger phrases: "doc drift", "memory drift", "memory audit", "context drift", "docs audit", "문서 점검", "문서 감사", "메모리 감사", "메모리 점검", "outdated 문서", "문서 충돌". NOT for: exhaustive content audit of an entire area (→ full-audit) · harness maturity scoring (→ check-harness) · single-file verification (→ verification). doc-drift only covers drift (contradiction/staleness/risky wording) in already-loaded context. depends_on: skills: [] agents: [] files:
    • CLAUDE.md
    • memory/MEMORY.md concurrency_profile: read_only: false concurrency_safe: false destructive: low not_for:
  • "Memory reorganization -> memory-dream"
  • "Skill audit -> forge --audit" see_also:
  • skill: memory-dream relation: "doc-drift=document consistency, memory-dream=memory reorganization"

doc-drift — Claude memory audit

Purpose

Scan the memory and documents Claude loads for this project, and surface what's stale, what contradicts something else, and what's risky or ambiguous — sorted by priority.

Memory verification: the CLAUDE.md / MEMORY.md / rules files this skill reads are past-point-in-time snapshots. Verify current state with Glob/Read before acting — never assume "it's in memory, so it must still be true" (per memory-discipline principles).

Dominant Variable

False-positive rate — if a finding turns out to be wrong, the person stops trusting the report and the tool itself gets abandoned. One false positive outweighs one missed real issue.

Trigger

  • /doc-drift
  • "문서 정합성"
  • "docs 체크"

Discard If

  • The project has neither CLAUDE.md nor MEMORY.md (nothing to audit)
  • The user just finished manual cleanup and wants an immediate re-audit (drift needs time to accumulate — recommend at least a 24h gap)
  • The project has fewer than 10 files (audit cost exceeds the benefit)

Key Assumptions

This skill runs on the following assumptions (per reasoning-standard principles):

  1. Filesystem access is available — Read/Glob/Grep must work. If broken: fail-fast (report the missing tool).
  2. The CLAUDE.md @import token convention is honored — @path syntax resolves per the standard spec. If broken: graceful degrade (warn + flag any import it couldn't resolve).
  3. .drift-reports/ is writable — create it if missing. If broken: fall back to /tmp or stdout.

Workflow

Step 0 — Deterministic pre-filter

Before the LLM read, run two grep-based scans over the same starting-point files Step 1 targets (CLAUDE.md, MEMORY.md, skills/agents/commands) — a lightweight Glob/Grep pass that doesn't need Step 1's full @import expansion to run first. No new tools, same Read/Glob/Grep this skill already uses. Sorting "what can be counted mechanically" from "what needs a judgment call" keeps the model's read in Step 2 focused and cheap.

  1. Ambiguous-wording density scan — grep for a fixed hedge-phrase list ("use your judgment", "as appropriate", "depending on the situation", "if needed", "generally", open-ended delete/override instructions with no explicit scope) and count hits per file. Files above the density threshold become pre-flagged Risky/Ambiguous candidates.
  2. CLAUDE.md-as-machine-prompt linter — CLAUDE.md is a machine prompt, not documentation prose. Flag paragraphs that read as background/rationale with no attached actionable instruction (no imperative verb, no explicit scope, nothing a model could act on) — that shape is itself Risky/Ambiguous.

Both scans produce supporting evidence only for the Risky/Ambiguous row in Step 2 — a high hit-count raises suspicion, it doesn't decide inclusion. The confidence ≥80% gate stays the actual gate (see Invariants); Step 0 output without a corroborating LLM read is not a finding on its own.

Step 1 — Gather what gets loaded

Collect every file Claude Code actually loads or can reference in this project's context. No scripts — use Read/Glob/Grep directly.

Starting points

  • ~/.claude/CLAUDE.md (if present)
  • <cwd>/CLAUDE.md + nested **/CLAUDE.md
  • ~/.claude/projects/<encoded-cwd>/memory/MEMORY.md
    • Encoding: replace / in the cwd's absolute path with -. Example: /foo/bar → -foo-bar
    • Windows: also replace the drive colon and \ with -. Example: C:\project → C--project (one colon + one backslash = two hyphens). If unsure, Glob ~/.claude/projects/* to check the actual directory name.
  • <cwd>/.claude/skills/**/SKILL.md
  • <cwd>/.claude/agents/*.md
  • <cwd>/.claude/commands/*.md
  • ~/.claude/plugins/** (skills/agents/commands of installed plugins)

Expansion From each file, extract and recursively follow:

  • @import tokens (resolve user-global ones relative to ~/.claude/, others relative to the file's directory or the project root)
  • Relative markdown links [text](./path.md)
  • File paths mentioned inside backticks (only if they actually exist)

Keep collecting until no new nodes appear. Verify current state — re-check with Glob that existing referenced paths still exist (per memory-discipline principles).

Step 2 — Detect three things

Read every audited file and look for only these three things:

KindCriterion
OutdatedA claim that no longer matches the actual code/config (paths, commands, numbers, policy, versions, etc.)
**
Read the complete source ↗