pre-commit-review
Skill2 starsChanged 7 months agoMITView on GitHub
Review uncommitted Apple-platform changes across seven lenses — performance, user experience, test coverage, architecture, code style, security & privacy, and documentation — and produce a structured report with severity-graded findings before the user runs git commit. Use when the user asks to review a diff before committing, audit pending Swift / SwiftUI / Apple-platform changes for regressions, layering or style drift, security or privacy issues, missing tests, or stale docs.
- Commits and pushes
4 other projects use a version of this.
Adopted by
Most recently taken up by
- shsha4/claude-skillstheir own version, first seen Aug 19, 2026
- System-Error-Worldwide/the-looptheir own version, first seen Aug 17, 2026
- felipeArnold/filament-ai-skillstheir own version, first seen Jun 13, 2026
- Raashul/claude-skillstheir own version, first seen Apr 30, 2026
Other versions4 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 4
- felipeArnold/filament-ai-skills★ 9same name
- Raashul/claude-skills★ 1same name
- shsha4/claude-skills★ 1same name
- System-Error-Worldwide/the-loop★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- app-store-preview-pipelineSkill
- commit-messageSkill
- eas-app-store-metadataSkill
- handle-github-issueSkill
- translate-xcstringsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 20
Pick a review scope: Ask the user only if it is unclear:
- Distinctive: line 25
Run git status and the appropriate git diff for the chosen scope.
- Very specific: line 31
Test coverage — see references/test-coverage.md
- Distinctive: line 46
Use staged scope when staged changes exist.
- Very specific: line 52
When Info.plist, entitlements, PrivacyInfo.xcprivacy, network code, persistence code, or anything that looks like a secret or credential …
- Distinctive: line 54
Never run git commit, git push, or any mutating command.
- Distinctive: line 55
Never edit source files. Recommendations go in the report only.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Pre-Commit Review
Review pending changes in an Apple-platform repository (Swift, SwiftUI, AppKit, UIKit, WatchKit, widgets, intents, SwiftData, etc.) before commit, and return a structured report covering performance, user experience, test coverage, architecture, code style, security & privacy, and documentation.
This skill does not edit code, run tests, or invoke git commit. It analyzes the diff and produces a report the user can act on.
When To Use
- The user asks to review changes before committing.
- The user mentions pre-commit review, change review, perf check, UX check, security check, test coverage check, architecture review, or doc-comment review.
- The user wants a sanity pass on a Swift / SwiftUI change before opening a PR.
Operating Procedure
- Pick a review scope. Ask the user only if it is unclear:
staged—git diff --cached(default when staged changes exist)working—git diff HEAD(staged + unstaged)branch <base>—git diff <base>...HEAD(typicallymainordevelop)
- Collect the diff.
- Run
git statusand the appropriategit difffor the chosen scope. - For broad diffs, start with
git diff --statand read full hunks only for files that look risky (UI, async code, data layer, networking, public API,Info.plist, entitlements, privacy manifest).
- Run
- Identify the Apple surface area. Tag each changed file with at least one surface:
view(SwiftUI/UIKit/AppKit),model(SwiftData/Core Data),concurrency(async/await/actors/Tasks),io(network/disk/HealthKit/etc.),widget,intent,tests,assets,config,entitlements-or-privacy. - Apply the seven review lenses in this order:
- Performance — see
references/performance.md - User experience — see
references/user-experience.md - Test coverage — see
references/test-coverage.md - Architecture — see
references/architecture.md - Code style — see
references/code-style.md - Security & privacy — see
references/security.md - Documentation & comments — see
references/docs.md
- Performance — see
- Grade each finding with a severity:
blocker— likely regression, crash risk, data loss, broken UX, untested critical path, secret leak, or privacy violation. Recommend not committing until addressed.major— meaningful risk worth fixing in this commit if cheap, otherwise file a follow-up.minor— nit, style, or low-impact improvement.info— observation only, no action required.
- Produce the report using the structure in
references/report-template.md. - Do not auto-fix. End with a clear recommendation:
proceed,proceed-with-followups, orhold.
Required Checks
- Use staged scope when staged changes exist; only fall back to working-tree scope when nothing is staged or when the user explicitly asks for it.
- Skim every changed file at least at hunk-summary level before scoring; do not score a file you have not read.
- For SwiftUI views, always check accessibility, Dynamic Type, and main-actor work (UX reference).
- For async / actor / Task code, always check cancellation, priority, and main-actor hops (performance reference).
- For any new public API, type, or user-visible behavior, check whether there is a corresponding test change; if not, raise it as a coverage finding.
- For every changed file, sanity-check layering and module boundaries (architecture reference) and naming / error-handling / DI consistency with the surrounding code (code-style reference); flag drift even when the code works.
- When
Info.plist, entitlements,PrivacyInfo.xcprivacy, network code, persistence code, or anything that looks like a secret or credential changes, always run the security lens (security reference); upgrade severity toblockerfor plausible secret leaks or ATS regressions. - For new
public/openAPI or build/run instruction changes, always run the docs lens (docs reference). - Never run
git commit,git push, or any mutating command. This skill only reads. - Never edit source files. Recommendations go in the report only.
- Write the report's prose (finding descriptions,
Why:andFix:sentences,Notes) in the user's current session language. Keep structural anchors in English so the report stays machine- and human-parseable: section headings (## Pre-Commit Review,### Performance, etc.), field labels (Scope:,Files reviewed:,Recommendation:,Why:,Fix:,Suggested test:), severity tokens (blocker,major,minor,info), and recommendation tokens (proceed,proceed-with-followups,hold).
Out Of Scope
- Drafting the commit message itself — defer to the
commit-messageskill. - Full architectural review or refactor planning beyond drift-from-existing-style observations.
- Running the test suite or building the project.
- Deep security work: cryptography review, threat modeling, pen-testing. This skill performs surface-level Apple-platform security checks only.
References
references/performance.md— Apple-platform performance checklistreferences/user-experience.md— SwiftUI / HIG-aligned UX checklistreferences/test-coverage.md— XCTest / Swift Testing coverage checklistreferences/architecture.md— Layering, abstractions, module boundariesreferences/code-style.md— Consistency, Swift best practices, readabilityreferences/security.md— Apple-platform security & privacy checklistreferences/docs.md— DocC, in-code comments, project-level docsreferences/report-template.md— Required report structure
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

