user-config-management
Central authority for managing Claude Code user configuration directories (~/.claude/ and ~/.claude.json). Covers storage cleanup, backup/restore, reset workflows, MCP server preservation, history management, plan management, session statistics, and configuration health auditing. Delegates to docs-management skill for official documentation. Use when managing user config, cleaning up storage, backing up settings, resetting Claude Code, or auditing configuration health.
What this skill does
# User Configuration Management ## MANDATORY: Invoke docs-management First > **STOP - Before providing ANY response about Claude Code user configuration:** > > 1. **INVOKE** `docs-management` skill for official documentation > 2. **QUERY** for the user's specific topic > 3. **BASE** all responses on official documentation + this skill's custom references > > **Skipping this step results in outdated or incorrect information.** ### Verification Checkpoint Before responding, verify: - [ ] Did I invoke docs-management skill for official docs? - [ ] Did I check this skill's references for custom workflows? - [ ] Is my response based on official docs (settings, MCP) + skill references (reset, backup)? If ANY checkbox is unchecked, STOP and complete the missing steps. --- ## Overview Central authority for managing Claude Code's user configuration directories. This skill provides: 1. **Keyword registry** for efficient docs-management queries 2. **Custom workflows** not covered by official docs (reset, backup/restore, drift detection) 3. **Command inventory** linking to existing cleanup commands 4. **Cross-platform guidance** for path handling **Architecture:** Hybrid delegation - official docs via docs-management, custom workflows via skill references. ## When to Use This Skill **Keywords:** user config, ~/.claude, .claude.json, cleanup, storage, backup, restore, reset, MCP servers, history, plans, sessions, debug logs, prune, audit, drift detection **Use this skill when:** - Managing ~/.claude/ directory contents - Cleaning up storage (sessions, agents, debug, cache) - Backing up or restoring configuration - Resetting Claude Code while preserving MCP servers - Searching command history - Managing plan files - Viewing session statistics - Auditing configuration health - Detecting structure drift after updates ## Keyword Registry for docs-management Queries Use these keywords when querying docs-management skill: ### Configuration Files | Topic | Keywords | | --- | --- | | Settings Overview | "settings", "settings.json", "configuration files" | | User Settings | "user settings", "~/.claude/settings.json" | | Global Config | ".claude.json", "global config", "mcpServers" | | MCP Servers | "MCP servers", "mcpServers", "user-level MCP" | ### Retention & Cleanup | Topic | Keywords | | --- | --- | | Retention Setting | "cleanupPeriodDays", "session retention", "auto-cleanup" | | Session Cleanup | "sessions", "project sessions", "session files" | | Debug Logs | "debug", "debug transcripts", "debugging" | ### Storage Locations | Topic | Keywords | | --- | --- | | Storage Structure | "~/.claude", "storage directory", "claude folder" | | Projects Directory | "projects", "project sessions", "session storage" | | Plugins Directory | "plugins", "plugin cache", "installed plugins" | ## Quick Decision Tree **What do you want to do?** All actions are invoked via the consolidated `/user-config <action>` skill: 1. **Check storage usage** -> Run `/user-config storage` 2. **Clean up sessions** -> Run `/user-config cleanup-sessions` 3. **Clean up agents** -> Run `/user-config cleanup-agents` 4. **Clean up debug logs** -> Run `/user-config cleanup-debug` 5. **Comprehensive cleanup** -> Run `/user-config prune` 6. **Nuclear cleanup (everything)** -> Run `/user-config prune --nuclear` 7. **Backup configuration** -> Run `/user-config backup` 8. **Restore from backup** -> Run `/user-config restore` 9. **Reset (preserve MCP)** -> Run `/user-config reset` - See [reset-workflow.md](references/reset-workflow.md) 10. **Search history** -> Run `/user-config history` 11. **Manage plans** -> Run `/user-config plans` 12. **Audit config health** -> Run `/user-config audit` 13. **View session stats** -> Run `/user-config session-stats` 14. **View MCP servers** -> Run `/user-config mcp` 15. **Reset plugins (nuclear)** -> Run `/user-config reset-plugins` ## Directory Structure Reference ### ~/.claude/ Directory (13 Concepts) | Directory/File | Purpose | Cleanup Safe | Action | | --- | --- | --- | --- | | `projects/` | Session files per project | Yes (old files) | `/user-config cleanup-sessions` | | `debug/` | Debug transcripts | Yes (old files) | `/user-config cleanup-debug` | | `plugins/` | Installed plugin cache | No (use /plugin) | `/plugin uninstall` | | `file-history/` | Edit undo history | **No** (loses undo) | Never auto-clean | | `plans/` | Saved execution plans | Yes (old files) | `/user-config plans` | | `shell-snapshots/` | Shell state captures | Yes | `/user-config prune` | | `todos/` | Todo list state | Yes (old files) | `/user-config prune` | | `statsig/` | Feature flag cache | Always safe | `/user-config prune` | | `ide/` | IDE lock files | Yes (stale) | `/user-config audit` | | `session-env/` | Session environment | Yes | `/user-config prune` | | `settings.json` | User settings | **Never** | Manual only | | `history.jsonl` | Command history | Usually keep | `/user-config history` | | `.credentials.json` | OAuth tokens | **Never backup** | Manual only | ### ~/ Root Files (3 Concepts) | File | Purpose | Backup Priority | | --- | --- | --- | | `.claude.json` | Global config (mcpServers, OAuth, flags) | **Critical** (mcpServers) | | `CLAUDE.md` | User-level instructions | High | | `.claudeignore` | User-level ignore patterns | Medium | **IMPORTANT:** There is NO `~/.mcp.json` file. User-scope MCP servers go in `~/.claude.json` under the `mcpServers` field. ## Action Inventory All actions consolidated under the `/user-config <action>` skill: ### Cleanup Actions | Action | Purpose | | --- | --- | | `/user-config cleanup-agents` | Agent transcript cleanup (7d default) | | `/user-config cleanup-debug` | Debug log cleanup (7d default) | | `/user-config cleanup-sessions` | Session file cleanup (7d default) | | `/user-config cleanup-hook-logs` | Hook log cleanup (30d default) | | `/user-config prune` | Comprehensive cleanup (--nuclear) | ### Analysis Actions | Action | Purpose | | --- | --- | | `/user-config status` | Unified overview of all config | | `/user-config storage` | Storage analysis | | `/user-config session-stats` | Session statistics | | `/user-config costs` | API cost estimation | | `/user-config audit` | Structure drift detection | ### Backup/Restore Actions | Action | Purpose | | --- | --- | | `/user-config backup` | Full backup to ~/.claude-backups/ | | `/user-config restore` | Restore from backup | | `/user-config reset` | Backup MCP -> Wipe -> Restore workflow | | `/user-config reset-plugins` | Complete plugin reset (cache + registry + settings) | ### Configuration Actions | Action | Purpose | | --- | --- | | `/user-config global` | View/edit ~/.claude.json safely | | `/user-config mcp` | List/export MCP server configs | | `/user-config history` | Search/export command history | | `/user-config plans` | List/view/archive plan files | ### Session Analysis Actions | Action | Purpose | | --- | --- | | `/user-config file-versions` | Browse file edit history | | `/user-config compaction-review` | Review compaction information loss | | `/user-config prompt-extract` | Extract successful prompts | | `/user-config transcript-search` | Search across session transcripts | | `/user-config retrospective` | Session postmortem/retrospective | ## Custom Workflows (Skill-Owned) These workflows are NOT in official documentation - they are custom features: ### Reset Workflow (MCP Preservation) For users who want a fresh start but need to preserve MCP server configs. **Full guide:** [references/reset-workflow.md](references/reset-workflow.md) **Quick summary:** 1. Backup: Extract mcpServers from ~/.claude.json 2. Backup: Copy settings.json (optional) 3. User wipes ~/.claude/ and ~/.claude.json 4. User relaunches Claude Code (creates fresh config) 5. Restore: Inject mcpServers into new ~/.claude.json ### Backup/Restore Workflow For full configuration backup and restore. **Full guide:** [references/backup-restore.md](references/backup-rest
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.