agentsclimarketplace

How it works

Skill cmg8431/claude-dejavu/plugin/skills/how-it-works

๐Ÿ”ฎ Claude Code antipattern detector & auto-patcher โ€” learns from session logs, patches CLAUDE.md, tracks rule effectiveness

Install
npx -y skills add cmg8431/claude-dejavu --skill how-it-works

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Explain how claude-dejavu detects antipatterns and learns rules. Use when the user asks "how does dejavu work?" or "what is this thing doing?".

SKILL.md

2.1 KB, as published. Nobody here has run it

How claude-dejavu works

Explain the following to the user:

What it does

claude-dejavu watches your Claude Code sessions for repeated mistakes. When it detects a pattern โ€” like the same error happening across sessions, or code being reverted back and forth โ€” it creates a rule and patches your CLAUDE.md so Claude doesn't make that mistake again.

The 3-step loop

[Session Logs]          [Pattern Detection]        [Rule Suggestion]
tool usage data  โ”€โ”€โ–ถ  antipattern detectors  โ”€โ”€โ–ถ  CLAUDE.md patch
     โ–ฒ                                                  โ”‚
     โ”‚               [Effectiveness Tracking]            โ”‚
     โ””โ”€โ”€โ”€โ”€โ”€โ”€  rule fire counting  โ—€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

3 Detectors (v0)

  1. Revert Cycle โ€” Claude edits a file, then someone reverts it, then Claude edits it again. Sign that Claude isn't checking existing logic before changing things.

  2. Repeated Error โ€” The same error message keeps appearing across sessions (e.g., "command not found: npm" in a pnpm project). Claude keeps falling into the same trap.

  3. Silent Fix โ€” Claude finishes work, then the user quietly edits the same file without saying anything. The user is correcting Claude's output through action, not words. This is the killer feature that differentiates dejavu from other tools.

Where data lives

  • Rules database: ~/.local/share/claude-dejavu/dejavu.db (SQLite)
  • Session buffers: ~/.local/share/claude-dejavu/buffers/ (temporary)
  • Output: CLAUDE.md in your project root

Rule format in CLAUDE.md

<!-- dejavu:rule id=r-001 -->
<!-- dejavu:evidence sessions=[a3f, 9d2] confidence=0.91 fires=4 -->

- This project uses pnpm, not npm. Run pnpm install not npm install.
  โ†ณ Learned from 4 repeated errors across 3 sessions.

The HTML comments are metadata that Claude ignores but dejavu reads/writes for tracking.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.