Creator · sangrokjung
Last updated · Sep 5, 2026
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministi
Creator · sangrokjung
Last updated · Sep 5, 2026
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministi
Creator · sangrokjung
Last updated · Sep 5, 2026
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministi
Creator · sangrokjung
Last updated · Sep 5, 2026
Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministi
Sandbox only
Install targets
Codex install prompt
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"sangrokjung-harness-diet","task":"Install harness-diet","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add sangrokjung/claude-forge --skill harness-diet
Maintenance
fresh
1d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
825
76/100 Quality · 70/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
825 GitHub stars
Repo activity
825 stars, 176 forks
Maintenance
1d since push
License
MIT
Install
npx skills add sangrokjung/claude-forge --skill harness-diet
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add sangrokjung/claude-forge --skill harness-dietDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/sangrokjung-harness-diet/install
Agent should check
Copy prompt
Task: Use harness-diet in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install
Install command: npx skills add sangrokjung/claude-forge --skill harness-diet
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/sangrokjung-harness-diet/install
LLM text format
/api/skills/sangrokjung-harness-diet/install?format=text
Find alternatives
/api/skills/search?q=harness-diet&limit=3
Agent prompt
Use harness-diet for this task. Review https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install, then install with: npx skills add sangrokjung/claude-forge --skill harness-dietRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/sangrokjung-harness-diet
LLM text
/api/registry/manifest/sangrokjung-harness-diet?format=text
Install alias
/api/registry/install/sangrokjung-harness-diet
Recommend
/api/registry/recommend?task=Use%20harness-diet%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO825 GitHub stars
Stars/forks activity
INFO825 stars, 176 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: harness-diet description: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. license: MIT metadata: category: harness-maintenance phase: v1 ---
# harness-diet — put your always-loaded context back under budget
> A harness gains weight automatically (every incident note, every boss directive, every fix lands > as another paragraph in an always-loaded rule) but only loses weight when someone runs a diet. > Field measurement on a mature harness: growth-to-reduction commit ratio of ~60:1, natural growth > of ~70KB/month, and adherence degrading as the pile grows. Anthropic's guidance is blunt: > *"target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce > adherence"*, and rules without `paths` frontmatter load *"with the same priority as CLAUDE.md"* > — every session, every token ([memory docs](https://docs.claude.com/en/docs/claude-code/memory)).
**Result you should expect**: one field run took a harness from 146KB always-loaded (143% of budget) to 100.6KB (98%) with **zero governance loss** — every killswitch, decision table, trigger keyword, and canonical command verified present after the diet.
## Budgets (defaults — override via flags)
| Metric | Budget | Why | |---|---|---| | CLAUDE.md | < 200 lines | Anthropic official guidance | | Per always-loaded rule file | 8,192 B | Keeps any single rule scannable; forces narrative out | | Total always-loaded rules | 102,400 B | Attention-budget ceiling; beyond this, adherence drops |
> **Bundled script paths**: commands below use `$HOME/.claude/skills/harness-diet/…` (the > `install.sh` layout). For marketplace (`/plugin install`) installs, resolve under > `${CLAUDE_PLUGIN_ROOT}/skills/harness-diet/…` instead. The scripts are stdlib-only Python; > if unavailable, perform the step manually from the described contract.
## Phase 0 — Measure
```bash DIET="$HOME/.claude/skills/harness-diet" # or "${CLAUDE_PLUGIN_ROOT}/skills/harness-diet" python3 "$DIET/scripts/harness_diet_audit.py" # human summary python3 "$DIET/scripts/harness_diet_audit.py" --json # machine output python3 "$DIET/scripts/harness_diet_audit.py" --strict # exit 2 if over budget (CI/ratchet) ```
Auto-discovers `./.claude/rules`, `~/.claude/rules`, and CLAUDE.md files at project/user level. A rule is **always-loaded** iff its YAML frontmatter has no `paths:` key.
## Phase 1 — Classify every always-loaded rule
Walk the list from largest to smallest and pick one bucket per file:
1. **Keep always-loaded** — cross-cutting behavior needed in *every* session (tone, security boundaries, routing indexes). Diet the body (Phase 2) but keep the load class. 2. **Path-scope** — the rule only matters when specific files are touched. Add `paths:` globs. ⚠ Path scoping fires on *file access*, never on spoken keywords. A rule triggered by what the user *says* cannot be path-scoped. ⚠ No literal brackets in globs (`[locale]` parses as a character class and silently never matches). 3. **Convert to skill / hook-injected** — task-specific procedure? Official guidance: *"use skills instead"*. Best case: the rule's real trigger is already a deterministic hook — have the hook inject "Read <rule> first" into context and drop the always-load. 4. **Migrate narrative to reference** — the default for oversized keepers (Phase 2).
## Phase 2 — Migrate (block-level, never prose compression)
For each oversized file:
1. **Extract a preservation manifest first** (before touching anything): ```bash python3 "$DIET/scripts/preservation_check.py" extract rules/big-rule.md > /tmp/big-rule.manifest.json ``` 2. **Append** the outgoing blocks to `references/<name>-ref.md` (or your repo's reference dir), verbatim under a dated section header. Append *before* rewriting the rule body, and commit both together — a slimmed body pushed without its reference content is a content hole for every mirror that pulls in between. 3. **Rewrite the rule body**: keep the verdict skeleton (what to do / never do), leave a one-line pointer to the reference for the "why" and the war stories.
**Must stay in the body** (never migrate): CRITICAL/IMPORTANT banners and their verdicts, decision tables, trigger keywords and agent names (they are a routing index, not prose), killswitch env vars, canonical command lines, IDs and threshold values.
**Migrate aggressively**: incident narratives, measurement history, duplicated explanations of the same point, long example blocks, anything already present in the reference file.
## Phase 3 — Verify (two lenses, fresh checker)
1. **Loss lens (deterministic)**: ```bash python3 "$DIET/scripts/preservation_check.py" verify rules/big-rule.md /tmp/big-rule.manifest.json ``` Exit 2 = something load-bearing got migrated. Restore it before proceeding. Review the manifest by hand first — prune entries that were *intended* to move. 2. **Efficacy lens**: re-run the audit; recompute the total; confirm the savings are real (reference files are lazily `Read`, not `@`-imported — check the rule bodies contain no `@path` imports of the reference, or the "savings" still load at launch). 3. **Fresh checker**: hand the diff to an independent reviewer that didn't write it (pairs with the `review-loop` skill). Diets fail quietly: a plausible-looking slim body missing one qualifier is exactly what the maker cannot see.
## Phase 4 — Guard (keep it off)
A diet without a guard regrows. Ship-with options in `$DIET/hooks/`:
- `rules-budget-guard.sh` — PostToolUse (`Edit|Write`) advisory: the moment a rule edit pushes a file past budget, the editing session gets a context note telling it to migrate, not append. Non-blocking by design — a blocking pre-commit gate silently stalls auto-commit pipelines. - Re-run `--strict` weekly (cron, session-start dispatcher, or CI) and surface the report only when over budget.
## Anti-patterns (each one cost a real harness a failed round)
| Anti-pattern | Why it fails | |---|---| | Prose compression ("tighten the wording") | Trigger keywords, guru names, stage names *are* the routing index. A compression pass that saved 12% destroyed 70% of routing signals and was fully reverted. Move blocks; don't rewrite sentences. | | Dedup toward a private file | If rules are distributed to a team but `~/.claude/CLAUDE.md` is one person's, "delete from rules, it's already in CLAUDE.md" deletes it from every teammate's context. Dedup toward the *shared* surface. | | Slim body committed, reference append not | Mirrors pull a body full of dangling pointers. Commit both in one change. | | Trusting the maker's "everything preserved" claim | Extract the manifest before the edit and verify after. Field run: the maker claimed "6 bullets kept verbatim"; the deterministic check found two qualifiers gone. | | Treating one diet as the fix | Growth is automatic; reduction is manual. Without the guard, one measured harness regrew from 145KB toward its 220KB peak within weeks. |
## References
- `references/methodology.md` — budget rationale, growth mechanics, byte-accounting worksheet, verification lens design, worked field results.
Source provenance
Decision snapshot
825 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for harness-diet, ready for a manual X post.
harness-diet: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules with... 825 stars https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x
Listing + install path for harness-diet: https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x Install: npx skills add sangrokjung/claude-forge --skill harness-diet
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to sangrokjung but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet/audit)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)sangrokjung
@sangrokjung
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"sangrokjung-harness-diet","task":"Install harness-diet","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add sangrokjung/claude-forge --skill harness-diet
Maintenance
fresh
1d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
825
76/100 Quality · 70/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
825 GitHub stars
Repo activity
825 stars, 176 forks
Maintenance
1d since push
License
MIT
Install
npx skills add sangrokjung/claude-forge --skill harness-diet
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add sangrokjung/claude-forge --skill harness-dietDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/sangrokjung-harness-diet/install
Agent should check
Copy prompt
Task: Use harness-diet in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install
Install command: npx skills add sangrokjung/claude-forge --skill harness-diet
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/sangrokjung-harness-diet/install
LLM text format
/api/skills/sangrokjung-harness-diet/install?format=text
Find alternatives
/api/skills/search?q=harness-diet&limit=3
Agent prompt
Use harness-diet for this task. Review https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install, then install with: npx skills add sangrokjung/claude-forge --skill harness-dietRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/sangrokjung-harness-diet
LLM text
/api/registry/manifest/sangrokjung-harness-diet?format=text
Install alias
/api/registry/install/sangrokjung-harness-diet
Recommend
/api/registry/recommend?task=Use%20harness-diet%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO825 GitHub stars
Stars/forks activity
INFO825 stars, 176 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: harness-diet description: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. license: MIT metadata: category: harness-maintenance phase: v1 ---
# harness-diet — put your always-loaded context back under budget
> A harness gains weight automatically (every incident note, every boss directive, every fix lands > as another paragraph in an always-loaded rule) but only loses weight when someone runs a diet. > Field measurement on a mature harness: growth-to-reduction commit ratio of ~60:1, natural growth > of ~70KB/month, and adherence degrading as the pile grows. Anthropic's guidance is blunt: > *"target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce > adherence"*, and rules without `paths` frontmatter load *"with the same priority as CLAUDE.md"* > — every session, every token ([memory docs](https://docs.claude.com/en/docs/claude-code/memory)).
**Result you should expect**: one field run took a harness from 146KB always-loaded (143% of budget) to 100.6KB (98%) with **zero governance loss** — every killswitch, decision table, trigger keyword, and canonical command verified present after the diet.
## Budgets (defaults — override via flags)
| Metric | Budget | Why | |---|---|---| | CLAUDE.md | < 200 lines | Anthropic official guidance | | Per always-loaded rule file | 8,192 B | Keeps any single rule scannable; forces narrative out | | Total always-loaded rules | 102,400 B | Attention-budget ceiling; beyond this, adherence drops |
> **Bundled script paths**: commands below use `$HOME/.claude/skills/harness-diet/…` (the > `install.sh` layout). For marketplace (`/plugin install`) installs, resolve under > `${CLAUDE_PLUGIN_ROOT}/skills/harness-diet/…` instead. The scripts are stdlib-only Python; > if unavailable, perform the step manually from the described contract.
## Phase 0 — Measure
```bash DIET="$HOME/.claude/skills/harness-diet" # or "${CLAUDE_PLUGIN_ROOT}/skills/harness-diet" python3 "$DIET/scripts/harness_diet_audit.py" # human summary python3 "$DIET/scripts/harness_diet_audit.py" --json # machine output python3 "$DIET/scripts/harness_diet_audit.py" --strict # exit 2 if over budget (CI/ratchet) ```
Auto-discovers `./.claude/rules`, `~/.claude/rules`, and CLAUDE.md files at project/user level. A rule is **always-loaded** iff its YAML frontmatter has no `paths:` key.
## Phase 1 — Classify every always-loaded rule
Walk the list from largest to smallest and pick one bucket per file:
1. **Keep always-loaded** — cross-cutting behavior needed in *every* session (tone, security boundaries, routing indexes). Diet the body (Phase 2) but keep the load class. 2. **Path-scope** — the rule only matters when specific files are touched. Add `paths:` globs. ⚠ Path scoping fires on *file access*, never on spoken keywords. A rule triggered by what the user *says* cannot be path-scoped. ⚠ No literal brackets in globs (`[locale]` parses as a character class and silently never matches). 3. **Convert to skill / hook-injected** — task-specific procedure? Official guidance: *"use skills instead"*. Best case: the rule's real trigger is already a deterministic hook — have the hook inject "Read <rule> first" into context and drop the always-load. 4. **Migrate narrative to reference** — the default for oversized keepers (Phase 2).
## Phase 2 — Migrate (block-level, never prose compression)
For each oversized file:
1. **Extract a preservation manifest first** (before touching anything): ```bash python3 "$DIET/scripts/preservation_check.py" extract rules/big-rule.md > /tmp/big-rule.manifest.json ``` 2. **Append** the outgoing blocks to `references/<name>-ref.md` (or your repo's reference dir), verbatim under a dated section header. Append *before* rewriting the rule body, and commit both together — a slimmed body pushed without its reference content is a content hole for every mirror that pulls in between. 3. **Rewrite the rule body**: keep the verdict skeleton (what to do / never do), leave a one-line pointer to the reference for the "why" and the war stories.
**Must stay in the body** (never migrate): CRITICAL/IMPORTANT banners and their verdicts, decision tables, trigger keywords and agent names (they are a routing index, not prose), killswitch env vars, canonical command lines, IDs and threshold values.
**Migrate aggressively**: incident narratives, measurement history, duplicated explanations of the same point, long example blocks, anything already present in the reference file.
## Phase 3 — Verify (two lenses, fresh checker)
1. **Loss lens (deterministic)**: ```bash python3 "$DIET/scripts/preservation_check.py" verify rules/big-rule.md /tmp/big-rule.manifest.json ``` Exit 2 = something load-bearing got migrated. Restore it before proceeding. Review the manifest by hand first — prune entries that were *intended* to move. 2. **Efficacy lens**: re-run the audit; recompute the total; confirm the savings are real (reference files are lazily `Read`, not `@`-imported — check the rule bodies contain no `@path` imports of the reference, or the "savings" still load at launch). 3. **Fresh checker**: hand the diff to an independent reviewer that didn't write it (pairs with the `review-loop` skill). Diets fail quietly: a plausible-looking slim body missing one qualifier is exactly what the maker cannot see.
## Phase 4 — Guard (keep it off)
A diet without a guard regrows. Ship-with options in `$DIET/hooks/`:
- `rules-budget-guard.sh` — PostToolUse (`Edit|Write`) advisory: the moment a rule edit pushes a file past budget, the editing session gets a context note telling it to migrate, not append. Non-blocking by design — a blocking pre-commit gate silently stalls auto-commit pipelines. - Re-run `--strict` weekly (cron, session-start dispatcher, or CI) and surface the report only when over budget.
## Anti-patterns (each one cost a real harness a failed round)
| Anti-pattern | Why it fails | |---|---| | Prose compression ("tighten the wording") | Trigger keywords, guru names, stage names *are* the routing index. A compression pass that saved 12% destroyed 70% of routing signals and was fully reverted. Move blocks; don't rewrite sentences. | | Dedup toward a private file | If rules are distributed to a team but `~/.claude/CLAUDE.md` is one person's, "delete from rules, it's already in CLAUDE.md" deletes it from every teammate's context. Dedup toward the *shared* surface. | | Slim body committed, reference append not | Mirrors pull a body full of dangling pointers. Commit both in one change. | | Trusting the maker's "everything preserved" claim | Extract the manifest before the edit and verify after. Field run: the maker claimed "6 bullets kept verbatim"; the deterministic check found two qualifiers gone. | | Treating one diet as the fix | Growth is automatic; reduction is manual. Without the guard, one measured harness regrew from 145KB toward its 220KB peak within weeks. |
## References
- `references/methodology.md` — budget rationale, growth mechanics, byte-accounting worksheet, verification lens design, worked field results.
Source provenance
Decision snapshot
825 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for harness-diet, ready for a manual X post.
harness-diet: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules with... 825 stars https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x
Listing + install path for harness-diet: https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x Install: npx skills add sangrokjung/claude-forge --skill harness-diet
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to sangrokjung but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet/audit)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)sangrokjung
@sangrokjung
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"sangrokjung-harness-diet","task":"Install harness-diet","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add sangrokjung/claude-forge --skill harness-diet
Maintenance
fresh
1d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
825
76/100 Quality · 70/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
825 GitHub stars
Repo activity
825 stars, 176 forks
Maintenance
1d since push
License
MIT
Install
npx skills add sangrokjung/claude-forge --skill harness-diet
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add sangrokjung/claude-forge --skill harness-dietDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/sangrokjung-harness-diet/install
Agent should check
Copy prompt
Task: Use harness-diet in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install
Install command: npx skills add sangrokjung/claude-forge --skill harness-diet
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/sangrokjung-harness-diet/install
LLM text format
/api/skills/sangrokjung-harness-diet/install?format=text
Find alternatives
/api/skills/search?q=harness-diet&limit=3
Agent prompt
Use harness-diet for this task. Review https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install, then install with: npx skills add sangrokjung/claude-forge --skill harness-dietRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/sangrokjung-harness-diet
LLM text
/api/registry/manifest/sangrokjung-harness-diet?format=text
Install alias
/api/registry/install/sangrokjung-harness-diet
Recommend
/api/registry/recommend?task=Use%20harness-diet%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO825 GitHub stars
Stars/forks activity
INFO825 stars, 176 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: harness-diet description: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. license: MIT metadata: category: harness-maintenance phase: v1 ---
# harness-diet — put your always-loaded context back under budget
> A harness gains weight automatically (every incident note, every boss directive, every fix lands > as another paragraph in an always-loaded rule) but only loses weight when someone runs a diet. > Field measurement on a mature harness: growth-to-reduction commit ratio of ~60:1, natural growth > of ~70KB/month, and adherence degrading as the pile grows. Anthropic's guidance is blunt: > *"target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce > adherence"*, and rules without `paths` frontmatter load *"with the same priority as CLAUDE.md"* > — every session, every token ([memory docs](https://docs.claude.com/en/docs/claude-code/memory)).
**Result you should expect**: one field run took a harness from 146KB always-loaded (143% of budget) to 100.6KB (98%) with **zero governance loss** — every killswitch, decision table, trigger keyword, and canonical command verified present after the diet.
## Budgets (defaults — override via flags)
| Metric | Budget | Why | |---|---|---| | CLAUDE.md | < 200 lines | Anthropic official guidance | | Per always-loaded rule file | 8,192 B | Keeps any single rule scannable; forces narrative out | | Total always-loaded rules | 102,400 B | Attention-budget ceiling; beyond this, adherence drops |
> **Bundled script paths**: commands below use `$HOME/.claude/skills/harness-diet/…` (the > `install.sh` layout). For marketplace (`/plugin install`) installs, resolve under > `${CLAUDE_PLUGIN_ROOT}/skills/harness-diet/…` instead. The scripts are stdlib-only Python; > if unavailable, perform the step manually from the described contract.
## Phase 0 — Measure
```bash DIET="$HOME/.claude/skills/harness-diet" # or "${CLAUDE_PLUGIN_ROOT}/skills/harness-diet" python3 "$DIET/scripts/harness_diet_audit.py" # human summary python3 "$DIET/scripts/harness_diet_audit.py" --json # machine output python3 "$DIET/scripts/harness_diet_audit.py" --strict # exit 2 if over budget (CI/ratchet) ```
Auto-discovers `./.claude/rules`, `~/.claude/rules`, and CLAUDE.md files at project/user level. A rule is **always-loaded** iff its YAML frontmatter has no `paths:` key.
## Phase 1 — Classify every always-loaded rule
Walk the list from largest to smallest and pick one bucket per file:
1. **Keep always-loaded** — cross-cutting behavior needed in *every* session (tone, security boundaries, routing indexes). Diet the body (Phase 2) but keep the load class. 2. **Path-scope** — the rule only matters when specific files are touched. Add `paths:` globs. ⚠ Path scoping fires on *file access*, never on spoken keywords. A rule triggered by what the user *says* cannot be path-scoped. ⚠ No literal brackets in globs (`[locale]` parses as a character class and silently never matches). 3. **Convert to skill / hook-injected** — task-specific procedure? Official guidance: *"use skills instead"*. Best case: the rule's real trigger is already a deterministic hook — have the hook inject "Read <rule> first" into context and drop the always-load. 4. **Migrate narrative to reference** — the default for oversized keepers (Phase 2).
## Phase 2 — Migrate (block-level, never prose compression)
For each oversized file:
1. **Extract a preservation manifest first** (before touching anything): ```bash python3 "$DIET/scripts/preservation_check.py" extract rules/big-rule.md > /tmp/big-rule.manifest.json ``` 2. **Append** the outgoing blocks to `references/<name>-ref.md` (or your repo's reference dir), verbatim under a dated section header. Append *before* rewriting the rule body, and commit both together — a slimmed body pushed without its reference content is a content hole for every mirror that pulls in between. 3. **Rewrite the rule body**: keep the verdict skeleton (what to do / never do), leave a one-line pointer to the reference for the "why" and the war stories.
**Must stay in the body** (never migrate): CRITICAL/IMPORTANT banners and their verdicts, decision tables, trigger keywords and agent names (they are a routing index, not prose), killswitch env vars, canonical command lines, IDs and threshold values.
**Migrate aggressively**: incident narratives, measurement history, duplicated explanations of the same point, long example blocks, anything already present in the reference file.
## Phase 3 — Verify (two lenses, fresh checker)
1. **Loss lens (deterministic)**: ```bash python3 "$DIET/scripts/preservation_check.py" verify rules/big-rule.md /tmp/big-rule.manifest.json ``` Exit 2 = something load-bearing got migrated. Restore it before proceeding. Review the manifest by hand first — prune entries that were *intended* to move. 2. **Efficacy lens**: re-run the audit; recompute the total; confirm the savings are real (reference files are lazily `Read`, not `@`-imported — check the rule bodies contain no `@path` imports of the reference, or the "savings" still load at launch). 3. **Fresh checker**: hand the diff to an independent reviewer that didn't write it (pairs with the `review-loop` skill). Diets fail quietly: a plausible-looking slim body missing one qualifier is exactly what the maker cannot see.
## Phase 4 — Guard (keep it off)
A diet without a guard regrows. Ship-with options in `$DIET/hooks/`:
- `rules-budget-guard.sh` — PostToolUse (`Edit|Write`) advisory: the moment a rule edit pushes a file past budget, the editing session gets a context note telling it to migrate, not append. Non-blocking by design — a blocking pre-commit gate silently stalls auto-commit pipelines. - Re-run `--strict` weekly (cron, session-start dispatcher, or CI) and surface the report only when over budget.
## Anti-patterns (each one cost a real harness a failed round)
| Anti-pattern | Why it fails | |---|---| | Prose compression ("tighten the wording") | Trigger keywords, guru names, stage names *are* the routing index. A compression pass that saved 12% destroyed 70% of routing signals and was fully reverted. Move blocks; don't rewrite sentences. | | Dedup toward a private file | If rules are distributed to a team but `~/.claude/CLAUDE.md` is one person's, "delete from rules, it's already in CLAUDE.md" deletes it from every teammate's context. Dedup toward the *shared* surface. | | Slim body committed, reference append not | Mirrors pull a body full of dangling pointers. Commit both in one change. | | Trusting the maker's "everything preserved" claim | Extract the manifest before the edit and verify after. Field run: the maker claimed "6 bullets kept verbatim"; the deterministic check found two qualifiers gone. | | Treating one diet as the fix | Growth is automatic; reduction is manual. Without the guard, one measured harness regrew from 145KB toward its 220KB peak within weeks. |
## References
- `references/methodology.md` — budget rationale, growth mechanics, byte-accounting worksheet, verification lens design, worked field results.
Source provenance
Decision snapshot
825 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for harness-diet, ready for a manual X post.
harness-diet: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules with... 825 stars https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x
Listing + install path for harness-diet: https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x Install: npx skills add sangrokjung/claude-forge --skill harness-diet
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to sangrokjung but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet/audit)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)sangrokjung
@sangrokjung
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsSandbox only
Install targets
Codex install prompt
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"sangrokjung-harness-diet","task":"Install harness-diet","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Code review, repo analysis, testing, CI, GitHub, DevOps, and developer workflow skills.
Scenario
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add sangrokjung/claude-forge --skill harness-diet
Maintenance
fresh
1d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
825
76/100 Quality · 70/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
StrongSolid option that is likely worth shortlisting for production workflows.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
825 GitHub stars
Repo activity
825 stars, 176 forks
Maintenance
1d since push
License
MIT
Install
npx skills add sangrokjung/claude-forge --skill harness-diet
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add sangrokjung/claude-forge --skill harness-dietDo not use when
Alternative
168.6K Stars
npx skills add mattpocock/skills --skill code-review
Alternative
40.8K Stars
npx skills add appsmithorg/appsmith
Alternative
175.7K Stars
npx skills add mattpocock/skills --skill implement
Alternative
30.9K Stars
npx skills add vercel-labs/agent-skills --skill vercel-react-best-practices
Agent safety v2
This skill should not be selected by an agent without explicit human security review.
Do not auto-install. Inspect the source, dependencies, and permission surface first.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Skill may read or write project files, documents, generated artifacts, or local workspace state.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/sangrokjung-harness-diet/install
Agent should check
Copy prompt
Task: Use harness-diet in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20harness-diet%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install
Install command: npx skills add sangrokjung/claude-forge --skill harness-diet
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/sangrokjung-harness-diet/install
LLM text format
/api/skills/sangrokjung-harness-diet/install?format=text
Find alternatives
/api/skills/search?q=harness-diet&limit=3
Agent prompt
Use harness-diet for this task. Review https://www.openagentskill.com/api/skills/sangrokjung-harness-diet/install, then install with: npx skills add sangrokjung/claude-forge --skill harness-dietRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/sangrokjung-harness-diet
LLM text
/api/registry/manifest/sangrokjung-harness-diet?format=text
Install alias
/api/registry/install/sangrokjung-harness-diet
Recommend
/api/registry/recommend?task=Use%20harness-diet%20in%20an%20agent%20workflow&limit=3
Agent fit
Local desktop
Use-case tags
Platforms
Claude Code
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Local desktop
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
INFO825 GitHub stars
Stars/forks activity
INFO825 stars, 176 forks; issue activity unavailable in current metadata
Recent maintenance
PASS1d since push
License clarity
PASSMIT
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Solid option that is likely worth shortlisting for production workflows.
Workflow fit
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Build and ship code
I need a coding agent that can understand a repository, edit code, and review pull requests.
Investigate faster
I need my agent to research a topic, compare sources, and produce a concise report.
Workflow fit
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Turn skills into distribution
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Similar skills that may fit this task.
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
--- name: harness-diet description: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules without paths frontmatter) back under budget — migrate narrative to reference files, convert rules to path-scoped or skill-triggered loading, and verify zero governance loss with deterministic preservation checks. Use on "harness diet", "context diet", "rules diet", "CLAUDE.md too long", "always-load budget", "trim my rules", "context bloat", "하네스 다이어트", "룰 다이어트", "컨텍스트 다이어트", "always-load 줄여줘". Not for one-off prose editing or project docs cleanup. license: MIT metadata: category: harness-maintenance phase: v1 ---
# harness-diet — put your always-loaded context back under budget
> A harness gains weight automatically (every incident note, every boss directive, every fix lands > as another paragraph in an always-loaded rule) but only loses weight when someone runs a diet. > Field measurement on a mature harness: growth-to-reduction commit ratio of ~60:1, natural growth > of ~70KB/month, and adherence degrading as the pile grows. Anthropic's guidance is blunt: > *"target under 200 lines per CLAUDE.md file. Longer files consume more context and reduce > adherence"*, and rules without `paths` frontmatter load *"with the same priority as CLAUDE.md"* > — every session, every token ([memory docs](https://docs.claude.com/en/docs/claude-code/memory)).
**Result you should expect**: one field run took a harness from 146KB always-loaded (143% of budget) to 100.6KB (98%) with **zero governance loss** — every killswitch, decision table, trigger keyword, and canonical command verified present after the diet.
## Budgets (defaults — override via flags)
| Metric | Budget | Why | |---|---|---| | CLAUDE.md | < 200 lines | Anthropic official guidance | | Per always-loaded rule file | 8,192 B | Keeps any single rule scannable; forces narrative out | | Total always-loaded rules | 102,400 B | Attention-budget ceiling; beyond this, adherence drops |
> **Bundled script paths**: commands below use `$HOME/.claude/skills/harness-diet/…` (the > `install.sh` layout). For marketplace (`/plugin install`) installs, resolve under > `${CLAUDE_PLUGIN_ROOT}/skills/harness-diet/…` instead. The scripts are stdlib-only Python; > if unavailable, perform the step manually from the described contract.
## Phase 0 — Measure
```bash DIET="$HOME/.claude/skills/harness-diet" # or "${CLAUDE_PLUGIN_ROOT}/skills/harness-diet" python3 "$DIET/scripts/harness_diet_audit.py" # human summary python3 "$DIET/scripts/harness_diet_audit.py" --json # machine output python3 "$DIET/scripts/harness_diet_audit.py" --strict # exit 2 if over budget (CI/ratchet) ```
Auto-discovers `./.claude/rules`, `~/.claude/rules`, and CLAUDE.md files at project/user level. A rule is **always-loaded** iff its YAML frontmatter has no `paths:` key.
## Phase 1 — Classify every always-loaded rule
Walk the list from largest to smallest and pick one bucket per file:
1. **Keep always-loaded** — cross-cutting behavior needed in *every* session (tone, security boundaries, routing indexes). Diet the body (Phase 2) but keep the load class. 2. **Path-scope** — the rule only matters when specific files are touched. Add `paths:` globs. ⚠ Path scoping fires on *file access*, never on spoken keywords. A rule triggered by what the user *says* cannot be path-scoped. ⚠ No literal brackets in globs (`[locale]` parses as a character class and silently never matches). 3. **Convert to skill / hook-injected** — task-specific procedure? Official guidance: *"use skills instead"*. Best case: the rule's real trigger is already a deterministic hook — have the hook inject "Read <rule> first" into context and drop the always-load. 4. **Migrate narrative to reference** — the default for oversized keepers (Phase 2).
## Phase 2 — Migrate (block-level, never prose compression)
For each oversized file:
1. **Extract a preservation manifest first** (before touching anything): ```bash python3 "$DIET/scripts/preservation_check.py" extract rules/big-rule.md > /tmp/big-rule.manifest.json ``` 2. **Append** the outgoing blocks to `references/<name>-ref.md` (or your repo's reference dir), verbatim under a dated section header. Append *before* rewriting the rule body, and commit both together — a slimmed body pushed without its reference content is a content hole for every mirror that pulls in between. 3. **Rewrite the rule body**: keep the verdict skeleton (what to do / never do), leave a one-line pointer to the reference for the "why" and the war stories.
**Must stay in the body** (never migrate): CRITICAL/IMPORTANT banners and their verdicts, decision tables, trigger keywords and agent names (they are a routing index, not prose), killswitch env vars, canonical command lines, IDs and threshold values.
**Migrate aggressively**: incident narratives, measurement history, duplicated explanations of the same point, long example blocks, anything already present in the reference file.
## Phase 3 — Verify (two lenses, fresh checker)
1. **Loss lens (deterministic)**: ```bash python3 "$DIET/scripts/preservation_check.py" verify rules/big-rule.md /tmp/big-rule.manifest.json ``` Exit 2 = something load-bearing got migrated. Restore it before proceeding. Review the manifest by hand first — prune entries that were *intended* to move. 2. **Efficacy lens**: re-run the audit; recompute the total; confirm the savings are real (reference files are lazily `Read`, not `@`-imported — check the rule bodies contain no `@path` imports of the reference, or the "savings" still load at launch). 3. **Fresh checker**: hand the diff to an independent reviewer that didn't write it (pairs with the `review-loop` skill). Diets fail quietly: a plausible-looking slim body missing one qualifier is exactly what the maker cannot see.
## Phase 4 — Guard (keep it off)
A diet without a guard regrows. Ship-with options in `$DIET/hooks/`:
- `rules-budget-guard.sh` — PostToolUse (`Edit|Write`) advisory: the moment a rule edit pushes a file past budget, the editing session gets a context note telling it to migrate, not append. Non-blocking by design — a blocking pre-commit gate silently stalls auto-commit pipelines. - Re-run `--strict` weekly (cron, session-start dispatcher, or CI) and surface the report only when over budget.
## Anti-patterns (each one cost a real harness a failed round)
| Anti-pattern | Why it fails | |---|---| | Prose compression ("tighten the wording") | Trigger keywords, guru names, stage names *are* the routing index. A compression pass that saved 12% destroyed 70% of routing signals and was fully reverted. Move blocks; don't rewrite sentences. | | Dedup toward a private file | If rules are distributed to a team but `~/.claude/CLAUDE.md` is one person's, "delete from rules, it's already in CLAUDE.md" deletes it from every teammate's context. Dedup toward the *shared* surface. | | Slim body committed, reference append not | Mirrors pull a body full of dangling pointers. Commit both in one change. | | Trusting the maker's "everything preserved" claim | Extract the manifest before the edit and verify after. Field run: the maker claimed "6 bullets kept verbatim"; the deterministic check found two qualifiers gone. | | Treating one diet as the fix | Growth is automatic; reduction is manual. Without the guard, one measured harness regrew from 145KB toward its 220KB peak within weeks. |
## References
- `references/methodology.md` — budget rationale, growth mechanics, byte-accounting worksheet, verification lens design, worked field results.
Source provenance
Decision snapshot
825 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for harness-diet, ready for a manual X post.
harness-diet: Measure and shrink the always-loaded context of a Claude Code harness (CLAUDE.md + rules with... 825 stars https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x
Listing + install path for harness-diet: https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=x Install: npx skills add sangrokjung/claude-forge --skill harness-diet
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to sangrokjung but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet/audit)
[](https://www.openagentskill.com/skills/sangrokjung-harness-diet?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)sangrokjung
@sangrokjung
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Code Review
Review a branch or diff against repository standards and the originating spec in two independent analysis passes.
168.6K StarsAppsmith
Platform to build admin panels, internal tools, and dashboards. Integrates with 25+ databases and any API.
40.8K StarsImplement
Implement work from an approved spec or ticket set, run focused and full tests, invoke code review, and commit the result to the current branch.
175.7K StarsVercel React Best Practices
React and Next.js performance guidance for writing, reviewing, and refactoring production UI code.
30.9K StarsPermission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Install readiness