marcsstevenson/claude-mods/tree/main/src/better-recap
better-recap
/recap을 구조화된 카드로 바꾸어 Goal / Done / Open / Next, 세션 이름, 모델과 컨텍스트 사용량 막대를 표시합니다.
이 mod 소개
better-recap은 TypeScript hooks API로 만든 Claude Code 플러그인 모음의 mod입니다. /recap을 Goal / Done / Open / Next 카드로 바꾸고 세션 이름, 모델, 컨텍스트 사용량 막대를 표시합니다. 자리를 비운 뒤 자동으로 표시되는 recap: 줄에도 같은 정보를 붙입니다. claude --plugin-dir path/to/claude-mods/src/better-recap으로 한 세션에 로드하거나 ~/.claude/settings.json의 CLAUDE_CODE_PLUGIN_DIRS에 등록할 수 있으며 claude plugin validate, claude plugin test, npx tsc로 검증합니다.
설치
먼저 작성자의 README에서 marketplace와 플러그인 이름을 확인하세요. 저장소 구조에 따라 명령어가 달라질 수 있습니다.
claude plugin marketplace add marcsstevenson/claude-mods claude plugin install better-recap
원문 / README
claude-mods
Mods for Claude Code: plugins of function hooks that change what Claude Code does and draws, written in TypeScript against the engine's hooks API (early access, Claude Code 2.1.289+).
Mods
| Mod | What it does |
| --- | --- |
| better-recap | Replaces /recap with a structured recap (Goal / Done / Open / Next) drawn as a card headed by the session name, the model and a context-use bar. Prefixes the automatic "recap:" line shown after being away with the same facts. |
Using a mod
Each folder under src/ is a self-contained mod. Load one for a single session:
claude --plugin-dir path/to/claude-mods/src/better-recap
Or load it in every session by naming it in CLAUDE_CODE_PLUGIN_DIRS, in the env block of ~/.claude/settings.json. Separate several folders with the platform's path separator (; on Windows, : elsewhere):
{
"env": {
"CLAUDE_CODE_PLUGIN_DIRS": "D:\\git\\claude-mods\\src\\better-recap"
}
}
A folder loaded either way is watched: saving a file reloads the mod.
Layout of a mod
src/<mod>/
.claude-plugin/plugin.json manifest: name, version, description, types
hooks/hooks.json { "modules": ["./register.tsx"] }
hooks/register.tsx the hooks module: export const register: Register = on => { ... }
hooks/*.test.ts tests, run by `claude plugin test`
types/index.d.ts the mod's $.state contract, when it keeps state
tsconfig.json extends the types Claude Code lays in .claude-plugin/types/
.claude-plugin/types/ is written by Claude Code each time it loads the mod and is not committed.
Checking a mod
claude plugin validate src/<mod> # what the engine would load or refuse
claude plugin test src/<mod> # runs hooks/*.test.ts against the engine
npx tsc -p src/<mod> # type-check, once the mod has loaded once
