optimize SKILL.md skillB

optimize from ictechgy/context-guard is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add ictechgy/context-guard/optimize@git:20260905.919b87d

Pins git:20260905.919b87d in mdr.lock. Pin the fingerprint instead.

Audit grade
B, 16 of 17 checks passed
Kind
SKILL.md skill
Repository
ictechgy/context-guard
Path
plugins/context-guard/skills/optimize/SKILL.md
Versions recorded
4
Latest version
git:20260905.919b87d, committed Sep 5, 2026
First version recorded
May 29, 2026
Size
3,371 bytes
Repository stars
3
License
Apache-2.0

Diagnose and reduce Claude Code token usage for a project or session using context hygiene, model and effort routing, MCP minimization, output trimming/sanitizing, subagent discipline, and measurement. Use when the user asks to lower Claude Code token usage, cost, context bloat, or usage-limit burn.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# ContextGuard

Goal: reduce Claude Code token usage without lowering task success quality.

Use this order:

1. Measure before changing behavior.
   - Ask the user to run `/usage` and `/context` if inside Claude Code.
   - For first-time setup, run `context-guard-setup --plan` and offer `context-guard-setup --yes` for recommended project-local settings.
   - If transcript files are available, run `context-guard-audit ~/.claude/projects --top 20 --recommend`.
   - For project configuration/context bloat, run `context-guard-diet scan .`.
   - For structural waste such as duplicate rules, stale import candidates, oversized tool schemas, or repeated reads in local logs, run `context-guard-diet structural-waste . --json`.
2. Identify the largest bucket:
   - stale conversation history -> recommend `/clear` between unrelated tasks and focused `/compact` for long tasks.
   - startup context -> prune `CLAUDE.md`, move long workflows to skills, disable unused MCP servers.
   - large file reads -> use `context-guard-read-symbol` and the example Read guard before whole-file context.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add ictechgy/context-guard/optimize@sha256:6b60918eddd1479f

The line at the top of this page pins the label git:20260905.919b87d, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_d3xcmektzbxk7vig.svg)](https://markdownregistry.com/a/art_d3xcmektzbxk7vig)

6 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 4 versions of this file, between May 29, 2026 and Sep 5, 2026, about one every 33 days.

versioncommittedcommitsizeaudit
git:20260905.919b87d latest2026-09-05 919b87d 3,371 BB view · diff
git:20260607.036ab292026-06-07 036ab29 3,544 BB view · diff
git:20260607.a4e652d2026-06-07 a4e652d 3,369 BB view · diff
git:20260529.be213252026-05-29 be21325 3,094 BB view

Audit of the latest version

B  16 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: Frontmatter declares a name
  • pass: Frontmatter block present
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (3371 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

ictechgy/context-guard · 3 stars · license Apache-2.0 · pushed 2026-09-06 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_d3xcmektzbxk7vig
GET https://markdownregistry.com/api/v1/resolve?ref=ictechgy/context-guard/optimize
GET https://markdownregistry.com/api/v1/blob/6b60918eddd1479f1d4f72792a3ee9b3d0acac4f6549614720b11bf3ba67feac

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from ictechgy/context-guard

audit SKILL.md skill
ictechgy/context-guard · plugins/context-guard/skills/audit/SKILL.md · Audit local Claude Code transcript usage and summarize likely token hotspots. Use when the user asks where Claude Code…
git:20260906.ea89522 · audit B · 3 stars
setup SKILL.md skill
ictechgy/context-guard · plugins/context-guard/skills/setup/SKILL.md · Interactive or guided project setup for Claude Code token optimizer settings. Use when the user asks to install…
git:20260905.919b87d · audit B · 3 stars

Every file in ictechgy/context-guard

Other files named optimize

optimize SKILL.md skill
rustyrazorblade/skills · plugins/cassandra-expert/skills/optimize/SKILL.md · Performance optimization for Apache Cassandra clusters. Use when tuning configuration, improving throughput, reducing…
git:20260324.70fc6f2 · audit A · 44 stars
optimize SKILL.md skill
quriosity-agent/qcut · qcut/.agents/skills/optimize/SKILL.md · Improve interface performance across loading speed, rendering, animations, images, and bundle size. Makes experiences…
git:20260308.8b86d2e · audit A · 42 stars
optimize SKILL.md skill
outlinedriven/odin-claude-plugin · plugins/odin-code/skills/optimize/SKILL.md · Use when asked to optimize code, make a path faster, make this as fast as possible, reduce allocations, repair a…
git:20260912.3bb16e0 · audit A · 38 stars
optimize SKILL.md skill
borda/ai-rig · plugins/codex-rig/skills/optimize/SKILL.md · Optimize a measurable metric with bounded iterations, guardrails, and regression gates.
git:20261009.e7932ee · audit A · 28 stars
optimize SKILL.md skill
stackhawk/agent-skills · plugins/optimize/skills/optimize/SKILL.md · Analyze a codebase and produce an optimal HawkScan setup — tech flags, scan-policy plugin selection, and stackhawk.yml…
v2.7.0 · audit A · 16 stars
optimize SKILL.md skill
marcel-bich/marcel-bich-claude-marketplace · plugins/credo/skills/optimize/SKILL.md · The credo optimisation audit - an opt-in, read-only scan of a repo for things that slow parallel and long-term work…
git:20261002.fd2015d · audit B · 12 stars
optimize SKILL.md skill
illyism/dev-skills · code/optimize/SKILL.md · Optimizes code, queries, and features based on actual usage by removing unused fields, aggregations, JOINs, and unused…
v1.0.0 · audit A · 6 stars

Browse by kind, by grade B, or by owner.