Agent skill · Agent Skills for Context Engineering
/harness-engineering Build autonomous agent loops that cannot game their metric
This skill designs the control system around an autonomous agent. It sorts every file and action into four classes (locked, editable, append-only, or reserved for a human), requires fast and hard-to-game feedback, keeps state in durable logs, and adds novelty, pruning and rollback rules. Agents may prepare pull requests, but merging, deploying and credentials stay with a person.
Works with
- Claude Code
- Cursor, Codex, Claude Code
Used forBuilding skills and MCP
When to use it
- You want an agent to run experiments or research for hours with little supervision.
- An optimizing agent has started tweaking the benchmark instead of the work.
- You are building a background agent that opens pull requests.
How it works
- 1Define surfaces
States the objective in one sentence and assigns every file or action to locked, editable, append-only or human-controlled.
- 2Set feedback and states
Chooses a metric, rubric, tests or human review, and defines keep, discard, crash, timeout and review outcomes.
- 3Log durably
Creates a thread log and results files before the loop starts, recording failures and rejected ideas too.
- 4Add search discipline
Requires novelty checks, pruning rounds and scheduled source refreshes, and prefers simpler candidates at equal quality.
- 5Validate the harness
Runs the harness against a known good artifact and a known bad one before letting it loose.
What it steers the agent away from
- Agents editing the evaluator and then scoring themselves with it.
- Plans kept only in chat that vanish after compaction.
- Treating permission to prepare a PR as permission to merge it.
Install this skill
It installs with the Agent Skills for Context Engineering pack.
Claude Code (plugin marketplace)Installs all published skills as one plugin; they activate from task context.
/plugin marketplace add muratcankoylan/Agent-Skills-for-Context-Engineering
/plugin install context-engineering@context-engineering-marketplaceCursor, Codex, Claude Code (single skill copy)Run from a clone of the repo; copy whole folders, since flattening SKILL.md breaks its reference links.
mkdir -p .cursor/skills
cp -R skills/context-fundamentals .cursor/skills/
mkdir -p .claude/skills
cp -R skills/context-fundamentals .claude/skills/
mkdir -p .codex/skills
cp -R skills/context-fundamentals .codex/skills/Commands come from the author’s README; check it for changes before you run them.
Questions
What is the minimal example it builds on?
Karpathy's autoresearch setup: one editable file, a locked evaluation file, a fixed time budget, one metric, git rollback and a results log.
Can monitoring agents act on what they see?
The skill keeps them read-only by default and asks them to cite the files behind each claim.
More guides from Agent Skills for Context Engineering
/context-compressionCompress long agent sessions without losing the file trailDesigns structured, incremental session summaries that keep file trails and decisions, and tests them with probe questions.Read the guide →/filesystem-contextUse files as overflow memory for agentsMoves large tool outputs, plans, logs and sub-agent findings into files the agent searches on demand instead of keeping in chat.Read the guide →/multi-agent-patternsDecide when multiple agents help and how to wire themChooses between supervisor, swarm and hierarchical agent setups, with isolation mechanisms, handoffs and failure mitigations.Read the guide →/tool-designDesign agent tools that get picked and called correctlyWrites agent-facing tool descriptions, schemas and recoverable errors, and merges overlapping tools into fewer clear ones.Read the guide →
Also in this pack
/advanced-evaluationSets up LLM-as-judge scoring, pairwise comparison and rubric calibration, with mitigations for known judge biases.↗/bdi-mental-statesModels agent beliefs, desires and intentions from RDF context using BDI ontology patterns for traceable deliberation.↗/context-degradationDiagnoses five failure patterns in long contexts, from lost-in-middle and poisoning to clashing instructions, with signals and fixes for each.↗/context-fundamentalsExplains what a context window holds, how attention is spread across it and why fewer high-signal tokens beat more tokens.↗/context-optimizationCuts token cost with context budgets, observation masking, prefix caching and partitioning, measured against answer quality.↗/hosted-agentsPlans background coding agents in remote sandboxes with prebuilt images, warm pools, snapshots and multiplayer sessions.↗/latent-briefingShares an orchestrator's trajectory with workers by compacting it in the worker's KV cache when you control the runtime.↗/long-horizon-promptingWrites launch briefs for agents that run for hours, with exact success predicates, stop rules, audit gates and worker contracts.↗/memory-systemsDesigns cross-session memory with entity tracking, temporal validity and vector or graph retrieval, and picks memory benchmarks.↗/project-developmentDecides whether an LLM fits a task, shapes batch or agent pipelines, estimates token cost and designs parseable structured output.↗/self-managed-contextLets the model edit its own live context safely, with pinned prefixes, edit gates, receipts, budget readouts and rollback.↗/book-sft-pipelineTurns ePub books into segmented fine-tuning datasets and trains small models on an author's style with LoRA.↗
Summary by trendhub. The skill itself lives in muratcankoylan/Agent-Skills-for-Context-Engineering/skills/harness-engineering by Muratcan Koylan (MIT); read the full, current text there.