habit

habit is a skill for Claude Code, Codex from choiyounggi/groundwork. It costs 53 tokens per session (1,104 once invoked), scanned A, original, MIT.

A lesson-recording procedure for a memory system. It turns mistakes, corrections, or praised behavior into a positive practice or a strict rule in HABITS.md.

In plain words
What is it for?
Use it after an incident, correction, or learning reminder to record the lesson and, when appropriate, link it to a detailed case record.
Why use it?
It converts individual incidents into reusable guidance for future work.

Skill for Claude CodeCodex

Part of the memory-loop plugin — 6 skills shipped together

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.

agentmods
npx agentmods add skills/choiyounggi/groundwork/habit
Any agent
npx skills add choiyounggi/groundwork --skill habit
Clone the repo
git clone --depth 1 https://github.com/choiyounggi/groundwork

Made for: Claude Code, Codex.

Or install memory-loop, the plugin that ships this one along with the rest of its 6 skills.

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 habit

README.md
[![agentmods](https://agentmods.dev/badge/skills/choiyounggi/groundwork/habit.svg)](https://agentmods.dev/skills/choiyounggi/groundwork/habit)
Your own site
<a href="https://agentmods.dev/skills/choiyounggi/groundwork/habit"><img src="https://agentmods.dev/badge/skills/choiyounggi/groundwork/habit.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00053 $0.01104
Opus 5 $0.00026 $0.00552
Sonnet 5 $0.00011 $0.00221
Haiku 4.5 $0.00005 $0.00110

Measured 4d ago against content hash dd1fa87e4a38, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

habit 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 4d 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.

plugins/memory-loop/skills/habit/SKILL.md · 90 lines

How it starts

The opening of the file, as written. The whole thing — 90 lines — stays where its author put it; the contents beside it link to each section on GitHub.

memory-loop: habit

HABITS.md (default ~/.claude/groundwork/HABITS.md, created by the setup skill) is the frame where lessons become standing behavior. If the file is missing, tell the user to run /memory-loop:setup (step 2) first.

Classify first — the damage question

Ask: "If this behavior fails, does damage remain?" — production data or infrastructure, outbound messages (chat, PRs, mail), secrets, long-term memory, safety hooks, destructive commands, release/operations decisions. Damage that is later repaired but already happened (costs incurred, a wrong external post, polluted memory) counts as YES.

  • YES → 🛑 Hard line. Write it as a strong prohibition ("Never X before Y"). The blank left by a prohibition is the safety margin.
  • NO → 🟢 Practice. Write it positively — "when X, the best move is Y" — in HABITS.md, and put the origin in HABITS-CASES.md as a new ## Cnn section, leaving a [Cnn] pointer on the rule. A positive rule points at the action to take; a bare "don't" leaves the next moment empty.
  • Ambiguous → 🛑. Expression defaults to positive; the safety verdict defaults to conservative. These are different axes — warm form, strict verdict.

Context can flip the grade: the same verification shortcut that is 🟢 during read-only exploration becomes 🛑 the moment its output feeds an external post, a PR, long-term memory, or a destructive change. Judge by where the output goes, not by the action alone.

Two files: rules loaded, cases on demand

HABITS.md is imported into every session, which means it is re-read on every request — its size is paid per turn, not once per session. Background prose is what makes such a file grow without bound, so it lives in HABITS-CASES.md (same directory, not auto-loaded) and each rule carries a [Cnn] pointer.

  • Adding a practice: append ## Cnn to HABITS-CASES.md, put [Cnn] on the rule. Number sequentially, never renumber — a stale pointer is worse than a long file.
  • Adding a hard line: keep (← background: …) inline in HABITS.md. For a prohibition the origin is the judgment you need at the moment you'd cross it, and the 🛑 section is small by design.
  • Reading: fetch a case only when the rule alone does not settle the call.

Read the full file on GitHub · 90 lines

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. 4d ago First seen · 90 lines · 53 tokens per session scan A dd1fa87e4a38

Subscribe to this mod's changes

habit is a skill published in the GitHub repository choiyounggi/groundwork (3 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 1,104 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

reflect

Per-project self-improvement - reads the .harness ledger and feedback memories, then proposes gated rule/threshold/ADR changes so the project stops repeating mistakes. Run periodically.

sneg55/agent-starter · 37 tokens

remember

Review auto-memory entries and propose promotions to CLAUDE.md, CLAUDE.local.md, or shared memory. Also detects outdated, conflicting, and duplicate entries across memory layers.

sneg55/agent-starter · 38 tokens

ucai-patterns

Use when the user asks about Claude Code best practices, how to write agents, how to use hooks, how to manage context, or how to work effectively with Claude Code's native systems.

Joncik91/ucai · 42 tokens

dream

Memory consolidation - review, merge, prune, and index memory files. Run periodically to keep memories organized and up-to-date.

sneg55/agent-starter · 27 tokens

esp32-expert

This skill should be used for ESP32-specific hardware and runtime work in ESP-IDF, Arduino-ESP32, or PlatformIO projects: target/build detection, FreeRTOS tasks and ISRs, memory/DMA, peripherals, power, networking/security, OTA, crash diagnosis, and unattended reliability. Trigger on "debug this ESP32 crash", "review…

johnkozaris/jko-claude-plugins · 137 tokens

audit-context

Measures where a project's Claude context is going before applying any of clean-context's levers. Reports what Glob discovers with and without ignore files applied, the twenty largest files in the repo and which are generated, the cumulative size of every CLAUDE.md loaded for this working directory, and how many MCP…

Malo-T/claude-toolbelt · 218 tokens