dimillian/skills

repository·main·Indexed 26 days ago

https://github.com/dimillian/skills

A collection of 16 reusable, self-contained development skills for Apple platform engineering, GitHub workflows, and automated code review/refactoring swarms. Includes specialized tools for SwiftUI performance auditing, Swift concurrency, iOS debugging via XcodeBuildMCP, and multi-agent workflows like Bug Hunt and Review Swarms for root-cause investigation and diff reviews.

Tokens
55.2K
Snippets
119
Records
261
Agent score
86%

What's inside dimillian-skills

  1. Overview of available development skills

    main

    This repository provides a collection of 16 specialized skills for engineering tasks including Apple platform development, GitHub automation, React performance, and multi-agent code reviews.

    Apple Platform Skills

    • App Store Changelog: Generates user-facing release notes from git history.
    • iOS Debugger Agent: Builds, launches, and debugs iOS apps on simulators using XcodeBuildMCP.
    • macOS Menubar Tuist App: Focuses on Tuist and SwiftUI menubar apps.
    • macOS SwiftPM App Packaging (No Xcode): Scaffolds and packages SwiftPM-based macOS apps without Xcode projects.
    • Swift Concurrency Expert: Fixes Swift 6.2+ concurrency, actor isolation, and Sendable issues.
    • SwiftUI Liquid Glass: Implements iOS 26+ Liquid Glass APIs.
    • SwiftUI Performance Audit: Audits runtime performance (invalidation storms, layout thrash, etc.).
    • SwiftUI UI Patterns: Provides best practices for navigation, sheets, and async state.
    • SwiftUI View Refactor: Refactors views toward smaller subviews and correct Observation usage.

    Automation and Review Skills

    • GitHub: Operates on GitHub issues, PRs, and workflow runs via the gh CLI.
    • Bug Hunt Swarm: A four-agent investigation for reproduction and root-cause tracing.
    • Review Swarm: A four-agent diff review for regressions, security, and performance.
    • Review and Simplify Changes: Reviews git diffs for quality and applies safe fixes.
    • Orchestrate Batch Refactor: Executes large-scale refactors using dependency-aware work packets.

    Performance and Auditing Skills

    • React Component Performance: Diagnoses re-render churn and unstable props in React.
    • Project Skill Audit: Recommends new skills based on project history and conventions.
  2. Manage concurrency behavior in Swift 6.2 mode

    main

    When working in Swift 6.2 approachable concurrency mode, expect the following behaviors:

    • Async function execution: Async functions stay on the caller's actor by default and do not hop to a global concurrent executor unless explicitly configured.
    • Main-actor-by-default: Reduces data race errors for UI-bound code and global state by implicitly protecting mutable state.
    • Protocol isolation: Protocol conformances can be isolated (e.g., extension Foo: @MainActor Bar).
  3. Browse SwiftUI Cross-cutting references

    main

    For architectural and non-component-specific guidance, refer to the cross-cutting references:

    • App wiring and dependency graph (references/app-wiring.md): Wiring the app shell, installing shared dependencies, and environment management.
    • Async state and task lifecycle (references/async-state.md): Data loading, reacting to input, and cancellation/debouncing.
    • Previews (references/previews.md): Using #Preview, fixtures, mock environments, and isolated preview setup.
    • Performance guardrails (references/performance.md): Managing large, scroll-heavy, or frequently updated screens to avoid re-renders.
  4. Use the review-and-simplify-changes skill

    main

    The review-and-simplify-changes skill allows you to review a git diff or specific files for code reuse, quality, efficiency, clarity, and standards. It can also apply safe, high-confidence, behavior-preserving fixes.

    Trigger this skill by asking to:

    • "simplify code"
    • "review changed code"
    • "check for code reuse"
    • "review code quality"
    • "review efficiency"
    • "simplify changes"
    • "clean up code"
    • "refactor changes"
    • "run simplify"
  5. Use the Orchestrate Batch Refactor skill

    main

    The orchestrate-batch-refactor skill is designed for planning and executing large-scale refactors or rewrites. It uses parallel multi-agent analysis to decompose a large scope into independent work packets, which are then executed by sub-agents.

    When to use

    • Use for: Medium to large scope changes touching many files or subsystems.
    • Avoid for: Tiny edits or highly coupled, single-file work where multi-agent execution adds unnecessary overhead.

    Required Inputs

    • Repo path and target scope: Specific paths, modules, or feature areas.
    • Goal type: refactor, rewrite, or hybrid.
    • Constraints: Requirements such as behavior parity, API stability, deadlines, or specific test requirements.
  6. Initialize non-optional View Models with @State

    main

    If a view model is required or already present, avoid optional view models and 'bootstrap' patterns. Instead, pass dependencies via init and initialize the view model as a non-optional @State property.

    @State private var viewModel: SomeViewModel
    
    init(dependency: Dependency) {
        _viewModel = State(initialValue: SomeViewModel(dependency: dependency))
    }
  7. Prevent observation fan-out (iOS 17+ and legacy)

    main

    Reading broad properties from an @Observable class (iOS 17+) or an ObservableObject (iOS 16 and earlier) can cause wide invalidation. If many descendant views read from a large shared object, a small change to one property can trigger a massive re-render across the entire tree.

    Remediation:

    • Use narrower derived inputs.
    • Use smaller observable surfaces.
    • Move per-item state closer to the leaf views.
    // BAD: Broad @Observable read
    @Observable final class Model {
        var items: [Item] = []
    }
    
    var body: some View {
        Row(isFavorite: model.items.contains(item))
    }
  8. Implement core deep link patterns

    main

    To route external URLs into in-app destinations effectively, follow these core patterns:

    1. Centralize URL handling: Manage all logic within a router using methods like handle(url:) or handleDeepLink(url:).
    2. Inject an OpenURLAction handler: Delegate URL opening requests to your router via the environment.
    3. Use .onOpenURL: Capture app scheme links and convert them to web URLs if necessary.
    4. Decide navigation vs. external opening: Let the router determine if a URL should trigger internal navigation or be passed back to the system.

    Design Best Practices:

    • Keep URL parsing and decision logic strictly inside the router.
    • Avoid handling deep links in multiple places; use a single entry point.
    • Always provide a fallback to OpenURLAction or UIApplication.shared.open for unhandled URLs.
  9. Centralize destination mapping with a View modifier

    main

    To avoid duplicating switch statements for route mapping across multiple screens, create a custom View extension. This allows you to apply the destination mapping once per stack using a single modifier.

    extension View {
      func withAppRouter() -> some View {
        navigationDestination(for: Route.self) { route in
          switch route {
          case .account(let id):
            AccountView(id: id)
          case .status(let id):
            StatusView(id: id)
          }
        }
      }
    }
    
    // Usage:
    NavigationStack(path: $routerPath.path) {
      TimelineView()
        .withAppRouter()
    }
  10. Collect release changes using collect_release_changes.sh

    main
    To gather commits and touched files for a changelog, run the scripts/collect_release_changes.sh script from the repository root. By default, it gathers changes since the last git tag. You can specify a specific tag or reference as an argument to define the range.