habit

habit is a skill for Claude Code from choiyounggi/groundwork. It costs 64 tokens per session (2,082 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 Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths; mentions CLAUDE.md.

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

Good fit Use it after an incident, correction, or learning reminder to record the lesson and, when appropriate, link it to a detailed case record.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/choiyounggi/groundwork/habit
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 choiyounggi/groundwork --skill habit
Clone the repo
git clone --depth 1 https://github.com/choiyounggi/groundwork

Made for: Claude Code.

Or install memory-loop, the plugin that ships this one along with the rest of its 5 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/github.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/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 habit

Your own site · 80×15
<a href="https://agentmods.dev/skills/choiyounggi/groundwork/habit"><img src="https://agentmods.dev/badge/skills/choiyounggi/groundwork/habit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 64 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,082 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.00064 $0.02082
Opus 5.5 $0.00026 $0.00833
Sonnet 5.5 $0.00013 $0.00416
Haiku 4.5 $0.00006 $0.00208

Measured 1mo ago against content hash fa513a212414, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 158 lines

How it starts

The opening of the file, as written. The whole thing — 158 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.

It is imported into every session, so it is re-read on every request — its size is paid per turn, multiplied by the length of the conversation. That is the whole reason this skill is mostly a set of gates: a habit file that captures everything is a file nobody can afford to load, and an unloaded habit file teaches nothing.

Three gates — all three, before anything is written

A lesson enters HABITS.md only when it clears all three. Answer them in order and out loud; a candidate that fails any one of them has a better home (see the routing table).

  1. Damage — "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 later repaired but already done (costs incurred, a wrong external post, polluted memory) counts as YES. This gate decides 🛑 vs 🟢, not whether to write.
  2. Recurrence — "Has this actually happened more than once, or is there a named reason the next occurrence is likely?" One incident is a case, not a habit. A single 🛑-grade event still qualifies — the first breach of a damage-remaining line is one too many — but a single 🟢-grade slip does not.
  3. Generality — "Does this hold outside this one tool, repo, or file?" A rule naming a specific script, a specific flag's quirk, or one repo's layout is knowledge about that thing, not a working habit. Ask what the rule would say if that name were removed: if nothing is left, it fails this gate.

Context can flip gate 1: 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.

Read the full file on GitHub · 158 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. 1mo ago Changed · +21 lines fa513a212414
  2. 2mo ago Changed · -2 tokens per session d3b5b6658393
  3. 2mo ago Changed · +47 lines · +13 tokens per session 0a5ee7dad892
  4. 3mo 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 18d ago), licensed MIT. It adds 64 tokens to every session and 2,082 once invoked, about $0.0003 per session on Opus 5.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

habit compared with skills from other repositories

habit next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
habitchoiyounggi/groundworkSkill318d agoMITA64Claude Code
reflectsneg55/agent-starterSkill774d agoMITA37Claude Code
remembersneg55/agent-starterSkill774d agoMITA38Claude Code
dreamsneg55/agent-starterSkill774d agoMITB27Claude Code
siftxobotyi/cc-foundrySkill233d agoMITA52Claude Code
audit-contextMalo-T/claude-toolbeltSkill24d agoMITA249Claude Code
handoffMalo-T/claude-toolbeltSkill24d agoMITA151Claude Code