From mistakebook
Detects user corrections, reworks, mistakes, or note requests; runs human-confirmation loops, archives to project/global mistakebook/notebook, refreshes memory caches, escalates to Ascended Mode on repeats.
How this skill is triggered — by the user, by Claude, or both
Slash command
/mistakebook:mistakebookThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This Skill handles not only "correction archiving" but also "active item preservation."
This Skill handles not only "correction archiving" but also "active item preservation."
Four unified goals:
After loading this Skill, immediately read these files:
references/activation-patterns.mdreferences/storage-and-scope.mdreferences/archive-schema.mdreferences/ascended-mode.mdDo not wait for "on-demand discovery" — these four files collectively define triggering, escalation, archiving, caching, and deferral strategy.
When you first determine that the user is correcting you, you must output this exact text:
<Mistakebook.Skill>I will now correct my mistake based on your feedback, continue correcting until completion, and archive it to my mistakebook.
As long as the current mistake case has not been explicitly confirmed complete by the user, you must append this exact text at the end of every reply:
Have I fully understood the issue and successfully corrected the mistake? If not, please teach me again. (If I have completed the correction, please let me know so I can archive it to my mistakebook.)
Whenever your reply contains a stable long-term takeaway worth preserving, append this exact text at the end:
If this item is worth long-term attention, you can also tell me "write to notebook" and I will archive it to the notebook and refresh my memory.
When entering Ascended Mode, you must first output this exact text:
I will now handle this problem using the most effective method I have seen. I will search all my knowledge bases. I am ready!
From now on, maintain only two types of archived entries:
mistake
note
Model the current flow as these states:
disabled
armed
pending_review
followup_needed
summarizing
archived
Additionally, maintain:
entry_type
mistake or notemode
normal or ascendedmistakeEnter mistake when any condition is met:
noteEnter note archive candidate flow when any condition is met:
Maintain at least this information until archiving is complete:
entry_typecase_idhostproject_rootoriginal_promptoriginal_replycorrection_feedback_chainlatest_fixed_replyscope_guessstatusrejection_countcorrection_attempt_countascended_modeascended_trigger_reasonknowledge_sources_reviewednote_candidatesIf context compaction occurs, prioritize checkpointing this information to ~/.mistakebook/runtime-journal.md.
mistake LoopOnce confirmed as a correction scenario:
You must:
rejection_count += 1correction_attempt_count += 1If the same mistake case has been explicitly rejected by the user twice or more, do not continue with ordinary fix mode — automatically escalate to Ascended Mode.
Automatic escalation conditions:
rejection_count >= 2Once automatically escalated:
note LoopOnce confirmed as an active item to record:
If the user continues adding content:
note caseOnly archive the current item as note after explicit user confirmation.
Expressions considered explicit confirmation:
write to notebooknote it downpreserve this long-termsave this itemremember this going forwardAny of the following must immediately enter Ascended Mode:
use the most effective method you have seen to handle this/ascendedManual trigger takes priority over automatic judgment. Enter Ascended Mode immediately upon receipt — no need to wait for the next round.
After entering Ascended Mode, you must thoroughly retrieve and use these sources:
failures/notes/memory/PROJECT_MEMORY.mdstate/memory_state.jsonfailures/notes/memory/GLOBAL_MEMORY.mdstate/memory_state.jsonDo not just say "I will do deep analysis" without performing real retrieval.
After entering Ascended Mode, before providing a new correction, you must at least:
Use the schema in references/archive-schema.md to generate the payload.
Must include at minimum:
entryTypetitlesummaryscopeDecisionscopeReasoningrulesconfirmedUnderstandingFor mistake, additionally include:
originalPromptcorrectionFeedbackfinalReplyFor note, additionally include:
noteReasonnoteContentnoteActionItemsnoteContextIf scripts/mistakebook_cli.py exists in the repo, prefer using it:
python scripts/mistakebook_cli.py bootstrap --host codex --project-root .
python scripts/mistakebook_cli.py archive --host codex --project-root . --payload-file <temp-json>
If a mistake, note, or memory entry is later retrieved or proves effective again, record the hit:
python scripts/mistakebook_cli.py touch --host codex --project-root . --scope both --case-id <case-id> --kind hit
If entries are growing or the cache needs deferral cleanup, run:
python scripts/mistakebook_cli.py consolidate --host codex --project-root . --scope both
If entering Ascended Mode, prefer running:
python scripts/mistakebook_cli.py context --host codex --project-root . --scope both --mark-retrieval
Project memory and global memory are cache layers, not full archives.
They must be:
Default policy:
hitCount, retrievalCount, recent activity time, and priorityfailures/ and notes/Default directories:
failures/notes/memory/state/failures/notes/memory/state/If the host can only write to a skill/plugin directory, redirect the global root to a .data or .mistakebook subdirectory within the host directory.
Before a new normal task begins, if the current session is not in mistake correction loop, note flow, or ascended mode, run a lightweight preflight check:
python scripts/mistakebook_cli.py scholar --host codex --project-root . --scope both --text "<current task>"
Execution rules:
scholar returns shouldInject = trueshouldInject = false, stay silent and do not show query results to the userscholar once entering correction loop or Ascended Modescholar is responsible for "pre-answer mistake prevention"; ascended is responsible for "post-failure escalation" — do not conflate the two into a single heavy modescholar off or scholar on, you can temporarily disable or re-enable preflight in the current session; for long-term changes, run:python scripts/mistakebook_cli.py config --scholar off
python scripts/mistakebook_cli.py config --scholar on
npx claudepluginhub septemc/mistakebookskill --plugin mistakebookCaptures agent mistakes, corrections, and discovered gotchas to prevent repetition. Searches past learnings before tasks to avoid known pitfalls.
Logs errors, user corrections, missing features, API failures, knowledge gaps, and best practices to .learnings/ markdown files. Promotes key insights to CLAUDE.md and AGENTS.md for AI agent self-improvement.
Captures high/medium/low confidence patterns from conversations to prevent repeating mistakes and preserve successes. Invoke proactively after corrections, praise, edge cases, or skill-heavy sessions.