Community研究與資料分析github.com

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

harness-first 是什麼?

harness-first is a Claude Code agent skill that diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/harness-first

Installed? Explore more 研究與資料分析 skills: obra/superpowers, affaan-m/quarkus-verification, affaan-m/uspto-database · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Harness first

A model is an engine. Most "model problems" are a missing harness: nothing defines a correct output, nothing checks changes, nothing caps spend, the data has no agreed definitions, actions have no approval, and there are no traces to find the bad call. Audit that before touching the model.

1. Reproduce the symptom from evidence, not vibes

  • Read the agent code the symptom touches: the loop, tool definitions, prompt assembly, data access, side-effecting tools.
  • Read whatever logs/traces/transcripts exist. Aggregate them (per conversation, per tool, per error): who spends the tokens, which calls fail, which answers are wrong. A few outliers usually dominate.
  • State the root cause as a mechanism with evidence (file:line, log ids, numbers you computed). "The model is bad" is not a mechanism.

Common mechanisms:

  • Token burn: loop with no max-iterations, retry on a deterministic error, full history or a huge tool result resent every turn, no caching of stable context.
  • "Hallucination": the agent faithfully used an ambiguous or wrong source (two tables/fields with the same name and different meaning, stale doc). Recompute both numbers yourself to prove it.
  • Brittleness: prompt changes shipped with no regression set; behavior that only the author checked by hand.

2. Score the six harness parts

For each, mark present / partial / missing with the evidence you found:

PartPresent means
Golden set~20+ cases with expected answers/constraints, drawn from real traffic, incidents, and edge cases
Judgedeterministic checks first (numbers, policy rules, forbidden content), LLM-rubric only for what code can't check; runs on every prompt/model/tool change
Cost governancehard token/cost caps per user and per workflow, max iterations per run, graceful stop with a message
Data layerread-only credentials for reads, a data dictionary that defines each metric/field the agent may use
Action safetyirreversible or external actions (send, pay, delete, write, refund) are reversible or gated by human approval
Tracingevery model and tool call logged with conversation id, workflow, input, output, tokens, cost, latency, error

3. Decide before building

  • Never recommend a model swap without eval evidence. If someone asks "should we switch models?", the answer is: fix the mechanism, then run the golden set on both models and compare quality and cost. Say what the fix alone is expected to save, with your numbers.
  • Never approve shipping a prompt/agent change without a golden-set run. If recorded outputs exist, score them against the expected answers yourself and report failures by case id.
  • Safety gaps (ungated side effects, write access on a read path, leaking internal data) are blocking, even when nobody asked about them.

4. Build the minimum harness, in this order

  1. Stop the bleeding: max iterations, no retry on non-transient errors, truncate/summarize large tool output, hard per-run cost cap.
  2. Gate side effects: approval step or draft mode for irreversible tools; read-only connection for query tools.
  3. Golden set file (evals/golden.jsonl or similar): input, expected answer or constraints, source (log id / incident / policy clause). Include the cases that just failed.
  4. Judge script that runs the golden set and prints pass/fail per case plus totals. Deterministic checks before LLM grading.
  5. Data dictionary for every metric the agent reports (definition, source table/field, exclusions).
  6. Tracing fields listed above, if missing.

Write real files, not a description of files. Run what can run and report the result.

5. Report

  • One-line answer to the question actually asked (e.g. "Don't switch models yet: 3 runs stuck in a retry loop spent 71% of tokens").
  • Root cause with evidence and numbers.
  • Harness scorecard (the six parts).
  • What you changed or created, and what you ran.
  • Blocking risks, then a short prioritized next-steps list.

Credit

The method this Skill follows comes from a public post by Mark Ajzenstadt (@mardehaym): https://x.com/mardehaym/status/2099562230647804152. The argument is theirs; the procedure, the wording and the evaluation here are Edge's own, and the author did not review them.

Individual skills in this repo

This repo contains 15 individual skills — each has its own dedicated page.

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/http-error-triage

Run before concluding anything from an HTTP error on a third-party API. Separates a real credential/entitlement problem from a CDN or WAF block, a wrong endpoint, or a client-signature ban. Use whenever an API returns 401/403/402/429 and you are about to say "the key is dead", "credits are exhausted", "the plan lacks access", or "we are rate limited".

getedgehq/linkedin-media-prep

Convert, crop, resize, and compress images and videos for optimal LinkedIn upload quality and file size. Use when the user wants to prepare a photo, image, or video for LinkedIn (profile picture, cover photo, post image, article featured image, post video, or video ad), optimize file size for LinkedIn, crop and resize for LinkedIn dimensions, convert HEIC/RAW/PNG/MOV to LinkedIn-ready JPEG or MP4, or mentions LinkedIn media requirements, specs, or limits.

getedgehq/monid

>-

getedgehq/opendraft

An 18-agent pipeline that turns one topic line into a drafted

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/product-launch-video

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/shadcn-first

>-

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

相關技能