$npx -y skills add Shpigford/chops --skill setupGet a new developer up and running with the Chops codebase — prerequisites, build, architecture, and common tasks.
| 1 | Set up the Chops development environment and orient a new contributor to the codebase. |
| 2 | |
| 3 | ## Instructions |
| 4 | |
| 5 | ### Step 1: Check prerequisites |
| 6 | |
| 7 | Verify these are installed. If any are missing, tell the user what to install and stop. |
| 8 | |
| 9 | 1. **macOS 15+** — `sw_vers -productVersion` (must be ≥ 15.0) |
| 10 | 2. **Xcode CLI tools** — `xcode-select -p` (if missing: `xcode-select --install`) |
| 11 | 3. **Homebrew** — `which brew` (if missing: direct them to https://brew.sh) |
| 12 | 4. **xcodegen** — `which xcodegen` (if missing: `brew install xcodegen`) |
| 13 | |
| 14 | ### Step 2: Generate Xcode project |
| 15 | |
| 16 | ```bash |
| 17 | xcodegen generate |
| 18 | ``` |
| 19 | |
| 20 | This reads `project.yml` (the source of truth for all Xcode project settings) and generates `Chops.xcodeproj`. Re-run this anytime `project.yml` changes. Never edit the `.xcodeproj` directly. |
| 21 | |
| 22 | ### Step 3: Build and run |
| 23 | |
| 24 | ```bash |
| 25 | xcodebuild -scheme Chops -configuration Debug build |
| 26 | ``` |
| 27 | |
| 28 | Or open in Xcode and hit Cmd+R: |
| 29 | |
| 30 | ```bash |
| 31 | open Chops.xcodeproj |
| 32 | ``` |
| 33 | |
| 34 | ### Step 4: Orient the developer |
| 35 | |
| 36 | Share this architecture overview: |
| 37 | |
| 38 | **Entry point:** `Chops/App/ChopsApp.swift` — sets up SwiftData ModelContainer (Skill + SkillCollection), starts Sparkle updater, injects AppState into environment. |
| 39 | |
| 40 | **State:** `Chops/App/AppState.swift` — `@Observable` singleton holding UI state (selected tool, selected skill, search text, sidebar filter). |
| 41 | |
| 42 | **Models (SwiftData):** |
| 43 | - `Chops/Models/Skill.swift` — a discovered skill file, uniquely identified by resolved symlink path |
| 44 | - `Chops/Models/Collection.swift` — user-created groupings of skills |
| 45 | - `Chops/Models/ToolSource.swift` — enum of supported tools with display names, icons, colors, and filesystem paths |
| 46 | |
| 47 | **Services:** |
| 48 | - `Chops/Services/SkillScanner.swift` — probes tool directories, parses frontmatter, upserts into SwiftData. Deduplicates via resolved symlink paths. |
| 49 | - `Chops/Services/FileWatcher.swift` — FSEvents via DispatchSource, triggers re-scan on file changes |
| 50 | - `Chops/Services/SkillParser.swift` — dispatches to FrontmatterParser (.md) or MDCParser (.mdc) |
| 51 | - `Chops/Services/SearchService.swift` — in-memory full-text search |
| 52 | |
| 53 | **Views:** Three-column NavigationSplitView (Sidebar → List → Detail). Editor wraps NSTextView for native text editing. Cmd+S save via FocusedValues. |
| 54 | |
| 55 | **Key design decisions:** |
| 56 | - No sandbox — the app needs unrestricted filesystem access to read dotfiles across ~/ |
| 57 | - Symlink dedup — same file in multiple tool dirs shows as one skill with multiple tool badges |
| 58 | - No test suite — validate manually by building, running, and observing |
| 59 | |
| 60 | **Scanned tool paths:** |
| 61 | |
| 62 | | Tool | Paths | |
| 63 | |------|-------| |
| 64 | | Claude Code | `~/.claude/skills/`, `~/.agents/skills` | |
| 65 | | Cursor | `~/.cursor/skills/`, `~/.cursor/rules` | |
| 66 | | Windsurf | `~/.codeium/windsurf/memories/`, `~/.windsurf/rules` | |
| 67 | | Codex | `~/.codex` | |
| 68 | | Amp | `~/.config/amp` | |
| 69 | |
| 70 | Copilot and Aider detect project-level skills only (no global paths). |
| 71 | |
| 72 | ## Common tasks to be aware of |
| 73 | |
| 74 | **Add a new tool:** Add a case to `ToolSource` enum in `Chops/Models/ToolSource.swift`. Fill in `displayName`, `iconName`, `color`, `globalPaths`. Update `SkillScanner` if the tool uses a non-standard file layout. |
| 75 | |
| 76 | **Modify parsing:** Frontmatter → `Chops/Utilities/FrontmatterParser.swift`. Cursor .mdc → `Chops/Utilities/MDCParser.swift`. Dispatch logic → `Chops/Services/SkillParser.swift`. |
| 77 | |
| 78 | **Change UI:** Views are in `Chops/Views/` (Sidebar/, Detail/, Settings/, Shared/). Main layout is `Chops/App/ContentView.swift`. |
| 79 | |
| 80 | ## Important Rules |
| 81 | |
| 82 | - `project.yml` is the source of truth for Xcode settings — never edit `.xcodeproj` directly |
| 83 | - Sparkle (auto-updates) is the only external dependency — pulled automatically via SPM |
| 84 | - There is no test suite — always validate changes by building and running the app manually |
| 85 | - The app runs without sandbox — this is intentional and required |