Skip to content
Agentmart
Submit a tool

ContextOptimizer

Optimizes CLAUDE.md, AGENTS.md, and other agent context files in a repository using research-backed principles.

Skill by RooseveltAdvisors

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/rooseveltadvisors-contextoptimizer

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Optimizes CLAUDE.md, AGENTS.md, and other agent context files in a repository using research-backed principles. USE WHEN optimize context files OR audit CLAUDE.md OR improve agents.md OR reduce context bloat OR review agent instructions. Based on "Evaluating AGENTS.md" (Gloaguen et al., 2025) findings.

Use cases: security, research, agent-building

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/contextoptimizer

What's inside

Skill name
ContextOptimizer
Description
Optimizes CLAUDE.md, AGENTS.md, and other agent context files in a repository using research-backed principles. USE WHEN optimize context files OR audit CLAUDE.md OR improve agents.md OR reduce context bloat OR review agent instructions. Based on "Evaluating AGENTS.md" (Gloaguen et al., 2025) findings.
License
MIT
Instructions
46 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed

Files (6)

  • ResearchFindings.md
  • SKILL.md
  • .gitkeep · Tools/
  • Audit.md · Workflows/
  • Generate.md · Workflows/
  • Optimize.md · Workflows/

SKILL.md (first lines)

# ContextOptimizer

Analyzes and optimizes repository-level agent context files (CLAUDE.md, AGENTS.md, .cursorrules, etc.) using evidence-based principles from the paper "Evaluating AGENTS.md: Are Repository-Level Context Files Helpful for Coding Agents?" (Gloaguen et al., ICML 2025).

## Key Research Findings (Paper Reference)

The paper found that context files **tend to reduce task success rates** while **increasing inference cost by 20%+**. The core problem: unnecessary requirements make tasks harder. However, **developer-written minimal context files slightly outperform having no context at all**. The skill applies these findings to produce optimized, minimal context files.

## Workflow Routing

| Workflow | Trigger | File |
|----------|---------|------|
| **Audit** | "audit context files", "analyze CLAUDE.md" | `Workflows/Audit.md` |
| **Optimize** | "optimize context files", "improve CLAUDE.md" | `Workflows/Optimize.md` |
| **Generate** | "generate context file", "create CLAUDE.md from scratch" | `Workflows/Generate.md` |

## Examples

**Example 1: Audit existing context files**
```
User: "Audit the context files in this repo"
→ Invokes Audit workflow
→ Scans for CLAUDE.md, AGENTS.md, .cursorrules, .github/copilot-instructions.md
→ Scores each file against research-backed anti-patterns
→ Returns report with specific line-level recommendations
```

**Example 2: Optimize a bloated CLAUDE.md**
```
User: "Optimize my CLAUDE.md"
→ Invokes Optimize workflow
→ Reads current file, detects anti-patterns
→ Produces optimized version: removes redundancy, trims codebase overviews, keeps only actionable constraints
→ Shows before/after diff for user approval
```

**Example 3: Generate minimal context from scratch**
```
User: "Generate a CLAUDE.md for this repo"
→ Invokes Generate workflow
→ Explores repo structure, build system, test commands
→ Produces minimal context file with only non-obvious, actionable requirements
→ Avoids codebase overviews (paper found them ineffective)
```

From RooseveltAdvisors/claude-agent-stack, MIT.

More from RooseveltAdvisors/claude-agent-stack

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Mar 1, 2026 (8 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from RooseveltAdvisors

Cite this page

ContextOptimizer skill. Agent Mart. https://agentmart.dev/skills/rooseveltadvisors-contextoptimizer (last updated 2026-10-24)