mcpField
C
coding-standards-enforcer

coding-standards-enforcer

github.com/tomkrikorianTesting & quality66128 installsUpdated 19w ago
Repository

About coding-standards-enforcer

coding-standards-enforcer is a skill for reviewing Swift code against repository standards and addressing deviations. It routes developers to focused guidance on concurrency, Observation, and modern APIs, with an emphasis on minimal fixes and validation.

Key features

  1. 01Classify Swift standards issues
  2. 02Load references relevant to the issue
  3. 03Review concurrency isolation and diagnostics
  4. 04Check Observation ownership models
  5. 05Validate changes with builds or tests

Use cases

  1. 01Review Swift concurrency and isolation issues
  2. 02Check SwiftUI Observation state ownership
  3. 03Address outdated APIs and safety concerns
  4. 04Validate standards fixes and note remaining work

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/tomkrikorian/visionosagents --skill coding-standards-enforcer

After installing, type/coding-standards-enforcerin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

agents/
openai.yaml
references/
concurrency-guidelines.md
modern-swift-apis.md
observation-modeling.md
standards-review-map.md

Details

From the project README

Coding Standards Enforcer

Quick Start

Use this skill whenever Swift source changes are in scope and the question is whether the code matches the repository's concurrency, observation, and modern API standards.

  1. Classify the work first:
    • Swift 6.2 build-setting / language-mode problem
    • Swift MainActor / actor isolation / Sendable problem
    • Observation @Observable / SwiftUI @State / @Bindable ownership problem
    • modern API / style / safety cleanup
  2. Load only the reference files that match that category.
  3. Review the changed code in this order:
    • compiler diagnostics and isolation boundaries
    • ownership and observation model
    • API modernization and safety
  4. Fix or flag deviations explicitly; do not leave standards violations implied.

Load References When

ReferenceWhen to Use
references/standards-review-map.mdWhen you need the review order, routing, and repo-level standards map.
references/concurrency-guidelines.mdWhen the work touches actors, @MainActor, Sendable, Task, async let, task groups, or strict concurrency diagnostics.
references/observation-modeling.mdWhen the work touches Observation @Observable, @ObservationIgnored, SwiftUI @State, @Bindable, @Binding, or typed environment data flow.
references/modern-swift-apis.mdWhen the work is about API modernization, Foundation replacements, formatting, string matching, force unwraps, or Swift-native style.

Workflow

  1. Inspect the changed Swift files and note the primary failure class.
  2. Load the narrowest relevant reference file or files.
  3. Apply the minimum change that restores compliance.
  4. Rebuild or rerun the affected test scope if available.
  5. Summarize what was fixed, what was intentionally left alone, and any remaining migration debt.

When To Switch Skills

  • Switch to spatial-app-architecture when the core problem is scene ownership, feature decomposition, or state placement across surfaces.
  • Switch to build-run-debug when the main blocker is a build failure or a runtime issue that still needs reproduction after standards fixes.
  • Switch to test-triage when the work is primarily about narrowing a failing test scope rather than correcting standards violations directly.

Guardrails

  • Do not impose a blanket @MainActor policy. The isolation choice has to match ownership and runtime behavior.
  • In new SwiftUI or visionOS code, do not introduce ObservableObject, @StateObject, or @ObservedObject unless the user explicitly states a compatibility constraint or the existing architecture cannot yet leave Combine-based observation.
  • For Observation ownership, load observation-modeling.md instead of duplicating its @Observable, @State, and @Bindable rules here.
  • Do not "fix" concurrency warnings by introducing unnecessary Task.detached, DispatchQueue.main.async, or @unchecked Sendable.
  • Do not assume Swift 6.2 default actor isolation from memory; inspect project build settings when that choice affects the fix.
  • Do not modernize APIs mechanically if it changes semantics.

Output Expectations

Provide:

  • the files or symbols reviewed
  • which standards category was applied
  • the concrete violations fixed or still present
  • the validation step used
  • the next skill to use if the blocker is no longer a standards question

Comments

Markdown supported