skills/install-harness/SKILL.md
Install the agent harness into a target project. Detects project type (greenfield vs existing), copies skills, and delegates to the appropriate bootstrap command.
npx skillsauth add alchemishty/agent-harness install-harnessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are installing the agent harness framework into the current project. Follow these steps exactly in order.
Ask the user where the agent-harness repository is located. Before asking, attempt auto-detection:
../agent-harness/ exists relative to the current working directory.~/agent-harness/ exists.AGENT_HARNESS_PATH is set and points to a valid directory.If any of these exist, present the detected path and ask the user to confirm or provide an alternative:
I detected the agent-harness repository at
<detected-path>. Is this correct, or should I use a different path?
If none are detected, ask:
Where is the agent-harness repository located? Please provide the absolute path.
Store the confirmed path as HARNESS_PATH for the rest of this skill.
Verify that HARNESS_PATH contains the expected structure. Check for the existence of ALL of the following:
HARNESS_PATH/references/ directoryHARNESS_PATH/skills/ directoryHARNESS_PATH/enforcement/ directoryHARNESS_PATH/hooks/ directoryHARNESS_PATH/harness.schema.yaml fileHARNESS_PATH/references/agents-md-reference.md fileHARNESS_PATH/references/architecture-reference.md fileHARNESS_PATH/references/conventions-reference.md fileHARNESS_PATH/references/testing-reference.md fileHARNESS_PATH/references/doc-structure-reference.md fileHARNESS_PATH/references/context-management-reference.md fileIf any are missing, report exactly which files/directories are absent and stop. Tell the user:
The harness repository at
<path>is incomplete. Missing:<list>. Please ensure the harness repo is fully set up before running this command.
Do NOT proceed if verification fails.
Analyze the current working directory (the target project) to determine whether it is a greenfield or existing project.
Count files in the project, excluding these directories:
.git/node_modules/.dart_tool/build/dist/.next/target/__pycache__/.venv/venv/.idea/.vscode/Count only files with common source extensions: .dart, .py, .ts, .tsx, .js, .jsx, .go, .rs, .java, .kt, .swift, .c, .cpp, .h, .rb, .ex, .exs.
Look for any of these files in the project root:
pubspec.yaml (Dart/Flutter)package.json (Node.js/TypeScript)pyproject.toml or setup.py or requirements.txt (Python)go.mod (Go)Cargo.toml (Rust)pom.xml or build.gradle or build.gradle.kts (Java/Kotlin)Gemfile (Ruby)mix.exs (Elixir)Apply these rules:
Present your findings and ask the user to confirm:
I scanned the project and found <N> source files and <detected configs or "no package manager configs">.
This looks like a <greenfield|existing> project. Is that correct?
If the user disagrees, use their classification instead.
Before copying anything, check if the project already has harness artifacts:
.claude/commands/ directory with skill filesharness.yaml in the project rootAGENTS.md in the project rootdocs/architecture.md, docs/conventions.md, docs/domain.md, docs/testing.mdIf any exist, warn the user:
This project already has some harness artifacts:
<list>. Installing will overwrite these. Do you want to proceed? (Overwrite all / Keep existing and only add missing / Cancel)
Respect the user's choice. If they say "Keep existing and only add missing", skip files that already exist during all subsequent steps.
Create the .claude/commands/ directory in the target project if it does not exist.
Copy skill files from HARNESS_PATH/skills/ into the target project. Each skill is in a subdirectory with a SKILL.md file (e.g., skills/implement-feature/SKILL.md).
For each skill subdirectory, copy SKILL.md to the target as <skill-name>.md. For example:
HARNESS_PATH/skills/implement-feature/SKILL.md → .claude/commands/implement-feature.mdHARNESS_PATH/skills/create-plan/SKILL.md → .claude/commands/create-plan.mdDo NOT copy these (they stay in the harness repo only):
install-harness (this skill)bootstrap-greenfield (bootstrap-only)bootstrap-existing (bootstrap-only)migrate-harness (harness-repo-only)Special handling for project-structure-validator:
.claude/agents/project-structure-validator.md (NOT .claude/commands/).claude/agents/ directory if it does not existAll other skill files go to .claude/commands/.
For each file copied, verify it was written correctly by reading it back and checking it is non-empty.
Report what was copied:
Copied the following skills to
.claude/commands/:
<filename1><filename2>- ...
Copied to
.claude/agents/:
project-structure-validator.md
Based on the project type determined in Step 3:
If greenfield: Invoke /bootstrap-greenfield and pass HARNESS_PATH as context. Tell the user:
Project classified as greenfield. Starting greenfield bootstrap...
If existing: Invoke /bootstrap-existing and pass HARNESS_PATH as context. Tell the user:
Project classified as existing. Starting existing project bootstrap...
The bootstrap skill will handle generating harness.yaml, AGENTS.md, docs/, enforcement/, and all other project-specific artifacts.
If any step fails:
/install-harness.documentation
Post-implementation retrospective that captures learnings to memory and proposes doc improvements
testing
Validate and fix project structure against architecture rules
tools
Migrate project scaffolding to match the latest harness version. Adds new directories (memory/, scratch/), new harness.yaml fields, and suggests AGENTS.md updates. For plugin users this handles what a plugin update cannot — project-level structure changes. For git-clone users this also updates copied skill files.
tools
Autonomous feature implementation orchestrator