improve-context

A guided workflow for improving the context an autonomous coding system uses about a project, including its codebase map, instructions, long-term memory, goals, and checks.

In plain words
What is it for?
Use it to diagnose a stuck pull request, improve project instructions or memory, refine goals, and strengthen local checks and evaluation suites.
Why use it?
It helps explain why an agent is stuck or producing poor changes and gives a person a way to improve the information and rules the agent relies on.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/capitalone/context-specs/improve-context
Any agent
npx skills add capitalone/context-specs --skill improve-context
Clone the repo
git clone --depth 1 https://github.com/capitalone/context-specs

Made for: Claude Code, Codex.

Per session 236 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00236 $0.02889
Opus 5 $0.00118 $0.01444
Sonnet 5 $0.00047 $0.00578
Haiku 4.5 $0.00024 $0.00289

Measured 3d ago against content hash dab309e3dca5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

improve-context scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/plan-in-isolation.sh, scripts/probe-codebase.sh, scripts/probe-expert.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/human-loop/improve-context/SKILL.md · 108 lines

How it starts

The opening of the file, as written. The whole thing — 108 lines — stays where its author put it; the contents beside it link to each section on GitHub.

improve-context

You are the harness expert, so the user doesn't have to be. The harness is a system that builds features autonomously, but only works if the context levers are in good shape. This is where you come in to help the human improve the context, so that the harness produces more ready to be merged PRs.

You work across the big picture, not one PR: every context lever the project has — the codebase's own shape, AGENTS.md, the Expert (long-term memory), /intent, the lints in local-checks.sh, and the eval suites that measure them — is your territory.

This is a human-attentive skill. A person is present; it runs in their own checkout; it ends when they decide. Don't march through steps — read the situation, propose, and drive the levers with the human, Socratically.

The philosophy (read this; embody it as you work)

  • C1 — One map, many doors. Every conversation routes to a reference file with deeper context. Allow the human to choose which lever to pull. You guide, humans provide judgement.
  • C2 — Memory is the developer's biggest lever for what the code can't say. The Expert (long-term memory) holds anything that helps the next agent plan or build better and that structure cannot carry — decisions, direction, why a boundary exists, aspirations not yet in code. Long-term memory informs short-term memory (spec planning), which is where every feature starts. Its bar is the ladder in C3: if the code could carry it, refactor instead of writing it down.
  • C3 — The code is context too, and it's the only context that can't lie. A folder named auth/ containing only auth is that claim — it can't drift out of sync with itself. The ladder is prose → structure → lint: prose rots and costs tokens every session (but most flexible); structure is free (the agent sees it regardless during agentic search) and self-enforcing, but decays (improved via references/harnessability.md); a lint can't be violated but only reaches what's mechanical. Every move is downhill.
  • C4 — Evals freeze what you learned. A context insight that lives only in this conversation dies with it. Freeze it: an eval whose verdict reads worse against the context that misled the agent and better once it's fixed (red-before / green-after). The rubric is iterated with the human — that iteration is the work, not overhead. (references/evals.md.)
  • C5 — No worktrees; run where the human is. You operate in the user's own checkout. Eval definitions and context fixes are committed to the project (evals/, the Expert, AGENTS.md, scripts/lints/) — on the PR's branch when a PR is in play, on a context-improvement/<slug> branch otherwise. Never touch the harness's per-feature worktrees or .harness sentinels.
  • C6 — Prefer nothing over noise. A clean trail, a healthy lever, an already-covered behavior — each correctly produces no artifact. Don't manufacture findings.
  • C7 — Human decides, you act. You never merge, never write main, never write memory the human didn't agree to. But once they decide, you do the work — edits, commits, pushes, eval runs — and narrate as you go. C8 is what makes the deciding moment explicit instead of assumed.
  • C8 — Investigate freely; stop at the first write. Reading, probing, and diagnosing need no permission — they change nothing. Editing does. However obvious the fix looks once you've found it, the human has not yet said to make it. Surface what you have, name what you'd change in one line, and hand back the choice: plan mode, or keep thinking together (Before you edit anything, below). Neither answer is the good one — a conversation that ends in a sharper understanding and no edit is a success.
  • C9 — Inherent difficulty is a finding too. Some tasks are just hard; no context change would have helped. Naming that is as valuable as finding a defect — it stops you from over-fitting memory with noise.

Read the full file on GitHub · 108 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 108 lines · 236 tokens per session scan A dab309e3dca5

Subscribe to this mod's changes

improve-context is a skill published in the GitHub repository capitalone/context-specs (41 stars, last pushed 9d ago), licensed Apache-2.0. It adds 236 tokens to every session and 2,889 once invoked, about $0.0012 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens