code-as-harness

code-as-harness is a skill for Claude Code, Codex from zts212653/clowder-ai. It costs 70 tokens per session (5,723 once invoked), scanned A, original, MIT.

A method for checking whether the same problem has happened repeatedly and then improving the coding workflow itself. It favours lasting changes such as hooks, checks, or other code-level safeguards over reminders in instructions.

In plain words
What is it for?
Use it after repeated mistakes or tool-related friction to find the underlying cause, decide whether the workflow needs a guard or new capability, and record the resulting action.
Why use it?
It prevents recurring workflow friction from being handled as a one-off complaint or forgotten prompt. Evidence is required before treating an issue as a repeated pattern.

Skill for Claude CodeCodex

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

Good fit Use it after repeated mistakes or tool-related friction to find the underlying cause, decide whether the workflow needs a guard or new capability, and record the resulting action.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zts212653/clowder-ai/code-as-harness
About the project

Clowder AI is a self-hosted workspace where AI agents from different model families work together as a persistent team, retaining identities, shared evidence, and memory across tasks. It is for people who want to coordinate multiple AI agents without repeatedly rebuilding their context.

zts212653/clowder-ai · 3,471 stars · on GitHub

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 zts212653/clowder-ai --skill code-as-harness
Clone the repo
git clone --depth 1 https://github.com/zts212653/clowder-ai

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 code-as-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/zts212653/clowder-ai/code-as-harness/github.svg)](https://agentmods.dev/skills/zts212653/clowder-ai/code-as-harness)
Your own site
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/code-as-harness"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/code-as-harness/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 code-as-harness

Your own site · 80×15
<a href="https://agentmods.dev/skills/zts212653/clowder-ai/code-as-harness"><img src="https://agentmods.dev/badge/skills/zts212653/clowder-ai/code-as-harness.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,723 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found 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.00070 $0.05723
Opus 5.5 $0.00028 $0.02289
Sonnet 5.5 $0.00014 $0.01145
Haiku 4.5 $0.00007 $0.00572

Measured 1mo ago against content hash f84a8422f5a7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-as-harness 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 1mo 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.

cat-cafe-skills/code-as-harness/SKILL.md · 338 lines

How it starts

The opening of the file, as written. The whole thing — 338 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Code as Harness(用代码修自己 / 建新能力)

价值门禁 / Why This Is a Skill

普通 agent 被骂了会道歉。Clowder AI 的猫被骂了应该诊断。

这个 skill 不是教猫"怎么处理投诉"——那是通用能力。它做的是:

  1. 先搜证据确认是否真的重复,不凭字面关键词判断
  2. 分类根因(harness 缺陷 / 架构限制 / 新能力需求)
  3. 提议代码级修复而不是 prompt 级安慰

来源:2026-06-01~02 PoE brainstorm + demo 设计。operator说"commit push 100 次"、"你怎么又失忆了"这类信号过去被当成批评处理,现在应该被当成 harness 的训练信号。

核心原则

用户的摩擦不是抱怨,是 harness 的训练信号。但必须用证据确认是真摩擦,不能凭字面猜。

  • 猫被骂时的第一反应不是道歉,是搜证据确认是否重复
  • 确认重复后才进入诊断流程;未确认 = 一次性批评,正常处理
  • 修复优先用代码(hook/lint/guard),不是提示词(soft constraint 会被忘)
  • 如果问题超出当前能力,拉队友或启动 research,不是硬编方案
  • 全新任务先做,做完后如果发现会反复出现,再沉淀成 harness

猫侧主动上报:雨刮器条款细则(ADR-038 staging 条款展开)

Staging 条款原文(~120 tokens,每轮注入):摩擦上报:撞到工具/runtime 摩擦,有 cat_cafe_capture_paw_feel 就先登记本 invocation,再在原 turn 单独一行留 [爪感差: 工具+现象];无此能力也照留,服务端作有界 ambiguous 兼容采集。落盘只持 sourceMessageId。需立即行动才查证准确 owner thread,转投只带 source ref、不复制 marker;查不到走 F128,禁止猜投。不忍是 taste。 本节是细则——条款管"要报",细则管"怎么报"。来源:2026-06-10 一场闲聊钓出三单暗税摩擦后 operator signoff([thread-id])。本 skill 主流程是"operator驱动"方向(被纠偏→诊断),本节是"猫自驱动"方向(自己撞到→上报)——双向雨刮。

Why(为什么猫不能忍)

猫天然是"目标导向的绕路大师":摩擦发生在任务路径上,绕过比报告便宜(水管漏了拿盆接着继续做饭,绝不叫水管工)。但忍的代价是系统性的——摩擦不报 = 摩擦账单进暗数据,每只猫每天重复付同一笔税。实测:list_recent 模板噪音税全家付了多日,一次被问"猫为什么忍"后半小时内立案、当天修复。单 session 视角里"偶发"的卡顿,跨 session 可能是高频税——单只猫没有跨期视角,所以不做判断,只做上报;聚类归因是 owner/dream 猫的事。

什么算摩擦(例举,非穷举)

  • 同一工具连续重试才成功 / 静默换路绕过(搜索失败转 Grep 兜底)
  • 工具返回垃圾(零相关、零消费)
  • 返回值与实际不符(ok:true 但用户没看到——服务端真相 ≠ 用户真相)
  • 输出强制注入大段无用模板(context 税)
  • 文档/真相源互相矛盾(stale 文档撞 runtime 事实)
  • 报错信息无法行动(看了不知道下一步)

怎么报(三档,按成本递增)

  1. 最低档(必做,单轮完成):若当前 invocation 暴露 cat_cafe_capture_paw_feel,先调它登记 typed intent;无 invocation/agent-key 没有该能力时不假装调用。随后在当轮回复或独白单独一行留 [爪感差: 工具名+现象一句话]——不传正文给工具、不中断任务、不定位根因、不组织论证。消息持久化后 server 只绑定 sourceMessageId:有 invocation proof 为 typed/confirmed,无 proof 的 standalone marker 仅作 bounded compatibility/ambiguous;inline/fenced/blockquote/cross-post 示例不采。
  2. 行动档(有 verified owner thread):先用精确 feature id 走 feat_index,再以 feature doc / thread 标题与上下文 / standing custody 至少一项真相确认该 thread 确实负责;模糊关键词命中或“看起来最像”不算。确认后 cross-post marker-free 三件套:sourceMessageId(回指原始 marker)/ 为什么严重(谁在付税)/ 建议方向(给数据给立场,方案归 owner)。只提醒既有责任可用 FYI/coordinate;routine review/反馈走 coordinate,仅真正转移 implementation custody 时才用 assign_work(生成审批卡片)。路由语义:摩擦立案找 owner feature 的准确 thread,不是最后碰过的猫、F245 开发 thread 或任意邻近 thread;嫌疑人/邮箱路由会让 provenance 错挂。
  3. 立案档(无 verified owner thread 且系统性):F128 propose_thread;先查存量(休眠的单点讨论 thread ≠ 负责 thread,提案里写明为何不复用)。宁可让 operator 审批一个自包含提案,也不猜投现有 thread。

Read the full file on GitHub · 338 lines

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. 1mo ago First seen · 338 lines · 70 tokens per session scan A f84a8422f5a7

Subscribe to this mod's changes

code-as-harness is a skill published in the GitHub repository zts212653/clowder-ai (3,471 stars, last pushed today), licensed MIT. It adds 70 tokens to every session and 5,723 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

systematic-debugging

Use when debugging a failing test, build error, or runtime issue that isn't immediately obvious. Guides a 4-phase root cause analysis instead of random fix attempts.

open-metadata/OpenMetadata · 37 tokens

log-error-digest

Analyze log files to troubleshoot errors, identify peak error periods, and produce error clustering, frequency statistics, and time distribution reports. Supports JSON, syslog, and Nginx formats with automatic detection. Use when a user uploads a .log file and asks to analyze errors, find patterns, debug issues, or…

zebbern/claude-code-guide · 71 tokens

deck-retro

Run a fully local agent-deck retrospective over the user's own transcripts, Recall index and logs. Use when a user wants to find recurring failures or take their own finding from investigation through synthetic reproduction, a user-filed issue, a test-first fix and contributor PR handoff. Also use for weekly usage…

asheshgoplani/agent-deck · 86 tokens

incident-response-incident-response

Coordinate production incident triage, mitigation, investigation, recovery, and follow-up. Use when responding to outages or other incidents that require structured operational coordination.

rmyndharis/antigravity-skills · 36 tokens

cwv-optimizer

Diagnose and fix Core Web Vitals issues on AEM Edge Delivery Services pages. Goes deeper than generic CWV advice by understanding EDS-specific performance patterns including the 100KB LCP budget, E-L-D loading phases, block rendering behavior, and third-party script impact. Produces specific fixes for LCP, CLS, and…

adobe/skills · 112 tokens