Using Agent Skills
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
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…
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install sangrokjung/claude-forge harness-diet --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/harness-diet .claude/skills/harness-diet && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .claude/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-dietType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install sangrokjung/claude-forge harness-diet --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/harness-diet .agents/skills/harness-diet && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .agents/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install sangrokjung/claude-forge harness-diet --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/harness-diet .cursor/skills/harness-diet && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .cursor/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/sangrokjung/claude-forge.git --path skills/harness-diet--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install sangrokjung/claude-forge harness-diet --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/harness-diet .gemini/skills/harness-diet && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .gemini/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install sangrokjung/claude-forge harness-dietInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/harness-diet .github/skills/harness-diet && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .github/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add sangrokjung/claude-forge --skill harness-diet -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install sangrokjung/claude-forge harness-diet --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/sangrokjung/claude-forge.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/harness-diet .opencode/skills/harness-diet && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "harness-diet" agent skill from https://github.com/sangrokjung/claude-forge/tree/main/skills/harness-diet into .opencode/skills/harness-diet/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "harness-diet", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
harness-dietMeasure 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…
Harness Diet is an agent skill from sangrokjung/claude-forge. 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…
Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `hooks/rules-budget-guard.sh`, `references/methodology.md` and `scripts/harness_diet_audit.py`).
It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: oh-my-zsh for Claude Code — 16 agents, 35 commands, 32 skills, 21 safety hooks in one install. v4.0 adds an adversarial review loop: a second agent that never sees the first… The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 34d881d. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 2 files in scripts/ (Python and Shell), which the agent can run.
Shell commands in SKILL.md call:
python3From the folder's file list and the shell code blocks in SKILL.md.
Links to these hosts (documentation or services it may open):
docs.claude.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Harness Diet loads about 1.9k tokens when it runs, and up to ~3.4k if it reads all its reference files. Until then it costs about 139 tokens; SKILL.md has 879 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from sangrokjung/claude-forge at commit 34d881d, republished under its MIT licence (© sangrokjung). 879 words, ~1,919 tokens.
.claude/skills/harness-diet/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.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
pathsfrontmatter load "with the same priority as CLAUDE.md" — every session, every token (memory docs).
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.
| 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/…(theinstall.shlayout). 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.
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.
Walk the list from largest to smallest and pick one bucket per file:
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).<rule> first" into context and drop the always-load.For each oversized file:
python3 "$DIET/scripts/preservation_check.py" extract rules/big-rule.md > /tmp/big-rule.manifest.jsonreferences/<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.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.
python3 "$DIET/scripts/preservation_check.py" verify rules/big-rule.md /tmp/big-rule.manifest.jsonRead, not @-imported — check the rule bodies contain no
@path imports of the reference, or the "savings" still load at launch).review-loop skill). Diets fail quietly: a plausible-looking slim body missing one
qualifier is exactly what the maker cannot see.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.--strict weekly (cron, session-start dispatcher, or CI) and surface the report only
when over budget.| 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/methodology.md — budget rationale, growth mechanics, byte-accounting worksheet,
verification lens design, worked field results.© sangrokjung, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 4 other files (scripts, references) in skills/harness-diet of sangrokjung/claude-forge.
Open the folder on GitHubat commit 34d881d
Harness Diet next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Harness Diet this skillsangrokjung/claude-forge | 852 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Using Agent Skillsaddyosmani/agent-skills | 105k | 4 repos | ~2.4k | Automated safety check: Pass | MIT | |
| Claude ReflectBayramAnnakov/claude-reflect | 1.8k | 2 repos | ~627 | Automated safety check: Pass | MIT | |
| Writing For Agentsbestofjs/bestofjs | 3.1k | 20 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills | 21k | — | ~1.9k | Automated safety check: Pass | MIT | |
| Task Observerrebelytics/one-skill-to-rule-them-all | 3.2k | 1 repos | ~11k | Automated safety check: Pass | CC-BY-4.0 |
addyosmani/agent-skills
Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.
BayramAnnakov/claude-reflect
Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.
bestofjs/bestofjs
Writing documents for agents. An agent skill from bestofjs/bestofjs.
KKKKhazix/khazix-skills
Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.
rebelytics/one-skill-to-rule-them-all
Monitors task execution for skill improvement opportunities.
microsoft/SkillOpt
Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.
sangrokjung/claude-forge
Master systematic debugging techniques, profiling tools, and root cause analysis to efficiently track down bugs across any codebase or technology stack.
sangrokjung/claude-forge
Manage major dependency version upgrades with compatibility analysis, staged rollout, and comprehensive testing.
sangrokjung/claude-forge
Analyze session work and automatically convert reusable patterns into Claude Code skills.
sangrokjung/claude-forge
A skill your agent uses when starting Claude Code projects, writing CLAUDE.md/spec.md, dispatching subagents, or requesting Agent Teams parallel development.
sangrokjung/claude-forge
Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.
sangrokjung/claude-forge
A skill your agent uses when wrapping up a session before ending.
Categories
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…. Harness Diet is an agent skill from sangrokjung/claude-forge.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.
Harness Diet fits situations like: tasks that involve Agent instruction files.
Run `npx skills add sangrokjung/claude-forge --skill harness-diet -a claude-code`. Or copy the skill folder (skills/harness-diet in sangrokjung/claude-forge) into .claude/skills/harness-diet in your project. Claude Code loads it when a task matches its description.
Run `npx skills add sangrokjung/claude-forge --skill harness-diet -a codex`. Or copy the skill folder (skills/harness-diet in sangrokjung/claude-forge) into .agents/skills/harness-diet in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sangrokjung/claude-forge --skill harness-diet -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/harness-diet, .gemini/skills/harness-diet, .github/skills/harness-diet and .opencode/skills/harness-diet in your project.
Going by SKILL.md and its folder, Harness Diet needs Python and a shell for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3; A Bash shell.
SKILL.md names 1 domain. As links in the text: docs.claude.com. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Harness Diet is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.9k tokens (SKILL.md is roughly 7.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Harness Diet: Using Agent Skills (addyosmani/agent-skills, 105k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.8k stars), Writing For Agents (bestofjs/bestofjs, 3.1k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
sangrokjung (a GitHub user) maintains it in sangrokjung/claude-forge, which has 852 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on September 3, 2026.
Source: sangrokjung/claude-forge on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.