技能潮 SkillTide 提交收录
官方说明开源项目7 天前
baxtercl/claude-code-harness

baxtercl/claude-code-harness

Tested, defense-in-depth harness for Claude Code: permission tiers, fail-closed guard hooks, agents, commands and skills.
在 GitHub 查看 ↗直链 · 无中转页
★ 数取值
0 ★ · baxtercl/claude-code-harness · 取自该仓库的 GitHub 页面 · (2026-10-16 20:00:20 核对)
来源明细
从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
收录与活跃
收录于 2026-10-10 · 最近见到 2026-10-10 · 共见到 5 次 · 被 1 个来源列出
评分构成
综合分 103 · 1 个来源 · repo
安装
pip install pytest
常见问题(答案都来自我们的记录)
怎么安装?
该仓库给出的安装命令是 pip install pytest。我们的记录里它是仓库自己提供的;不保证在你的客户端上直接可用。
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库 baxtercl/claude-code-harness;我们收录于 2026-10-10;最近见到 2026-10-10。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。
第三方质量标记

claude-code-harness

以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →

A tested, defense-in-depth harness for Claude Code: permission tiers, guard hooks, review and security agents, workflow commands and skills.
It is the generic version of the setup I run across my own projects, extracted after months of daily agent-driven development. Every rule in it exists because something went wrong without it.
Why
An agent with shell access needs the same thing a new engineer with production access needs: clear rules, and guardrails that do not depend on remembering the rules.
Three ideas shape this harness:
1. **Prose rules get ignored; hooks do not.** A rule written in CLAUDE.md is a suggestion. A PreToolUse hook that exits with code 2 is a wall. Anything that must never happen is enforced by a hook and explained by a skill.
2. **Guards fail closed.** Claude Code only blocks on exit code 2, so a guard that crashes with any other code silently allows the command. Every hook here turns its own failures into a block.
3. **Precision over blanket denies.** A blanket deny on rm -rf blocked eleven legitimate commands in three weeks (rm -rf dist before a build, mutation-test scratch copies) and zero dangerous ones. A blanket deny on .env.* blocked dozens of reads of .env.example. Over-blocking trains people to switch guardrails off, so each guard targets exactly the dangerous cases and is tested against the legitimate ones.
What is inside
Permission tiers
| Tier | Examples | Why |
|---|---|---|
| **allow** | git read and local commits, tests, linters, builds | Fast loop for everything reversible and local |
| **ask** | git push, PRs, releases, deploys, terraform apply, cloud IAM and secrets | Anything visible to others or hard to undo needs a human |
| **deny** | sudo, force push, reset --hard, reading .env and keys | Never, regardless of context |
Guard hooks
| Hook | Blocks | Allows (tested) |
|---|---|---|
| commit_guard.py | Commits on main; direct commits on develop; non-conventional messages | Feature branches; the commit that concludes a conflicted merge on develop |
| rm_guard.py | rm on /, ~, home directories, the project root, src, .git, .claude, docs, migrations | rm -rf dist, node_modules, caches, temp copies, single files |
| secret_file_guard.py | cat .env, .env.local, .env.production, *.pem, *.key, service-account and credential JSON, SSH keys | .env.example/.sample/.template, prose that mentions .env, the redacting inspector |
Known limitation, stated on purpose: guards read the literal command. rm -rf $DIR, where $DIR expands to a protected path, is not caught. Version control is the safety net there.
The PRD Phase 0
The most useful rule in this repo is not a hook. Before writing a PRD, every claim inherited from a ticket or plan is checked against the code, with the command that was run and a literal quote of the line found:
| Claim | Command run | Evidence | Verdict |
|---|---|---|---|
It exists because confident, written diagnoses ("this feature is missing", "this is not published") kept turning out false once someone opened the file. Checking once per session was not enough; it has to be done claim by claim. See .claude/skills/prd/SKILL.md.
来源
github · https://github.com/baxtercl/claude-code-harness
按领域浏览
开源项目
收录于
7 天前

更多开源项目

查看开源项目全部 731 条 →

所属领域与标签

每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。

浏览全部领域 →

← 返回索引