Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Self Review

ASecurity

Scrape Claude Code session history to find repeated user corrections, preferences, and contextual guidance, then surface candidates for CLAUDE.md or memory. Use when the user wants to review past sessions for self-improvement, find patterns in their feedback, or bake recurring preferences into persistent configuration.

3 stars
0 votes
0 copies
0 views
Added 9/20/2026
code-qualityrustgodebugginggit

Works with

claude code

Security Analysis

A100/100

Scanned 9/20/2026

Install to Claude Code

$npx -y skills add nvie/skills --skill self-review --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Self Review?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Self Review
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nvie-self-review/badge)](https://www.skillsdirectory.com/skills/nvie-self-review)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: self-review
description: Scrape Claude Code session history to find repeated user corrections, preferences, and contextual guidance, then surface candidates for CLAUDE.md or memory. Use when the user wants to review past sessions for self-improvement, find patterns in their feedback, or bake recurring preferences into persistent configuration.
---

# Self-Review

Analyze past Claude Code sessions to find repeated user corrections and preferences that should be persisted as memories or CLAUDE.md entries.

## When to Use This Skill

Use this when the user wants to:

- Review past Claude Code sessions for recurring feedback patterns
- Find preferences or corrections they've had to repeat across sessions
- Identify candidates for CLAUDE.md rules or memory entries
- Perform a "self-improvement" pass on their Claude Code setup

## Instructions

### Step 1: Gather session data

Scan all JSONL session files from:

- `~/.claude/projects/` (project-scoped sessions)
- `~/.claude/sessions/` (global sessions, if present)

Each `.jsonl` file is one session. Parse each line as JSON.

**Skip files under `*/subagents/*`** — these are agent-spawned sessions, not direct user interaction.

The parent directory name encodes the project path, e.g. `-Users-nvie-Projects-liveblocks` → project "liveblocks". Use this for grouping by project.

### Step 2: Extract user messages

From each session, extract messages where `type` is `"user"`. The JSONL schema:

```json
{
  "type": "user",
  "isMeta": false,
  "message": {
    "role": "user",
    "content": "..." // string, or array of {type: "text", text: "..."} blocks
  }
}
```

- Text lives at `obj.message.content` (not `obj.content`)
- **Skip messages with `isMeta: true`** — these are system-injected (hook output, command caveats), not typed by the user
- Content can be a string or a list of content blocks; extract `text` from blocks where `type == "text"`

### Step 3: Identify correction and preference signals

Filter for messages that match these patterns:

- **Corrections**: "no", "not that", "don't", "stop", "wrong", "I said", "I meant", "actually", "instead"
- **Repeated preferences**: instructions about style, workflow, tools, formatting, or conventions
- **Contextual guidance**: "always", "never", "from now on", "every time", "remember that"
- **Frustration signals**: user restating something they've said before, or clarifying after a misunderstanding

Ignore routine messages like "yes", "thanks", "looks good", simple task requests without preference signals, or one-off debugging instructions unlikely to recur.

**Cross-project recurrence is the strongest signal.** If the same correction appears in 2+ unrelated projects, it's almost certainly a global CLAUDE.md candidate. Patterns appearing in only one project are more likely project-specific context — treat them with lower priority.

### Step 4: Classify destinations

For each candidate, determine where it belongs:

- **Global CLAUDE.md** (`~/.claude/CLAUDE.md`): user-wide preferences that apply across all projects (communication style, git workflow, general coding preferences)
- **Project CLAUDE.md** (`.claude/CLAUDE.md` in a project root): project-specific conventions, architecture decisions, or tooling preferences
- **Memory** (user/feedback type): personal context, role info, or nuanced preferences that benefit from the richer memory format

Check whether the preference is **already captured** in an existing CLAUDE.md or memory file. Skip duplicates.

### Step 5: Present findings

Present a summary table sorted by frequency (most repeated first):

```
| # | Pattern | Freq | Sessions | Status |
|---|---------|------|----------|--------|
| 1 | description | N | session-ids | new/exists |
```

For each entry include:

- **One-line description** of the preference or correction
- **Frequency**: how many times it appeared across sessions
- **Session IDs**: which sessions contained it (use the session directory/file name)
- **Status**: whether it's already captured somewhere or new

### Step 6: Interactive review

Walk through the list with the user one by one. For each item:

1. Show the exact user quotes (with session context)
2. Propose the specific text to add to CLAUDE.md or memory
3. Wait for the user to approve, modify, or skip
4. Apply approved changes immediately

Do NOT batch-apply changes without explicit user approval for each one.

## Important Notes

- Session files can be large. Process them efficiently — stream line by line rather than loading entire files into memory.
- Start with main sessions only (skip `*/subagents/*`). This drastically reduces noise.
- Some sessions may be very old or irrelevant. If there are many sessions, consider asking the user if they want to limit the time range.
- Be honest about ambiguous cases. If a message could be a one-off correction or a lasting preference, flag the ambiguity.
- Respect privacy: session data may contain sensitive information. Do not output raw session content beyond the relevant quotes needed for review.

Attribution

nvienvie
View sourceMore from nvie →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Caveman Review

Ultra-compressed code review comments. Cuts noise from PR feedback while preserving the actionable signal. Each comment is one line: location, problem, fix. Use when user says "review this PR", "code review", "review the diff", "/review", or invokes /caveman-review. Auto-triggers when reviewing pull requests.

1023331 votes

Caveman Commit

Ultra-compressed commit message generator. Cuts noise from commit messages while preserving intent and reasoning. Conventional Commits format. Subject ≤50 chars, body only when "why" isn't obvious. Use when user says "write a commit", "commit message", "generate commit", "/commit", or invokes /caveman-commit. Auto-triggers when staging changes.

1023331 votes

Verification Loop

一个全面的 Claude Code 会话验证系统。

2456590 votes

Springboot Verification

Verification loop for Spring Boot projects: build, static analysis, tests with coverage, security scans, and diff review before release or PR.

2456590 votes

Django Verification

Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

2456590 votes
View all in code-quality →