docs-reflect

A session documentation tool that turns notes and repeated feedback into proposed rules or documents for a code repository.

In plain words
What is it for?
Use it to collect documentation notes, identify recurring patterns, and propose files such as repository rules or documentation pages.
Why use it?
It helps preserve lessons from earlier coding sessions so the same corrections and conventions do not need to be explained repeatedly.

Skill for Claude CodeCodex

Part of the memory-toolkit plugin — 11 skills, 5 hooks 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/ilyagorsky/memory-toolkit/docs-reflect
Any agent
npx skills add IlyaGorsky/memory-toolkit --skill docs-reflect
Clone the repo
git clone --depth 1 https://github.com/IlyaGorsky/memory-toolkit

Made for: Claude Code, Codex.

Or install memory-toolkit, the plugin that ships this one along with the rest of its 11 skills, 5 hooks.

Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,074 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.00027 $0.01074
Opus 5 $0.00014 $0.00537
Sonnet 5 $0.00005 $0.00215
Haiku 4.5 $0.00003 $0.00107

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

Security

Grade A, and why

docs-reflect 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 3d 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/docs-reflect/SKILL.md · 167 lines

How it starts

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

/docs-reflect — Session knowledge → repo documentation

Collect DOC: notes accumulated during the session, generalize them into rules, and propose documentation for the repository.


Step 1: Collect findings

Two sources: DOC: notes from the current session, and recurring feedback from memory.

1a: DOC: notes

node "$MEM" --dir="$MEM_DIR" docs

1b: Recurring feedback patterns

node "$MEM" --dir="$MEM_DIR" recurring

This scans feedback/ files for clusters — similar corrections that appeared 2+ times across sessions. Recurring patterns are strong candidates for promotion to .claude/rules/.

Combine

If both sources are empty — tell user "No documentation findings." and stop.

If recurring patterns found (3+ occurrences) — these are project conventions, not personal preferences. Treat them as DOC automatically:

  • Save as DOC note: node "$MEM" --dir="$MEM_DIR" note "DOC: <domain> — <generalized rule from recurring feedback>"
  • Highlight to user: "This feedback appeared N times — promoting to project rule."

Patterns with 2 occurrences — mention as candidates but don't auto-promote.


Step 2: Generalize

For each DOC: note, extract a generalized rule.

Bad (too specific):

"The PaymentService bug was on line 42 in processRefund()"

Good (pattern):

"Refund operations must check transaction state before mutating — stale state causes double-refunds"

Bad (class-level):

"UserService.getProfile() returns null when user is not found"

Good (convention):

"Services return null for missing entities instead of throwing — callers must handle null"

If a note can't be generalized — skip it.


Step 3: Detect documentation structure and route

3a: Detect existing structure

ls .claude/rules/ 2>/dev/null
cat CLAUDE.md 2>/dev/null | head -50
ls docs/ 2>/dev/null

Check memory for saved preference:

node "$MEM" --dir="$MEM_DIR" search "docs_target"

3b: Choose target

If no saved preference and no .claude/rules/ directory — ask:

Read the full file on GitHub · 167 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. 3d ago First seen · 167 lines · 0 tokens per session scan A b6bc52cd0ddd

Subscribe to this mod's changes

docs-reflect is a skill published in the GitHub repository IlyaGorsky/memory-toolkit (13 stars, last pushed 4mo ago), licensed MIT. It adds 27 tokens to every session and 1,074 once invoked, about $0.0001 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

acontext-installer

Install Acontext, Login & Init Acontext Project, Add Skill Memory to Agent.

memodb-io/Acontext · 22 tokens

math-unicode

Use when a response needs mathematical notation (equations, filters, set-builder notation, statistics, calculus, linear algebra, logic, ratios, drops, counts) and the output goes to a terminal or TUI that cannot render LaTeX: Claude Code, Codex CLI, SSH and tmux sessions, CI logs. Load it before composing, including…

vladimirrott/claude-math · 154 tokens

vibe-ship

Generates a complete, production-ready deployment setup for any app in one pass -- Dockerfile, docker-compose.yml, .dockerignore, CI/CD (GitHub Actions), scalability config (health checks, resource limits, K8s on request), and security hardening (non-root user, secrets, dependency scanning). Auto-detects the stack…

sudais-khalid/vibe-ship · 214 tokens

anatomia-cc

ES: Te dice qué construir en Claude Code y te da el esqueleto de archivos: skill y en qué modo, subagente, hook, servidor MCP, plugin, rutina, artefacto, app con el Agent SDK, una línea en CLAUDE.md, o nada. Corré esto antes del primer archivo. Se dispara con «esto lo hago como skill o como agente», «necesito un MCP o…

Hainrixz/claude-anatomy · 267 tokens

create-agents-md

Create concise, repository-specific AGENTS.md files with operational contract, precedence rules, and drift-control guidance.

MSiccDev/ai-context-kit · 26 tokens

create-checkpoint

Capture the current session state as a checkpoint artifact per spec section 4.4. Use when the user signals session end or explicitly requests a checkpoint. Do not use mid-session or without user approval.

MSiccDev/ai-context-kit · 44 tokens