setup
Initialize, upgrade, or migrate the claude-harness plugin in a project. Triggers on first-time setup, plugin installation, version migration, memory directory configuration, legacy file cleanup, and project harness initialization.
What this skill does
# Setup - Initialize or Upgrade Claude Harness
Initialize or upgrade claude-harness in the current project directory.
## Auto-Detection
This command automatically detects what needs to be done:
- **Fresh install**: Creates v3.0 structure from scratch
- **v2.x upgrade**: Migrates existing files to v3.0 memory architecture
- **Cleanup**: Removes legacy command copies from `.claude/commands/` (commands are now served from plugin cache)
**Note**: Commands and hooks are served from the plugin cache. `setup.sh` only initializes project-level state (memory directories, CLAUDE.md, .gitignore, migrations).
## Phase 0: Run setup.sh (Handles ALL Cases)
`setup.sh` handles fresh installs, v2.x migrations, and cleanup in a single script. **Always run it.**
**Steps:**
1. Find the plugin root path from the session context (look for "Plugin Root:" in the session start context)
2. Run: `bash {plugin-root}/setup.sh`
- **Fresh install**: Creates v3.0 structure, `.gitignore` patterns, CLAUDE.md
- **v2.x migration**: Detects legacy files, migrates to v3.0 structure, then creates missing files
- **Cleanup**: Removes stale command copies from `.claude/commands/` and legacy hooks
- Existing project files are **NEVER overwritten** (skipped automatically)
- `.gitignore` patterns are added if missing
3. Report what was created vs what was skipped
4. **Skip Phase 3** -- `setup.sh` handles it
**Fallback**: If the plugin root path is not available in the session context, fall through to Phase 1 -> Phase 4 (manual setup).
**Plugin updates**: Run `claude plugin update claude-harness` to update the plugin itself.
## Phase 3: Update Project .gitignore (FALLBACK -- only if setup.sh unavailable)
**CRITICAL**: You MUST update the project's `.gitignore` to exclude harness ephemeral files. This prevents uncommitted file clutter after `/checkpoint`.
**Execute these steps:**
1. Read the current `.gitignore` file (create if missing)
2. Check if `.claude-harness/sessions/` pattern exists in the file
3. If the pattern is NOT present, append these lines to `.gitignore`:
```
# Claude Harness - Ephemeral/Per-Session State
.claude-harness/sessions/
.claude-harness/memory/compaction-backups/
# Claude Code - Local settings
.claude/settings.local.json
```
4. Use the Edit tool to append these patterns to `.gitignore`
5. Report: "Updated .gitignore with harness ephemeral patterns"
**DO NOT SKIP THIS PHASE** - it is required for proper harness operation.
## File Schemas
Canonical schemas are defined in the plugin's `schemas/` directory (JSON Schema format). Key state files:
| File | Schema | Created By |
|------|--------|------------|
| `sessions/{id}/context.json` | `schemas/context.schema.json` (v3) | Phase 1 context compilation |
| `sessions/{id}/loop-state.json` | `schemas/loop-state.schema.json` (v8) | Phase 4 implementation |
| `sessions/{id}/autonomous-state.json` | `schemas/autonomous-state.schema.json` (v3) | `--autonomous` mode |
| `features/active.json` | `schemas/active-features.schema.json` (v3) | Phase 2 feature creation |
| `memory/procedural/failures.json` | `schemas/memory-entries.schema.json` (v3) | Verification failures |
| `memory/procedural/successes.json` | `schemas/memory-entries.schema.json` (v3) | Verification passes |
All other memory files (episodic, semantic, learned) use v3 schemas as created by `setup.sh`.
## After Setup
Report:
- What was done (fresh install / migration / version update)
- Files created or migrated
- Current plugin version
- Next steps:
1. Run `/claude-harness:start` to compile context and sync GitHub
2. For new projects: Run `/claude-harness:prd-breakdown @./prd.md` to analyze PRD and extract features
3. Use `/claude-harness:flow "description"` for end-to-end automated workflow (recommended)
4. Use `/claude-harness:flow --no-merge "description"` for step-by-step control
5. Use `/claude-harness:flow --fix feature-XXX "bug"` to create bug fixes
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.