home/claude/skills/style-review/SKILL.md
Style and naming review — formatting, naming conventions, readability, code hygiene
npx skillsauth add lambdalisue/dotfiles style-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
base (optional): Base branch/ref to diff against. Auto-detected if omitted.base./code-review intentionally skips: style, naming, formatting, readability.If base is explicitly provided → use git diff <merge-base>...HEAD (committed changes from base).
If no base provided → auto-detect scope:
a. Run git status --short to check for uncommitted changes (staged + unstaged)
b. If uncommitted changes exist → review working tree changes only:
git diff + git diff --cached, combined**モード**: 未コミット変更
c. If no uncommitted changes → review all commits from base branch:gh pr view --json baseRefName --jq '.baseRefName' → git config branch.$(git rev-parse --abbrev-ref HEAD).merge → main/mastergit merge-base <base> HEADgit diff <merge-base>...HEAD**ベース**: \{base}``Exclude linguist-generated files via git check-attr.
Gather the diff and file list based on the scope determined in Step 1:
git diff --name-status + git diff --cached --name-status and git diff + git diff --cachedgit diff --name-status <merge-base>...HEAD and git diff <merge-base>...HEADIf diff is empty → STOP.
Use the Agent tool to spawn 1 agent.
subagent_type: "general-purpose"
Prompt:
You are a code style and readability reviewer. Find style and naming issues in these changes.
## Methodology
1. Read the FULL content of every changed file using the Read tool
2. Read 2-3 existing files in the same directories to establish the codebase's style conventions
3. Compare the new code's style against the established conventions
## What to find
- **Naming inconsistencies**: Variable/function/type names that don't match the codebase's naming convention (cite existing examples)
- **Readability issues**: Deeply nested logic that could be flattened, overly long functions, unclear variable names that require mental mapping
- **Formatting breaks**: Inconsistent indentation, spacing, or organization compared to surrounding code
- **Code hygiene**: Leftover debug code, commented-out code, TODO without context, unused imports/variables
- **Misleading names**: Names that suggest wrong behavior (e.g., `isValid` that doesn't validate, `getUser` that creates)
## What to IGNORE
- Personal style preferences that the codebase doesn't enforce
- Minor differences that don't affect readability
- Issues in code that wasn't changed in this diff
Changed files:
{file list}
Diff:
{diff}
For each issue: file:line, Severity (Warning/Notice), the style issue, how to fix it. Reference existing code (file:line) when citing established conventions.
Display-only. Do NOT offer actions.
## スタイルレビュー結果
**ベース**: `{base}` or **モード**: 未コミット変更 | **変更ファイル数**: N
---
### 1. タイトル (`path/to/file:line`) (★★☆)
> 概要。
対応方法。
---
Execute from Step 1.
tools
Update the title and body of an existing pull request WITHOUT asking for approval
tools
Create a pull request with title and body based on commits WITHOUT asking for approval
tools
Create a Conventional Commit from already staged changes WITHOUT asking for approval
tools
Map staged changes to existing commits and create fixup commits for autosquash WITHOUT asking for approval