agentleFS
sennaBrunosennaBruno/claude-skills/skills/validate-claude-code-setup/SKILL.md

validate-claude-code-setup

Skill1 starsChanged 8 months agoApache-2.0View on GitHub

Use when auditing or re-validating Claude Code configuration after time has passed, when suspecting outdated settings, when compaction is happening too often or too rarely, or when model/effort settings may no longer reflect current best practices

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use WebSearch to validate each setting.

    line 35
  2. Very specific:

    Search: "claude sonnet [current model version] context window size 2026" and "claude opus [version] context window"

    line 39
  3. Distinctive:

    After research, update only settings that are out of sync with current best practices.

    line 92
  4. Very specific:

    After editing settings.json, restart Claude Code and confirm:

    line 114

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Validate Claude Code Setup

Overview

Claude Code settings degrade over time as models evolve, context windows change, and community best practices shift. This skill provides a structured audit and research process to keep ~/.claude/settings.json optimized.

Core principle: Validate every setting against current docs + community consensus before changing. Don't guess — research first, then apply.


Step 1 — Read Current State

cat ~/.claude/settings.json

Extract the values for these four critical settings:

SettingKeyLocation
ModelANTHROPIC_MODELenv block
Autocompact thresholdCLAUDE_AUTOCOMPACT_PCT_OVERRIDEenv block
Context windowModel ID suffix (e.g. sonnet[1m])env.ANTHROPIC_MODEL
Effort leveleffortLeveltop-level

Step 2 — Research Latest Recommendations

Use WebSearch to validate each setting. Always search for current year.

2a. Model context window

Search: "claude sonnet [current model version] context window size 2026" and "claude opus [version] context window"

Decision matrix (as of early 2026):

ModelContext Window1M suffix needed?
sonnet (no suffix)200KNo
sonnet[1m]1MYes (degrades at >400K)
opus (no suffix)200KNo
opus[1m]1MYes (good up to ~800K)

Verdict for daily coding:

  • Sonnet → stay at 200K (retrieval collapses at 1M)
  • Opus → 1M viable only for massive codebase sessions (76% retrieval at 1M vs 93% at 256K)

2b. Autocompact threshold

Search: "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE best value 2026 context rot"

What the variable does:

  • LOWERS the autocompact trigger below the system default (~83-90%)
  • Values above ~83 are silently clamped (Math.min bug — search GitHub issues to verify if fixed)
  • Setting too low (e.g. 60) → compacts too often, loses useful context
  • Setting too high → context rot (model degrades from overloaded window)

Sweet spot as of early 2026: 75

ValueEffect
60Too early — excessive compaction
75Sweet spot — avoids rot without over-compacting
80Acceptable, slightly more context rot risk
83+At/above clamp limit — effectively same as default

2c. Effort level

Search: "Claude Code effortLevel best default 2026"

Available values: low, medium, high (persisted); max (Opus only, session-only)

ValueThinkingBest for
lowMinimalBatch, boilerplate, renaming
mediumSelectiveDaily dev — official Anthropic default
highAlmost alwaysComplex arch, hard debugging
maxAlways deepestPersistent bugs, critical decisions

Default recommendation: "medium" — Anthropic changed Opus default from high to medium in 2026; Sonnet docs explicitly recommend medium.


Step 3 — Apply Validated Settings

After research, update only settings that are out of sync with current best practices.

Optimal baseline config (validate against research before applying):

{
  "env": {
    "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75",
    "ANTHROPIC_MODEL": "sonnet"
  },
  "effortLevel": "medium"
}

To temporarily override per-session:

  • Context: /model opus or ANTHROPIC_MODEL=opus[1m] before starting
  • Effort: type ultrathink in prompt or /effort high in session

Step 4 — Verify After Applying

After editing settings.json, restart Claude Code and confirm:

  1. Status line shows correct model
  2. Compaction doesn't trigger prematurely in a normal session
  3. Response quality feels appropriate for effort level

What to Re-Research When Things Feel Off

SymptomWhat to search
Compacting every 10 turnsCLAUDE_AUTOCOMPACT_PCT_OVERRIDE clamp bug fix + current CC version
Slow responses / high latencyClaude Code 1M context latency [year]
Model ignoring middle of filesClaude lost in the middle [model version] [year]
Shallow reasoning on complex tasksClaude Code effortLevel high vs max [year]
Cost explodingClaude Code token usage by effortLevel [year]

Common Mistakes

MistakeFix
Setting autocompact to 60 to "prevent context loss"That makes it compact MORE. Raise to 75.
Adding [1m] suffix to SonnetRetrieval collapses at 400K. Remove suffix.
Setting effortLevel: "max" as defaultmax is Opus-only and session-only. Silently ignored on Sonnet.
Not researching before changingBest practices shift every 1-3 months as models update. Always search first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.