harness-engineering
できること
このツールは、AIアシスタントがコーディングプロジェクトでより確実に作業できるようにするものです。繰り返し起きるミスをルールやチェックの仕組みに変えて、同じ問題が再び起きないようにします。
使う場面
- ✓AIアシスタントにプロジェクトでのミスを減らしてほしいとき。
- ✓プロジェクトでAIアシスタントが守るべき明確なルールを作りたいとき。
- ✓すでに起きたエラーを記録し、繰り返されないようにしたいとき。
スキルのリンク
https://github.com/github/awesome-copilot/blob/main/skills/harness-engineering/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“すでに起きたミスを防げるように、このプロジェクトをコーディングアシスタントにとってより信頼できるものにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールはプロジェクトを分析して、仕組みと、これまでに起きたエラーを把握します。そのうえで、プロジェクト専用の具体的な指示やチェックの仕組みを作成し、AIが今後同じエラーを起こさないように支援します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)を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.
…
よくある質問
「リポジトリ成果物」とは何ですか?
プロジェクト内にある、AIアシスタントの動作を導いたり検証したりするためのファイルや設定のことです。指示ファイル、テスト、スクリプトなどが含まれます。
このツールは、繰り返しのエラーをどのように防ぐのですか?
エラーを「失敗の記録」として蓄積し、そのエラーが再び起きないように、テストやスクリプトといったチェックの仕組みを作成します。
使うにはプログラミングの知識が必要ですか?
いいえ、経験豊富なプログラマーである必要はありません。コードの技術的な詳細がわからなくても使えるように設計されています。
詳細
作者による元の説明
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
人気
- GitHubのスター
- 40k
- ランキング
- #7245
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
acquire-codebase-knowledge
40kエージェントが、既存のコードプロジェクトを理解してドキュメント化できるよう支援します。新しく参加するメンバーのオンボーディングや、アーキテクチャの全体像の把握に役立ちます。
acreadiness-assess
40kエージェントが、プロジェクトのAI対応状況を評価してレポートを生成できるよう支援します。プロジェクトがAIツールをどの程度活用できる状態にあるかを把握するのに役立ちます。
acreadiness-generate-instructions
40kエージェントが、評価結果をもとにAIツール向けの指示文を作成できるよう支援します。AIがコードとどのようにやり取りするかを改善し、特定された不足点を解消するのに役立ちます。
acreadiness-policy
40kエージェントが、AIプロジェクトの評価ポリシーの策定や適用を支援できるようにします。プロジェクトの評価方法を標準化し、コンプライアンスを確保するのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。