harness-compile

Compile harness.yaml into native configuration artifacts for Claude Code, Cursor, and GitHub Copilot.

9|2|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/harnessprotocol/harness-kit --skill harness-compile
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: harness-compile
Source: https://github.com/harnessprotocol/harness-kit/tree/main/plugins/harness-share/skills/harness-compile
Command: npx skills add https://github.com/harnessprotocol/harness-kit --skill harness-compile

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It eliminates the repetitive, tool-by-tool work of maintaining separate AI coding instructions, MCP server configs, and permissions by compiling everything from a single harness.yaml source of truth.

Core Features & Use Cases

  • Deterministic cross-tool compilation: Generates native instruction files for Claude Code, Cursor, and GitHub Copilot from one harness.yaml.
  • MCP server config generation: Writes .mcp.json, .cursor/mcp.json, and .vscode/mcp.json from the harness mcp-servers section with safe merge behavior.
  • Safe, re-compilable marker updates: Wraps all generated content in harness-managed markers to support repeat runs without clobbering manual edits.
  • Target selection & preview controls: Supports --target, --dry-run, --clean, and --verbose for controlled updates and reporting.

Quick Start

Tell the AI: compile your harness.yaml for Cursor and Claude Code by running /harness-compile --target claude-code --target cursor ./harness.yaml.

Frequently Asked Questions about harness-compile

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep AI coding instructions and MCP server configs consistent across Claude Code, Cursor, and GitHub Copilot?

You can maintain a single harness.yaml source of truth and compile it into native configuration artifacts for Claude Code, Cursor, and Copilot. This deterministic cross-tool compilation generates instruction files and MCP server configs while keeping permissions consistent across all environments.

Can I preview configuration changes before applying them to my repository?

Yes, you can use the --dry-run flag to preview generated configuration artifacts before writing them. Running harness-compile with --dry-run reports the intended updates to instruction files and MCP server configs without modifying your existing repository setup.

How does compiling a harness.yaml handle existing MCP server definitions without overwriting manual edits?

The compiler wraps all generated content in harness-managed markers and uses safe merge behavior for existing MCP server definitions. This marker-based approach supports repeat runs and re-compilation without clobbering manual edits outside the managed sections.

What's the best way to generate tool-specific configuration files from a single source for multiple AI coding tools?

Compiling a single harness.yaml is the best way to generate tool-specific files like .mcp.json, .cursor/mcp.json, and .vscode/mcp.json. It applies deterministic generation with target selection flags like --target to output native configurations for each specific AI coding tool.

Does harness-compile support cleaning up previously generated configuration artifacts?

Yes, the compiler supports the --clean flag to remove previously generated configuration artifacts. This allows you to reset managed instruction files and MCP server configurations before running a fresh compilation of your harness.yaml.