agentsclimarketplace

Engram mistakes

Skill NickCirv/engram-skill-pack/skills/engram-mistakes

Surface bi-temporal mistakes from this repo's history — what you used to believe vs what's now true. Auto-fires before risky Edit/Write/Bash to inject past corrections into context.From its SKILL.md

Install
npx -y skills add NickCirv/engram-skill-pack --skill engram-mistakes

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

  • 0 stars0 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 file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

7.6 KB, ~1.9k tokens by cl100k_base, as published. Nobody here has run it

engram-mistakes

Read this when about to modify code that has historical regret. The skill shells engramx mistakes and renders a bi-temporal block: what was believed at the time of the original change, when that belief was falsified, what the truth is now, and which pattern the lesson applies to.

It is the fastest way to stop your agent from repeating a mistake the repo has already burned to fix.

Layer 1 — Control Dials

Three parameters control every invocation. Override from user request or infer from context.

DialDefaultScale
Window90 days1 = today only. 5 = last 30d. 8 = last 90d. 10 = all-time. Older mistakes have less signal — the v9 schema's validUntil field auto-suppresses entries whose source code was refactored away.
Modereactive1-3 = react only to explicit user questions. 4-7 = react + PreToolUse on Edit/Write. 8-10 = react + PreToolUse on Edit/Write/Bash + deny risky operations (strict guard mode).
Depth5How many mistakes to surface per invocation. 1 = top one only. 5 = bi-temporal pre-mortem default. 20 = full audit listing.

Override rules: mode → 1-3 when the file path is in node_modules, dist, build, .next, .nuxt, or coverage. Window → 5 when the user asks "lately" or "recent". Depth → 1 when the tool surface is a one-line edit and noise must stay low.

Layer 2 — Core Principles

  1. Bi-temporal first. Every output must distinguish then-believed from truth-now. A flat single-line "X was a mistake" is the v3.x fallback — only used when the v9 fields are absent. Never invent the bi-temporal fields; if they're not in the graph, fall back legacy.
  2. Pattern over instance. The applies-to field describes the kind of mistake (e.g. "useReducer + async + form-event handlers"). That's what trips the next agent, not the specific commit SHA. Lead with pattern in the heading.
  3. Fail open, never silent. A missing engramx, corrupt graph.db, or unreachable mistake record never blocks an edit. Wrap every IO in try/catch; on failure emit zero output and let the operation proceed.
  4. Proactive trumps reactive. A Mistake #1 warning that fires before Claude edits the file is worth ten warnings the user has to ask for. The PreToolUse hook does the proactive work. The CLI direct-invoke is the reactive surface for audits.
  5. Truncate, don't bury. Surface the top depth entries. A 47-mistake list is noise — engram surfaces a "+42 more" indicator and trusts the user to ask for engramx mistakes --full if they want the dump.

Layer 3 — Decision Tree

What's the trigger?
├── User question matches /have i made this|any mistakes|past attempt|did i try/i
│   ├── File context detected from current message  → engramx mistakes -p . --source <file>
│   └── No file context                              → engramx mistakes -p . --since 30d
├── PreToolUse Edit / Write
│   ├── file_path matches /(ts|tsx|js|jsx|py|rb|go|rs|java|c|cpp|cs|php)$/
│   │   ├── path NOT in node_modules|dist|build       → fire engramx intercept (mistake-guard wraps)
│   │   └── path in excluded dir                      → stay silent
│   └── file_path is docs / config / lock file        → stay silent
├── PreToolUse Bash
│   ├── command contains a known dangerous pattern    → fire engramx intercept
│   └── otherwise                                      → stay silent
└── Manual /engram-mistakes invocation                 → engramx mistakes -p . --since 90d

Additional reads by need:

  • Need the visual format spec? → references/output-format.md
  • Need bi-temporal model background? → references/bi-temporal-model.md
  • Need trigger pattern detail? → references/trigger-patterns.md
  • Wondering why a mistake didn't fire? → references/anti-patterns.md (false-negative section)

Layer 4 — Invocation Variants

The same engramx data renders in three different surfaces. Pick by context.

VariantSurfaceWhen
CLI directengramx mistakes -p . --since 30dUser asks reactively. Full color, full bi-temporal layout. Power-user audit.
PreToolUse hook (permissive)injected as additionalContext to ClaudeDefault. Claude reads + adapts before producing tool output. The rave moment.
PreToolUse hook (strict)tool call denied with bi-temporal block as reasonOpt-in via ENGRAM_MISTAKE_GUARD=2. For teams that want hard blocks on recurring patterns.

The skill itself never picks the variant — it routes the user's intent to the correct engramx subcommand. The guard mode is configured separately via env var.

Layer 5 — Custom Invocations

For non-standard requests ("show me mistakes from last sprint only", "filter to authentication-related"), generate a MISTAKES.md spec first:

target:   <file glob or repo>
window:   <since date or duration>
filter:   <substring or regex on applies-to>
format:   structured | json | plain
limit:    <int>

Then map to engramx mistakes --since <window> --source <target> --format <format> --limit <limit>. The pack ships no new mistake-extraction logic — every query is a CLI invocation.

Layer 7 — Quality Gate

Before claiming the skill fired correctly, verify ALL of these.

CheckFail criterion
Output renders bi-temporal layoutAny mistake with v9 fields in the graph but rendered as legacy single-line
Header names the pattern, not the fileHeader starts with file path (e.g. src.ts: foo) instead of the applies-to value
then-believed text is preserved verbatimBelief text mangled, truncated mid-word, or replaced with a paraphrase
File ref is project-relativeAbsolute path leaked (e.g. /Users/...) instead of src/forms/ContactForm.tsx
Date format YYYY-MM-DD UTCLocale-dependent format (5/18/2026, 18.05.2026)
Tree characters match ┌├└─Box characters degraded to `+-
Output stays under depthMore entries shown than the depth dial allows

If any check fails, the rendered output is not a rave-quality mistake surface — return to the underlying engramx invocation and verify the graph data shape before retry.

See also

  • references/bi-temporal-model.md — why "then vs now" matters more than "what failed"
  • references/output-format.md — exact byte-level format spec for the hook layout
  • references/trigger-patterns.md — the auto-fire decision matrix expanded with examples
  • references/anti-patterns.md — what makes a mistake surface noise instead of signal
  • references/evaluation.md — measurable criteria for whether the skill is working in your repo

Privacy

engram-skill-pack ships zero egress. engramx (peer dependency) routes all graph data through local SQLite at ~/.engram/ and the per-project <project>/.engram/. No network calls happen during skill invocation. The pack is safe to install on a fully air-gapped workstation.

Cross-IDE

This pack targets Claude Code Skills. Same engramx data, different surfaces:

  • Continue.devengramx-continue npm package
  • VS Code / Cursor extensionnickcirv.engram-vscode on OpenVSX
  • Other MCP clientsengramx-serve (HTTP) or direct CLI

All four wrappers read the same ~/.engram/graph.db. Install once, surface everywhere.

What ships with it: 5 files

19.5 KB alongside SKILL.md

Keep looking

Skills are one crate of 326,506. 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.