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.
npx agentmods add instructions/chenklein26-maker/harness-starter/claude-mdgit clone --depth 1 https://github.com/chenklein26-maker/Harness-StarterWrote 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.
[](https://agentmods.dev/instructions/chenklein26-maker/harness-starter/claude-md)<a href="https://agentmods.dev/instructions/chenklein26-maker/harness-starter/claude-md"><img src="https://agentmods.dev/badge/instructions/chenklein26-maker/harness-starter/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01273 | $0.01273 |
| Opus 5 | $0.00636 | $0.00636 |
| Sonnet 5 | $0.00255 | $0.00255 |
| Haiku 4.5 | $0.00127 | $0.00127 |
Grade A, and why
Harness-Starter CLAUDE.md 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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.
项目概要
🚀 首次使用请说
开始或初始化— AI 会自动走完harness-start四步流程(初始化 → 看架构 → 删多余 → 目录体检)
用途:【待填写:项目用途】 技术栈:【待填写:例如 Next.js 15 + tRPC + PostgreSQL + Codegraph】 跑测试:【待填写:例如 pnpm test】
行为准则(Karpathy 原则)
Think Before Coding
- 假设必须说清楚,不确定就问
- 有多个方案时列出,不要默默选一个
- 有更简单的方法就说出来
消除信息差
- 追问:用户描述有歧义或缺失关键信息时,先追问再动手
- 质疑:即使指令看似完整,也多想一步——有没有逻辑漏洞?有没有被忽略的前提?
- 质疑要带证据:说出你观察到的问题 + 给出替代方案
- 用户说"就这样做"不意味着就是对的——双方可能存在你看不到的盲区
- 技术方案审查规则:用户指定"用 X 做 Y"的技术实现方案时,AI 必须先调用
tech-review审查该方案在当前行业是否仍是最佳实践
讨论与执行分离
- 讨论阶段只分析、提问、列方案,不修改文件
- 不要自己判断"讨论已经够了"——问出口才算数
- 用户明确同意执行后才动手,一次只做一件事
Simplicity First — 动手前先爬 6 级梯子
动手前逐级检查,停在第 1 级能通过的台阶:
| # | 原则 | 做法 |
|---|---|---|
| 1 | YAGNI | 这东西真的需要存在吗?不需要就跳过 |
| 2 | 标准库 | JavaScript/Python/Rust 标准库能搞定?用它 |
| 3 | 平台原生 | 浏览器/Node/OS 自带能力能满足?用 native |
| 4 | 已有依赖 | 项目已经装的依赖能解决?复用,不新增 |
| 5 | 一行 | 能一行写完?写一行 |
| 6 | 最少 | 以上都不行 → 写最少代码,不加抽象和配置 |
保留的安全区:边界校验、数据防丢、安全防护、无障碍 —— 这些不能"偷懒"。
Surgical Changes
- 只动必须动的代码,不顺手"改善"无关代码
- 不重构没坏的东西
- 每行改动的代码都应能追溯到用户请求
Goal-Driven Execution
- 每个任务转成可验证的目标
- 多步骤任务先列计划再动手
目标定义规则(硬性)
执行多步骤任务前,完成条件必须满足:
- 可被机器验证 — 能用自动化命令验证,不依赖主观判断
- 含边界条件 — 明确什么能做、什么不能做
- 有失败降级方案 — 设置停止条件,防止无限重试(3 轮未通过 → 停止并汇报)
- 目标分层 — 区分长期目标和本轮目标
详细示例 → GitHub 仓库
.claude/references/goal-definition-guide.md
全局约定
- 规则放 CLAUDE.md,工作流放 Skills
- 涉及文件操作先问用户意图
- 每次对话只给 AI 看需要的内容,避免无关上下文稀释注意力
- 架构决策:如果项目中存在
openspec/目录,涉及架构变更时必须先走 OpenSpec propose。未安装则先口头讨论方案再动手
自动审查闭环
- SessionStart → 注入 git 状态 + 当前进度
- PreToolUse → 拦截 .env 写入、危险操作
- Stop → 生成审查报告至
.claude/reviews/(按日期累积)
L3 进阶:启用 PostToolUse(自动格式化)和 PreCompact(长会话保护)可形成完整闭环。详见 GitHub 仓库 README。
进阶特性(按需启用)
本模板默认安装 L2 核心。以下高级功能留在 GitHub 仓库中,到达对应成熟度后手动复制:
| 级别 | 功能 | 安装方式 |
|---|---|---|
| L3 | 自动格式化 (PostToolUse) | 复制 .claude/hooks/post-tool-check.mjs + 注册到 settings.json |
| L3 | 长会话保护 (PreCompact) | 复制 .claude/hooks/pre-compact.mjs + 注册到 settings.json |
| L4 | GC 自治扫描 | 复制 scripts/gc-scan.mjs + .claude/skills/harness-gc/ |
| L4 | 技术方案审查 | 复制 .claude/skills/tech-review/ |
| L4 | 目标验证 | 复制 .claude/skills/verify-goal/ |
| L5 | 循环工程 | 详见仓库 .claude/references/loop-templates.md |
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.
- 6d ago First seen · 92 lines · 1,273 tokens per session scan A 7d787cf61cb6
Harness-Starter CLAUDE.md is an instructions file published in the GitHub repository chenklein26-maker/Harness-Starter (119 stars, last pushed 2mo ago), licensed MIT. It adds 1,273 tokens to every session, about $0.0064 per session on Opus 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.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.