Pre commit review
A growing catalog of installable AI skills for Swift, SwiftUI, Xcode, testing, automation, and App Store delivery.
npx -y skills add Maples7/Apple-Dev-AI-Skills --skill pre-commit-reviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
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.
SKILL.md
6.5 KB, as published. Nobody here has run it
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