crm-ios-pre-commit-checker

Analyze changed Swift files for code convention violations before commits.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/herren-official/product-agents --skill crm-ios-pre-commit-checker
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: crm-ios-pre-commit-checker
Source: https://github.com/herren-official/product-agents/tree/main/skills/crm-iOS/pre-commit-checker
Command: npx skills add https://github.com/herren-official/product-agents --skill crm-ios-pre-commit-checker

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Swift projects often suffer from inconsistent code style and risky patterns that slip into commits. This skill enforces a set of pre-commit checks to catch violations before they enter the repository.

Core Features & Use Cases

  • Enforces Force Unwrapping rules (excluding IBOutlets/IBActions) to reduce runtime crashes.
  • Flags statements exceeding 120 characters and detects potential exposure of sensitive data.
  • Checks import order and ensures required MARK sections are present for readability and navigation.
  • Provides structured error and warning reports to guide developers during commit reviews.
  • Integrates with git pre-commit workflows to block faulty commits and prompt fixes.

Quick Start

Run the pre-commit check during a commit to automatically validate changed Swift files and prevent commits with violations.

Frequently Asked Questions about crm-ios-pre-commit-checker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Swift code conventions before a git commit?▼

To enforce Swift code conventions before a git commit, a pre-commit checker analyzes changed Swift files and blocks faulty commits. It validates rules like force unwrap prevention and line length to guide necessary fixes.

What is a Swift pre-commit check and how does it work?▼

A Swift pre-commit check is a static analysis mechanism that detects staged or unstaged git changes. It applies specific lint rules to the modified files and reports errors and warnings to prevent risky patterns from entering the repository.

How do I prevent force unwrapping in my iOS project commits?▼

To prevent force unwrapping in iOS project commits, pre-commit static analysis flags force unwrap violations while excluding IBOutlets and IBActions. It blocks the commit and provides structured reports to guide developers in fixing the risky patterns.

Can I check import order and MARK sections in Swift files automatically?▼

Yes, you can check import order and MARK sections in Swift files automatically. A pre-commit hook integrates with your git workflow to verify these readability conventions are present in changed files before allowing the commit to proceed.

How do I stop sensitive data exposure in my Swift codebase?▼

To stop sensitive data exposure in a Swift codebase, pre-commit static analysis scans changed files for potential security risks. It detects sensitive data patterns during the commit workflow and blocks the transaction to prompt immediate fixes.

Does the pre-commit checker validate both staged and unstaged git changes?▼

Yes, the pre-commit checker validates both staged and unstaged git changes. It detects modified Swift files across both Git states, applies the static analysis rules, and blocks the commit if violations are found.