agent-harness-construction

agent-harness-construction is a skill for Claude Code, Codex from gongyijie85/dsh-ecc. It costs 44 tokens per session (440 once invoked), scanned A, a copy of agent-harness-construction, MIT.

A design workflow for shaping how an AI agent chooses actions, uses tools, reads observations, recovers from errors, and manages its context. The action space is the set of operations the agent is allowed to choose from.

In plain words
What is it for?
Use it when defining or revising an agent's tools, input and output formats, error handling, or multi-step completion process.
Why use it?
It helps prevent unclear tool interfaces, noisy results, unsafe operations, and recovery loops that make agents slow or unreliable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when defining or revising an agent's tools, input and output formats, error handling, or multi-step completion process.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/gongyijie85/dsh-ecc/agent-harness-construction
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add gongyijie85/dsh-ecc --skill agent-harness-construction
Clone the repo
git clone --depth 1 https://github.com/gongyijie85/dsh-ecc

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-harness-construction

README.md
[![agentmods](https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-harness-construction/github.svg)](https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-harness-construction)
Your own site
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-harness-construction/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-harness-construction

Your own site · 80×15
<a href="https://agentmods.dev/skills/gongyijie85/dsh-ecc/agent-harness-construction"><img src="https://agentmods.dev/badge/skills/gongyijie85/dsh-ecc/agent-harness-construction.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 440 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 83% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00440
Opus 5 $0.00022 $0.00220
Sonnet 5 $0.00009 $0.00088
Haiku 4.5 $0.00004 $0.00044

Measured 10d ago against content hash e7fb390a6663, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

agent-harness-construction scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

83% identical to agent-harness-construction — 27 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/agent-harness-construction/SKILL.md · 75 lines

What it actually says

Agent Harness Construction

Use this skill when you are improving how an agent plans, calls tools, recovers from errors, and converges on completion.

Core Model

Agent output quality is constrained by:

  1. Action space quality
  2. Observation quality
  3. Recovery quality
  4. Context budget quality

Action Space Design

  1. Use stable, explicit tool names.
  2. Keep inputs schema-first and narrow.
  3. Return deterministic output shapes.
  4. Avoid catch-all tools unless isolation is impossible.

Granularity Rules

  • Use micro-tools for high-risk operations (deploy, migration, permissions).
  • Use medium tools for common edit/read/search loops.
  • Use macro-tools only when round-trip overhead is the dominant cost.

Observation Design

Every tool response should include:

  • status: success|warning|error
  • summary: one-line result
  • next_actions: actionable follow-ups
  • artifacts: file paths / IDs

Error Recovery Contract

For every error path, include:

  • root cause hint
  • safe retry instruction
  • explicit stop condition

Context Budgeting

  1. Keep system prompt minimal and invariant.
  2. Move large guidance into skills loaded on demand.
  3. Prefer references to files over inlining long documents.
  4. Compact at phase boundaries, not arbitrary token thresholds.

Architecture Pattern Guidance

  • ReAct: best for exploratory tasks with uncertain path.
  • Function-calling: best for structured deterministic flows.
  • Hybrid (recommended): ReAct planning + typed tool execution.

Benchmarking

Track:

  • completion rate
  • retries per task
  • pass@1 and pass@3
  • cost per successful task

Anti-Patterns

  • Too many tools with overlapping semantics.
  • Opaque tool output with no recovery hints.
  • Error-only output without next steps.
  • Context overloading with irrelevant references.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 75 lines · 44 tokens per session scan A e7fb390a6663

Subscribe to this mod's changes

agent-harness-construction is a skill published in the GitHub repository gongyijie85/dsh-ecc (7 stars, last pushed 3d ago), licensed MIT. It adds 44 tokens to every session and 440 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. It is 83% identical to agent-harness-construction, differing in 27 lines, and is treated as a copy.

Related

Other skills, from other repositories

manage-taskboard

Manage work in the native DeepSeek Harness Taskboard with exact task ids and optimistic versions. Use when an Agent must inspect project work, claim an eligible todo, record progress or blockers, verify an implementation, submit it for human review, or release its own claim; also use when a human asks how to accept…

shengsheng90/DSH-taskboard · 88 tokens

dsh-web-pet-developer

Create a pet for the dsh-pet plugin and integrate it into the dsh web GUI — author a v2 pet.json manifest plus an 8-column x 9-row atlas per the Codex/hatch-pet contract (live2d pets, voice packs and status decorations included), drop it into the pet-center user directory or contribute it as a built-in asset under…

zhu1090093659/dsh-web · 162 tokens

dsh-plugin-guide

Use when developing, reviewing, packaging, debugging, or answering questions about DeepSeek Harness (DSH) plugins — the plugin-based agent harness on vendored Cordis. Applies the official plugin-development constraints (plugin contract, cordis.yml layers, services/events/effects, tool DSL, bundles/profiles) backed by…

PerryLink/dsh-plugin-guide · 76 tokens

douyin-works-crawler

A tool that retrieves basic information and recent videos from a Douyin account, using its name or Douyin ID. It can return up to 50 videos with engagement data and links.

redfox-data/redfox-community-dsh · 102 tokens

playlet-douyin-feed

A tool that tracks popular short dramas on Douyin, a Chinese short-video platform, and creates a daily HTML report with covers, engagement data, links, topic groups, and writing observations.

redfox-data/redfox-community-dsh · 264 tokens

playlet-xhs-feed

A daily tracker for popular short-drama posts on Xiaohongshu, a Chinese social-media platform. It groups posts by story themes and creates an HTML report with covers, interaction data, links, and writing insights.

redfox-data/redfox-community-dsh · 184 tokens