From cc-customize
This skill should be used when the user asks to "adjust auto compact", "change compact percentage", "set auto compact threshold", "configure auto compaction", "change context compaction", or wants to modify the CLAUDE_AUTOCOMPACT_PCT_OVERRIDE setting in Claude Code.
npx claudepluginhub aeghnnsw/cc-toolkit --plugin cc-customizeThis skill uses the workspace's default tool permissions.
Adjust the auto-compact percentage threshold that controls when Claude Code automatically compresses conversation context.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
Adjust the auto-compact percentage threshold that controls when Claude Code automatically compresses conversation context.
Claude Code automatically compacts (summarizes) conversation history when context usage reaches a threshold. The CLAUDE_AUTOCOMPACT_PCT_OVERRIDE environment variable controls this threshold as a percentage of context capacity. Lower values trigger compaction earlier, preserving more room but summarizing sooner. Values above 83 are silently capped due to an internal response-token buffer.
Read ~/.claude/settings.json to check the current configuration.
Extract the current CLAUDE_AUTOCOMPACT_PCT_OVERRIDE value from the env block in settings.json.
env block is absent, display: "Auto-compact threshold is not set (default: ~95%)"Use AskUserQuestion to ask:
"Enter desired auto-compact percentage (1–83). Lower values compact earlier, preserving more context headroom. Recommended: 60–75 for most work."
Parse the user's response as an integer.
Read ~/.claude/settings.json again (to get the latest state), then use the Edit tool to perform a surgical update:
~/.claude/settings.json does not exist, create it with { "env": { "CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "N" } }.env block, add an env key. Preserve all other top-level keys.env block exists, add or replace only the CLAUDE_AUTOCOMPACT_PCT_OVERRIDE key within it. Preserve all other keys in both the env block and the rest of the file.The value must be a string (environment variables are strings). Example partial excerpt:
"env": {
"EXISTING_KEY": "preserved",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "75"
}
Inform the user: "Auto-compact threshold set to N%. Restart Claude Code for the change to take effect."
To revert to default behavior, remove the CLAUDE_AUTOCOMPACT_PCT_OVERRIDE key from the env block in ~/.claude/settings.json. Preserve all other keys.