harness-engineering
Skill3 starsChanged 53 days agoMITView on GitHub
Audit, restructure, and design harnesses — scheduled operational scripts, drift checkers, watchdogs, gated data pipelines wrapped around a repo or agent system. Use when helper scripts have grown past one screen, checkers are multiplying, or a harness subsystem needs a home. Not for one-off scripts, and not for application code that no scheduled check or gate runs.
27 other projects use a version of this.
Adopted by
Most recently taken up by
- dvy1987/agent-loomtheir own version, first seen Nov 15, 2026
- AnonymXXX/codex-harness-engineeringtheir own version, first seen Nov 10, 2026
- anuragsarkar97/skillstheir own version, first seen Nov 8, 2026
- Mark393295827/graph-engineering-architecturestheir own version, first seen Nov 8, 2026
- docxology/templatetheir own version, first seen Oct 30, 2026
- github/awesome-copilottheir own version, first seen Oct 25, 2026
Used with
Projects with it also use self-improvement-loops, bdi-mental-states and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
DVwebBiz11Skillself-improvement-loops
This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.
Also in 4 projects that use this
Downey6689Skillbdi-mental-states
Transforms external RDF context into BDI mental states. Invoke when modeling beliefs, desires, and intentions.
Also in 5 projects that use this
Downey6689Skillhosted-agents
Guidance for hosted/sandboxed agents. Invoke when running background agents in isolated VMs or multi-client setups.
Also in 5 projects that use this
DVwebBiz11Skilllong-horizon-prompting
This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.
Also in 4 projects that use this
AbdelrhmanAlquranSkilllatent-briefing
This skill should be used when the user asks to "share memory between agents", "KV cache compaction for multi-agent", "orchestrator worker context", "latent briefing", "reduce worker tokens", "cross-agent memory without summarization", or discusses Attention Matching compaction, recursive language models with workers, or token explosion in hierarchical agents.
Also in 4 projects that use this
abdullah1854Skillcontext-degradation
Also in 5 projects that use this
- +2 more from Downey6689
Other versions27 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 27
- github/awesome-copilot★ 41ksame name
- muratcankoylan/Agent-Skills-for-Context-Engineering★ 18ksame name
- kangarooking/kangarooking-skills★ 709same name
- magnus919/agent-skills★ 177same name
- brake71/1c-ssl-skills★ 85same name
- docxology/template★ 24same name
- charlesanim/harness-engineering★ 20same name
- fiveonecode/agent-skills★ 20same name
- DamonZS/Claude-Codex-Pro-Tool★ 15same name
- drewid74/ai_skills★ 8same name
17 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-harness-settings-paritySkill
- agent-operating-contract-evolutionSkill
- ai-coding-agent-delegationSkill
- arch-improvement-planSkill
- contract-bound-deliverablesSkill
- cross-agent-repair-routingSkill
- define-goalSkill
- delegated-work-acceptanceSkill
- design-an-interfaceSkill
- design-mdSkill
- discord-rich-messageSkill
- dotnet-repo-workflowSkill
- evidence-backed-analytical-writingSkill
- evidence-boundary-disciplineSkill
- find-nearbySkill
- gddSkill
- generated-runtime-repairsSkill
- ghc-searchSkill
- git-auto-sync-pipelinesSkill
- github-code-reviewSkill
- github-repo-managementSkill
- grounded-citationsSkill
- hermes-context-file-loadingSkill
- hermes-modelsSkill
- hermes-updatesSkill
- hoa-introspect-distillSkill
- hoa-introspectSkill
- hoa-skill-reviewSkill
- hoa-skill-workSkill
- html-artifactSkill
- jupyter-live-kernelSkill
- kanban-workflowsSkill
- m365-copilot-cdpSkill
- measurement-campaign-evidenceSkill
- microsoft-officeSkill
- notes-to-prdSkill
- ocr-and-documentsSkill
- official-document-verificationSkill
- omp-headless-orchestrationSkill
- ops-claim-verificationSkill
- package-release-verificationSkill
- plan-to-issuesSkill
- project-phase-closeoutSkill
- report-claim-auditSkill
- research-stream-consolidationSkill
- review-revision-candidatesSkill
- rss-feedsSkill
- skill-library-curationSkill
- skill-porting-and-publishingSkill
- spec-convergenceSkill
- structural-validity-gatesSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- teams-cdpSkill
- tmux-agent-controlSkill
- whisperSkill
- writing-plansSkill
- writingSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 3 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 24 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Self-containment: every repo/system owns its harness.
- Distinctive: line 38
No checks for checks' sake: every check must bind to an owner DECISION ("this finding triggers which action?").
- Very specific: line 89
pytestmay not be installed in a harness venv: Run tests the way the repo's sync script does (uv run --project <harness> python -m … - Distinctive: line 91
Never delete a checker without a timestamped backup: when its home is not a git repo, and never leave cron pointing at a deleted path — …
“Common” is measured: kept by at least 6 in 10 of the 24 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Harness Engineering
Harnesses (cron-run operational scripts, drift checkers, watchdogs, gated data pipelines around a repo or agent system) are engineered products, not scratch scripts. This skill covers how to review, restructure, and design them to this owner's standards.
When to Use
- "review / 重构 / 工程化 harness / helper scripts"、单文件脚本超长、检查器增殖
- designing a new harness home, consolidating checkers, deleting zombie dirs
- deciding where a harness subsystem belongs
Owner's architecture principles (always-on)
- Self-containment: every repo/system owns its harness. Never extract a repo's harness dependency into another repo or a shared library.
- Reuse boundary: within one git repo, extract common modules and maximize reuse; across repos, zero dependencies — a similar feature gets a copy in each repo (expect little real similarity: each harness is purpose-designed).
- Engineering standard: SOLID, real abstraction and modularity; functional style — less code for the same expression, data structures chosen for performance. Immutability is NOT required.
- No checks for checks' sake: every check must bind to an owner DECISION ("this finding triggers which action?"). No defensive validation written out of caution. Git is the byte layer, declaration files are the intent layer; checks only align the two.
Procedure
- Inventory and classify before judging.
- Line counts:
find <roots> \( -name '*.py' -o -name '*.sh' \) | xargs wc -l | sort -rn, excluding.venv,__pycache__, backups, and task-archive dirs (process records, not harness). - Live surface: the scheduler's job listing (
cron list --allfor whichever scheduler owns the box) plus skill/repo greps — a script nothing references is dead code, not a disease to refactor. - Classify each cluster: drift checks / observability / domain data pipeline / gated execution. A domain pipeline (finance capture, report generation) is a TENANT of the harness, not a gate — keep it out of the checker framework.
- Line counts:
- Reduce to root requirements. Drift control has three faces — read-path checks, write-path gates, single delivery path — not three requirements. Observability is the delivery mechanism of drift control, not a separate pillar.
- Audit obligations, not just job names, deletion-led. Produce a per-check keep/drop/relocate list with its bound owner decision and evidence. No decision → propose retirement with no invented successor report. Relocate only to a confirmed consumer/gate, not a hypothetical one. Drop invalid heuristics rather than moving them into a digest: zero use does not imply uselessness, upstream HEAD difference does not imply pinned-install drift, and prose-count/model-mention regexes are not declarations. A consolidation where every obligation survives is theater; fewer rare schedules is not a measured performance improvement.
- Design pure checks + a thin bounded runner. Checks are
(declarations, live_state) -> findings[], zero IO; adapters acquire read-only state, and the runner owns finding cache/dedup/delivery/TTL. Keep config repair/plugin install/destructive maintenance outside periodic detectors. Audit helper IO, not flag names, before calling check/dry-run/JSON modes. Bound each step so one stall cannot hide other findings; dedupe stable identity/severity, not changing ages/dates. Each check namesintent_ref,decisionandttl; validate registration at load time, not through a periodic checker-of-checkers. Notification state must be rebuildable from zero. Preserve independent execution, inputs and verdict ownership for producer/verifier boundaries; a mode flag or shared directory alone neither proves nor disproves independence. - Restructure with a net-negative live-code budget. Measure replaced reachable code and the proposed replacement, excluding rollback copies. Stage the replacement and fault fixtures, switch approved references coherently, then retire approved schedules without dual-run effects or coverage gaps; preserve rollback artifacts. Require healthy/silent behavior plus injected failure rejection, especially false-green paths. Do not invent a multi-week soak or repeated owner-read gate: use explicit acceptance criteria and report first scheduled proof separately. Roll back targeted definitions, not stale shared-state snapshots. A wrapper retaining every old check is not redesign.
- Keep the repo's own gates green at every step. For vault writes that means the vault's own stack (unit tests + status/structure audit + markdownlint), run through its documented environment.
Pitfalls
- A symbol name is not a directory reference.
reports.statusreads like a reference to a zombiereports/dir but resolved tocommands/reports.py. Grep for the path AND trace the actual resolution (a validator'sSCHEMA_DIR = Path(__file__).with_name("schemas")decides which same-named file is live) before deleting any "duplicate". - Two same-named files can both be live generations. Diff them: the stale subset copy is deletable; the superset is live. Deleting by name match alone removes the wrong one.
pytestmay not be installed in a harness venv. Run tests the way the repo's sync script does (uv run --project <harness> python -m unittest discover ...), not by assuming pytest.- Never delete a checker without a timestamped backup when its home is not a git repo, and never leave cron pointing at a deleted path — repoint cron in the same step as the migration.
- Deleting a checker silently disarms an alarm. Get owner sign-off on the kill list (one line per checker: name / bound decision / kill or keep / reason) before executing.
- An external-reference audit must cover from-imports, not just attribute refs. A splice
audit that greps
module.namemissesfrom module import name— a test module kept importing moved names and unittest surfaced it only as a loader error. Grep both forms across the whole tests/ dir, and treat a DROP in the discovered test count as a hard failure: a_FailedTestimport error replaces one module's tests with a single error entry, so "Ran 173" becoming "Ran 166 (errors=1)" means 7 tests vanished, not 7 skipped. - Line-splice refactors belong in a one-shot script, not hand-copying. Assert each block's
first line before extracting; verify seams with
ruff check --select F821,F401,F811(F821 catches missing imports the eye misses; E999 no longer exists in ruff); restore sources from git before each rerun instead of patching half-written output. - For hard architecture decisions, consult an external model as a second opinion via an other-model-family CLI one-shot; prepend "You have NO tools" to the prompt so it does not claim to have inspected the tree.
- Prove destructive retention/rotation logic with a live no-op run before its first real deletion. Configure the rule against the REAL data so it must delete nothing (keep ≥ existing count): a zero-deletion run on live paths proves the marker/prefix selection a synthetic fixture cannot, and leaves nothing to roll back — the first real deletion then happens only after the next natural produce cycle. Restrict eligibility to an exact dir prefix plus a completion marker, and fail closed when no complete generation exists.
- Test a "duplicated detector code" claim mechanically before designing the dedupe. Compute normalized-line overlap between the claimed duplicates (strip comments/blanks/imports, collapse whitespace, drop lines under ~25 chars): an overlap of a handful of lines means the duplication does not exist — revise the budget criterion or enumerate a real consumer rewiring instead of shipping another patch batch; an extraction designed against imagined duplication cannot meet the line cap and trades working code for a number.
- A commit gateway that prefix-matches
git diff --cached --name-onlyagainst an allowlist rejects every non-ASCII path.core.quotepath(on by default) escapes CJK filenames (raw/\350\267...), so a validraw/<中文主题>/_sources/<unit>entry never matches and the landing is refused as "outside allowed paths". Fix the tool (git -c core.quotepath=false ...on every name-only call), not the caller: a repo-levelgit config core.quotepath falseonly helps this machine and other agents keep failing. - Read the porcelain columns before calling a rejected gateway's index dirty.
git status --porcelainisXY path:M path(space in column 1) is an unstaged working-tree change — normal, nothing to clean;M pathis staged residue. Check the gateway's own rejection paths first: one that already runsgit resetbefore raising needs no manual cleanup, and reporting "index residue" from a misread column sends the next agent to fix a non-bug. Reset manually only when column 1 is actually set. - A gate that only runs at full strength gets bypassed while drafting; split it. Give scratch work a
soft mode that keeps the load-bearing invariant (a tagged fact still needs a resolving anchor, a schema
field still must parse) and drops the promotion ceremony (context binding, coverage thresholds, generated
sections). Enforce the boundary in the helper —
--softrejects any target outside the scratch root and is mutually exclusive with the promotion-context flags — and document the split in the helper's README, or the soft flag quietly becomes a general bypass. - Fixtures prove the code path, not the wiring: drive one live end-to-end run. Exercise the real writers in their real order (submit → digest → capture → gate → independent verifier) and park the artifact on a non-research surface (a maintenance record, a fixture-labelled source unit) so proving the pipeline does not pollute the corpus. Have a different role verify the record read-only, then fix what it flags — a verifier's first pass usually catches a classification error the builder rationalized.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

