memory-discipline

memory-discipline is a skill for Claude Code from vitaliikapliuk/modelharness. It costs 42 tokens per session (323 once invoked), scanned A, original, MIT.

A file-based method for recording project lessons in files such as MEMORY.md and lessons/*.md. It defines when to read, write, update, and remove those lessons.

In plain words
What is it for?
Use it to preserve confirmed working approaches, record mistakes and their causes, and retrieve relevant lessons before starting substantial work.
Why use it?
It prevents useful corrections and discoveries from being forgotten during long projects while avoiding duplicate or outdated notes.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the modelharness plugin — 3 skills, 3 commands, 1 agent, 1 hook shipped together

Good fit Use it to preserve confirmed working approaches, record mistakes and their causes, and retrieve relevant lessons before starting substantial work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vitaliikapliuk/modelharness/memory-discipline
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vitaliikapliuk/modelharness --skill memory-discipline
Clone the repo
git clone --depth 1 https://github.com/vitaliikapliuk/modelharness

Made for: Claude Code.

Or install modelharness, the plugin that ships this one along with the rest of its 3 skills, 3 commands, 1 agent, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for memory-discipline

README.md
[![agentmods](https://agentmods.dev/badge/skills/vitaliikapliuk/modelharness/memory-discipline/github.svg)](https://agentmods.dev/skills/vitaliikapliuk/modelharness/memory-discipline)
Your own site
<a href="https://agentmods.dev/skills/vitaliikapliuk/modelharness/memory-discipline"><img src="https://agentmods.dev/badge/skills/vitaliikapliuk/modelharness/memory-discipline/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for memory-discipline

Your own site · 80×15
<a href="https://agentmods.dev/skills/vitaliikapliuk/modelharness/memory-discipline"><img src="https://agentmods.dev/badge/skills/vitaliikapliuk/modelharness/memory-discipline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 323 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00042 $0.00323
Opus 5 $0.00021 $0.00161
Sonnet 5 $0.00008 $0.00065
Haiku 4.5 $0.00004 $0.00032

Measured 10d ago against content hash 6827318174c2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

memory-discipline scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/memory-discipline/SKILL.md · 33 lines

What it actually says

Memory Discipline

Fable 5 performs notably better when it can write learnings somewhere for future reference. Give Opus the same surface and rules.

Read rules

  • At the start of non-trivial work, read MEMORY.md (index) if present, then any lessons/*.md whose one-line summary looks relevant.
  • Memories reflect what was true when written — verify a referenced file/flag still exists before relying on it.

Write rules

  • One lesson per file in lessons/, kebab-case name, one-line summary on the first line.
  • Record corrections from the user and confirmed working approaches alike — include WHY it mattered, not just what happened.
  • Don't save what the repo already records (code structure, git history, README facts).
  • Update an existing lesson rather than creating a near-duplicate; delete lessons that turn out to be wrong.
  • After writing, add/refresh a one-line pointer in MEMORY.md.

Format

<!-- lessons/use-fake-clock-in-timer-tests.md -->
Timer tests must inject a fake clock — real sleeps made CI flaky.

Context: PR #42 reverted twice. `time.monotonic` is patched via the `clock`
parameter; never call `time.sleep` in tests.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 33 lines · 42 tokens per session scan A 6827318174c2

Subscribe to this mod's changes

memory-discipline is a skill published in the GitHub repository vitaliikapliuk/modelharness (38 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 323 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

memory-and-handoff

Two-mode skill: (1) session memory — load/persist durable workflow state under .cc10x/ (activeContext, patterns, progress) so context survives compaction; (2) handoff package — portable, secrets-redacted export for a coworker, different tool, or fresh non-cc10x session.

romiluz13/cc10x · 70 tokens

agent-common

Shared preamble loaded by all cc10x agents — memory protocol, contract format, output rules.

romiluz13/cc10x · 23 tokens

smart-rebase

Smart partial rebase for squash-merge repositories. Auto-detect which commits to keep/drop when base branch was squash-merged into target. Use when: user says 'rebase', 'partial rebase', 'base already merged', 'smart rebase', or /smart-rebase. Not for: simple git rebase (the developer runs it — Claude never executes…

sd0xdev/sd0x-harness · 131 tokens

recap-doc

Post-development recap document generator. Use when: AI/Codex has implemented a feature and the user needs a guided walkthrough of what changed and why, with blind-spot detection and anticipated questions. Not for: Q&A follow-up (use /recap-ask), technical share-out for teammates (use /tech-brief), or generic code…

sd0xdev/sd0x-harness · 114 tokens

runbook

Generate and update feature release runbooks from existing docs and codebase. Use when: creating operational runbook, release handbook, deployment checklist, pre-release preparation. Not for: incident response (v2), code review (use codex-code-review), architecture design (use architecture).

sd0xdev/sd0x-harness · 59 tokens

test-review

Test coverage review via Codex exec. Use when: reviewing test sufficiency, identifying coverage gaps, test quality audit. Not for: generating tests (use codex-test-gen), code review (use codex-code-review). Output: coverage analysis + gap report.

sd0xdev/sd0x-harness · 56 tokens