harness-engineering
Has your agent learn from past coding mistakes. It creates lasting instructions and tests to prevent the same errors from happening again.
What it does
This tool helps make coding projects more reliable for AI assistants. It turns repeated mistakes into rules and checks that prevent the same problems from happening again.
When to use it
- ✓When you want an AI assistant to make fewer mistakes on a project.
- ✓To create clear rules that AI assistants should follow in a project.
- ✓To record errors that have already happened and ensure they don't repeat.
Example of what to ask your AI
“Make this project more reliable for coding assistants, preventing mistakes that have already happened.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool analyzes the project to understand how it works and what errors have occurred. It then creates specific instructions and checks for the project, helping the AI avoid these errors in the future.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add github/awesome-copilot --skill harness-engineeringOr download just the file:
curl -L https://raw.githubusercontent.com/github/awesome-copilot/main/skills/harness-engineering/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Harness Engineering
Harness engineering turns repeated coding-agent mistakes into durable repository artifacts:
Harness = Instructions + Constraints + Feedback + Memory + Evaluation + Governance
Use this skill when the user asks to:
- make a repository more reliable for GitHub Copilot or other coding agents
- add durable agent instructions, repository rules, or guardrails
- prevent repeated AI coding-agent mistakes
- record known failure paths and the checks that prevent recurrence
- add lightweight drift checks for project rules
- review, refresh, or update an existing agent harness
Do not use this skill for ordinary feature implementation unless the user asks to improve the repository's agent operating environment.
Core Principles
- Treat the target repository as the source of truth.
- Inspect before editing. Preserve the existing stack, package manager, CI, docs, naming, and architecture.
- Add the smallest useful harness. Prefer updating existing files over adding duplicate guidance.
- Make important rules enforceable where practical through tests, linters, type checks, CI, pre-commit hooks, or drift scripts.
- Use manual review points only when automation would be brittle or misleading.
- Record high-risk failures that should not recur, and name the check or review point that catches recurrence.
- Do not copy generic templates blindly. Adapt every artifact to real evidence in the target repository.
Discovery
Before proposing or making harness changes, inspect the repository for existing rules and evidence.
Read these files and folders when they exist:
README.mdAGENTS.md.github/copilot-instructions.md.github/instructions/.github/workflows/CONTRIBUTING.md- package manifests such as
package.json,pyproject.toml,go.mod,Cargo.toml,pom.xml, orbuild.gradle - existing docs under
docs/ - existing scripts under
scripts/ - existing tests and CI checks
Then summarize:
- stack, package manager, and entry points
- existing development and verification commands
- current agent instructions or repository conventions
- known failures, incidents, flaky paths, or repeated review comments
- gaps where project rules are not enforced
Adoption Workflow
Follow this sequence:
- Choose the harness surface that fits the target repository.
- Write target-specific agent instructions.
- Add enforceable checks for high-value rules.
- Record failure memory for high-risk or recurring failures.
- Add drift checks for guidance that can silently become stale.
- Report the adoption with evidence, assumptions, and follow-up.
1. Choose the Harness Surface
Pick only the surfaces that fit the target repository:
| Need | Preferred artifact |
|---|---|
| Always-on agent behavior | AGENTS.md or .github/copilot-instructions.md |
| File-scoped guidance | .github/instructions/*.instructions.md |
| Recurring project checks | scripts/check_*.py, shell scripts, or package scripts |
| CI enforcement | existing workflow files or a small new workflow |
| Known failures | docs/failures/*.md |
| Architecture or process decisions | docs/decisions/*.md |
| Adoption evidence | docs/harness/adoption-report.md or similar |
If the repository already has an equivalent location, update it instead of creating a parallel system.
2. Write Agent Instructions
Agent instructions should be concrete and operational. Include:
- project purpose and major ownership boundaries
- setup, test, lint, build, and verification commands
- package manager and dependency rules
- safe editing rules, generated file rules, and forbidden paths
- testing expectations for changed code
- PR and commit conventions if the repo has them
- how to record new failures or decisions
Avoid broad personality guidance, generic best practices, and rules that cannot be checked or reviewed.
3. Add Enforceable Checks
Convert high-value rules into checks. Good harness checks are:
- narrow enough to avoid false positives
- fast enough to run locally and in CI
- named clearly so agents can run them before finishing
- documented with the rule they protect
Examples:
Rule: Do not edit generated API clients.
Check: script scans diffs for generated paths and fails with a clear message.
Rule: Every failure memory note names a regression check.
Check: script validates docs/failures/*.md for a "Detection" section.
Rule: Profile docs and templates must stay aligned.
…
FAQ
What are 'repository artifacts'?
These are files and configurations within your project (like instruction files, tests, or scripts) that help guide and verify the behavior of AI assistants.
How does the tool prevent repeated errors?
It turns errors into 'failure memory' and creates checks (like tests or scripts) that detect and prevent these errors from occurring again.
Do I need to know how to code to use this?
No, you don't need to be an experienced programmer. The tool is designed to be used even if you don't understand the technical details of the code.
Details
Original description by the author
Adopt repository-level harness engineering for coding agents. Use when a user wants to prevent repeated AI coding-agent mistakes by turning failures into durable instructions, drift checks, regression tests, failure memory, and adoption reports tailored to the target repository.
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #5188
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
Helps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
github/awesome-copilot
acreadiness-assess
Enables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
github/awesome-copilot
acreadiness-generate-instructions
Helps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
github/awesome-copilot
acreadiness-policy
Enables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
github/awesome-copilot
Similar skills
benchmark-optimization-loop
Has your agent improve something's speed in a measured way. It tests multiple versions and chooses the fastest one that still works correctly.
affaan-m/ECC
change-impact
Helps your agent analyze the impact of code changes before making them. It compares the planned vs. actual results afterward, covering paths, data, tests, and documentation. Useful for risky or system-wide changes.
affaan-m/ECC
click-path-audit
Lets your agent trace all user buttons and interactions to find bugs. It finds issues where functions seem to work alone but fail together. Useful when bugs persist even after debugging.
affaan-m/ECC