self-review

self-review is a skill for Claude Code, Codex from ahonn/dotfiles. It costs 102 tokens per session (2,433 once invoked), scanned A, original, MIT.

A code-review workflow for checking branch, staged, or uncommitted changes before they are pushed or submitted for review.

In plain words
What is it for?
Use it to review a Git diff, check work before committing or pushing, and prepare a pull request review.
Why use it?
It helps catch quality problems and apply straightforward fixes before other people review the code.

Skill for Claude CodeCodex

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/ahonn/dotfiles/self-review
Any agent
npx skills add ahonn/dotfiles --skill self-review
Clone the repo
git clone --depth 1 https://github.com/ahonn/dotfiles

Made for: Claude Code, Codex.

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 self-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/ahonn/dotfiles/self-review.svg)](https://agentmods.dev/skills/ahonn/dotfiles/self-review)
Your own site
<a href="https://agentmods.dev/skills/ahonn/dotfiles/self-review"><img src="https://agentmods.dev/badge/skills/ahonn/dotfiles/self-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,433 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.00102 $0.02433
Opus 5 $0.00051 $0.01216
Sonnet 5 $0.00020 $0.00487
Haiku 4.5 $0.00010 $0.00243

Measured yesterday against content hash 6215848ec51f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

self-review 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 yesterday.

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.

.claude/skills/self-review/SKILL.md · 242 lines

How it starts

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

Self-Review

Structured two-pass code review with Fix-First approach. Supports branch diffs, staged, and uncommitted changes. Integrates with code-quality skill standards.

Scope note: this skill orchestrates the pre-push workflow (two-pass review, Fix-First, Codex peer review). For deep bug-hunting on a diff, prefer the built-in /code-review; for reviewing a GitHub PR, use the built-in /review.

Arguments

  • --base <branch>: Override base branch (default: auto-detect via gh or main/master)
  • --scope <branch|staged|uncommitted>: Control what diff to review (default: auto-detect)
    • branch: committed diff between current branch and base — requires feature branch
    • staged: only staged changes (git diff --cached) — useful before committing
    • uncommitted: all working tree changes (git diff --cached + git diff)
  • --fix: Auto-fix mode — apply mechanical fixes without asking
  • --report-only: Report only, no fixes
  • --peer: Spawn a parallel Codex CLI peer review via background Agent (requires codex-plugin-cc)
  • No arguments: default interactive mode (auto-fix mechanical, ask for judgment calls)

Auto-trigger rule: When the user asks to create/open/submit a PR, run /self-review --peer first. Address findings before proceeding with PR creation.

Step 0: Detect Review Mode and Diff

# Detect base branch
BASE=$(gh pr view --json baseRefName -q .baseRefName 2>/dev/null || git rev-parse --verify main 2>/dev/null && echo main || echo master)
CURRENT=$(git branch --show-current)
git fetch origin "$BASE" 2>/dev/null

Three review scopes (--scope overrides auto-detection):

Scope Diff source --peer Auto-selected when
branch git diff origin/$BASE...HEAD Yes (via /codex:review) On feature branch with commits ahead of base
staged git diff --cached Yes (via /codex:rescue) — (explicit only)
uncommitted git diff --cached + git diff Yes (via /codex:rescue) On base branch, or branch with no commits ahead

Read the full file on GitHub · 242 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. yesterday First seen · 242 lines · 102 tokens per session scan A 6215848ec51f

Subscribe to this mod's changes

self-review is a skill published in the GitHub repository ahonn/dotfiles (62 stars, last pushed 4d ago), licensed MIT. It adds 102 tokens to every session and 2,433 once invoked, about $0.0005 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-09-03.

Related

Other skills, from other repositories

ship

Generate a conventional commit message from staged or unstaged changes and create an atomic commit, then optionally push and watch CI until it passes or fails. Use when the user says "write a commit", "generate a commit message", "commit this", "git add .", or "ship this". Push and CI-watch are optional and skipped if…

urmzd/dotfiles · 119 tokens

coding

Principles for writing and designing code, covering API and abstraction design, naming, comment discipline, and standards of evidence for claims about code behavior. Use whenever the task is to write or modify code, design an API or software architecture, or review code.

ryota2357/dotfiles · 53 tokens

commit

Commit the changes in the working tree. Only invoke when the user explicitly signals to commit ("commit", "/commit", etc.). Never invoke this skill on your own initiative — implementation approval is not a commit signal.

ooloth/dotfiles · 44 tokens

git-commit

Create a new git commit for staged changes. Use when the user asks to commit staged changes with an auto-generated Conventional Commits message, or when Claude Code itself wants to run git commit.

aiya000/dotfiles · 43 tokens

scan-commit

Automatically scan the repository for unstaged/untracked changes, group them into logical commits using hunk-level analysis, stage and commit them following Conventional Commits.

magic3007/dotfiles · 35 tokens

create-pr

Rebase from the latest origin/main, squash the commits from it, and then create a PR on github with intelligent commit messages based on staged changes.

magic3007/dotfiles · 34 tokens