# /close · the skill your agent uses to decide what it learns from each session

marbuilds.dev/resources/en/close · @itsmarbuilds

## Install (2 minutes)

Claude Code, global for all your projects:

    mkdir -p ~/.claude/skills/close
    cp close/SKILL.md ~/.claude/skills/close/SKILL.md

For a single repo only: the same folder inside the project, `.claude/skills/close/SKILL.md`.

Codex (CLI and app): the same folder in `~/.agents/skills/close/SKILL.md`. If you use both, put the
folder in one place and link both paths to it (that's how I have it).

Another agent: paste the body of the file (everything below the header between `---`) as a
"When closing a session" section of your AGENTS.md, and swap the paths in the table for its own.

Open your agent and type `/close` (in Codex, `$close`, or find it in `/skills`). If it shows up in the list, it's installed.

## Before the first use

Fill in the "Where everything lives in this project" table at the top of `SKILL.md`:
where your memory is, which index always loads, where your repo rules are and
whether you have your own closing protocol. Without that table the skill doesn't know where to send each lesson.

## Use

- `/close` at the end of a session: it learns and checks whether you can close.
- `/close learn` only records lessons.
- `/close check` only measures git, processes and promises.
- In Codex, the same with `$`: `$close`, `$close learn`, `$close check`.

Read the receipt. It's a short table (what, where, operation). "Nothing to record" is normal.
More than three new files in one close is a sign it didn't filter.

## What it doesn't do

It doesn't change the model. It doesn't measure on its own how many errors it prevents. It doesn't govern the memory a
session writes mid-work. It's a curation pass at the end, with judgment, on top of the
memory your agent already keeps.

Full guide, examples and how to adapt it to other agents: marbuilds.dev/resources/en/close
