# Codebase harness setup instructions

> Preps a codebase so an AI assistant can build and test it reliably.

- **What it does:** Goes through an unfamiliar codebase and sets it up so an AI coding assistant can understand it, run it with one command, and check its own work — saving you repeated setup pain.
- **Agents:** Claude Code and Codex (through orbit-connect), Claude and ChatGPT (through the Orbit connector)
- **Install:** `npx -y --loglevel=error orbit-connect@0.3.33 install skl_cd775f0cf53f1c04e832f0aa`
- **Creator:** Mariah Brunner (@itsmariahbrunner) on Instagram
- **Reach:** Creators' posts about it have 435 views
- **Safety:** Checked by Orbit: nothing risky found in what it runs or reads
- **Last updated:** 2026-11-14
- **Page:** https://orbitinbox.app/s/codebase-harness-setup

## Skill

---
name: setup-codebase-harness
description: Use when onboarding a repo to agent-driven development: makes it legible, executable and verifiable (slim CLAUDE.md, custom lints, dev stack, e2e, verify loop).
---

# Set Up the Codebase Harness

## What this does
Harness engineering: the model is fixed, so you engineer the scaffolding around it (environment, docs, feedback loops) so an agent can build and verify software with little human attention. This skill makes a repo legible, executable and verifiable.

## When to use
Use when onboarding a new or unfamiliar codebase, or when asked to "set up the harness", "make this repo agent-ready" or "harness this codebase".

## How to run it
Work incrementally and depth-first: assess what exists, build the one missing capability, use it to unlock the next. Set up only what the repo needs. When the agent struggles, ask "what capability is missing, and how do I make it legible and enforceable?"

0. **Assess.** Survey the stack, package manager, services/ports, infra, existing docs/tests/CI, and implicit rules buried in READMEs and PR comments. Note what is missing per pillar.

1. **Legible.** What the agent can't see doesn't exist, so push knowledge into versioned repo files.
   - a) Map, not manual: shrink the root `AGENTS.md`/`CLAUDE.md` to a ~100-line table of contents (one-line overview, project tree, golden rules, a "where to look" table). Move depth into a structured `docs/` system-of-record with a `docs/index.md`.
   - b) Custom lints with remediation: turn each golden rule into a mechanical check (layering/dependency direction, naming, no-`any`, forbidden imports, file size, structured logging). Write error messages that inject the fix ("X isn't allowed here - do Y"). Wire them into the linter and CI.
   - c) Optional: ask the user before installing a code-graph indexer such as codebase-memory-mcp (https://github.com/DeusData/codebase-memory-mcp) so the agent can trace callers and data flow.
   - d) Later: a doc-freshness pass that flags docs that no longer match the code.

2. **Executable.**
   - Use `dev-local-setup` for a one-command local stack (`scripts/dev-local.sh up`).
   - Make the app drivable: browser via the `playwright-cli` skill, logs reachable.
   - Use `crabbox-setup` for an isolated cloud box per agent when loops run concurrently (one laptop can't host N full stacks).

3. **Verifiable.**
   - Use `e2e-setup` for a trustworthy e2e gate: real flows, a reusable auth/session helper, layered assertions, video/trace evidence, sandbox-only external services.
   - Use `verifier-setup` to scaffold a repo-specific `/verify` skill: a fresh verifier sub-agent drives the real app, the main agent fixes until green, runs the regression sweep, and opens a PR with a reviewable proof link.

4. **Keep it coherent.**
   - Commit hygiene: conventional commits plus format/lint on commit (husky, lint-staged, commitlint). Keep merge gates light.
   - Garbage collection: encode golden principles, then run periodic cleanup passes that open small refactor PRs.
   - Agent-to-agent review (independent reviewers) for correctness-critical changes.

Order: 1a (map) -> 2 (dev-local) -> 3 (e2e + verifier-setup), then 1b (lints) and 4 as the repo matures. If a named sub-skill is not installed, do that step directly following its description.

## Output
A slim map plus `docs/`, `scripts/dev-local.sh`, an `e2e/` suite, a generated `/verify` skill, and custom lints. Prefer boring, composable, stable tech the agent can fully model.

Credit: Based on public content by AI-Builder-Club, packaged by Orbit.

Shared by Mariah Brunner, credited on Orbit.