user-config
Manage Claude Code user configuration (~/.claude/). Actions: audit, backup, cleanup-agents, cleanup-debug, cleanup-hook-logs, cleanup-sessions, compaction-review, costs, file-versions, global, history, mcp, plans, prompt-extract, prune, reset, reset-plugins, restore, retrospective, session-stats, status, storage, transcript-search.
What this skill does
# User Configuration Management Unified skill for managing Claude Code user configuration (`~/.claude/` and `~/.claude.json`). Consolidates all user-config operations into a single entry point with action-based routing. **Related Skill:** Invoke the `claude-ecosystem:user-config-management` skill for the meta-level configuration authority, known-structure manifest, and docs-management delegation patterns. ## Quick Decision Tree **What do you want to do?** | Intent | Action | Read-Only? | |--------|--------|------------| | Check config health at a glance | `status` | Yes | | Deep health audit with drift detection | `audit` | Yes (unless `--fix`) | | See storage breakdown and recommendations | `storage` | Yes | | View session file counts and trends | `session-stats` | Yes | | Estimate API costs and token usage | `costs` | Yes | | Clean up old session files | `cleanup-sessions` | **Destructive** | | Clean up old agent transcripts | `cleanup-agents` | **Destructive** | | Clean up old debug files | `cleanup-debug` | **Destructive** | | Clean up old hook log files | `cleanup-hook-logs` | **Destructive** | | Comprehensive cleanup (all categories) | `prune` | **Destructive** | | Backup config to ~/.claude-backups/ | `backup` | No (creates files) | | Restore config from backup | `restore` | No (overwrites files) | | Reset Claude Code preserving MCP servers | `reset` | **Destructive** | | Nuclear plugin reset (cache+registry) | `reset-plugins` | **Destructive** | | View/edit ~/.claude.json global config | `global` | Depends on mode | | List/manage MCP server configurations | `mcp` | Depends on mode | | Search/analyze command history | `history` | Yes (unless `--clear`) | | List/view/archive plan files | `plans` | Depends on mode | | Browse file edit history across sessions | `file-versions` | Yes (unless `--restore`) | | Review compaction information loss | `compaction-review` | Yes | | Extract successful prompts from sessions | `prompt-extract` | Yes | | Search across session transcripts | `transcript-search` | Yes | | Generate session retrospective/postmortem | `retrospective` | Yes | ## Argument Routing Table | Action | Arguments | Default Behavior | Reference | |--------|-----------|------------------|-----------| | `audit` | `[--fix] [--verbose]` | Full audit with summary report | [audit.md](references/audit.md) | | `backup` | `[--include-history] [--include-sessions]` | Backup essential config only | [backup.md](references/backup.md) | | `cleanup-agents` | `[days] [--dry-run] [--all-projects]` | Remove agent files >7 days, current project | [cleanup-agents.md](references/cleanup-agents.md) | | `cleanup-debug` | `[days] [--dry-run]` | Remove debug files >7 days | [cleanup-debug.md](references/cleanup-debug.md) | | `cleanup-hook-logs` | `[days] [--dry-run]` | Remove hook logs >30 days | [cleanup-hook-logs.md](references/cleanup-hook-logs.md) | | `cleanup-sessions` | `[days] [--dry-run] [--all-projects]` | Remove session files >7 days, current project | [cleanup-sessions.md](references/cleanup-sessions.md) | | `compaction-review` | `[session-id] [--current] [--compare]` | Review most recent compaction | [compaction-review.md](references/compaction-review.md) | | `costs` | `[--days N] [--project] [--breakdown] [--export FILE]` | Summary of recent costs (30 days) | [costs.md](references/costs.md) | | `file-versions` | `<file-path> [--list] [--diff VER] [--restore VER]` | Show version summary for cwd | [file-versions.md](references/file-versions.md) | | `global` | `[--view] [--edit SECTION] [--validate]` | View config summary | [global.md](references/global.md) | | `history` | `<search-term> [--days N] [--stats] [--export FILE] [--clear]` | Show recent history summary | [history.md](references/history.md) | | `mcp` | `[--list] [--export FILE] [--import FILE] [--add NAME] [--remove NAME]` | Show MCP server summary | [mcp.md](references/mcp.md) | | `plans` | `[plan-name] [--list] [--archive] [--cleanup N]` | List recent plans | [plans.md](references/plans.md) | | `prompt-extract` | `[--successful-only] [--category CAT] [--days N] [--export FILE]` | Extract all prompts (30 days) | [prompt-extract.md](references/prompt-extract.md) | | `prune` | `[days] [--dry-run] [--all-projects] [--include-debug] [--include-todos] [--nuclear]` | Comprehensive cleanup >7 days, current project | [prune.md](references/prune.md) | | `reset` | `[--backup] [--restore] [--list-backups]` | Interactive reset wizard | [reset.md](references/reset.md) | | `reset-plugins` | `[--dry-run] [--include-marketplaces] [--force]` | Clear all except marketplaces | [reset-plugins.md](references/reset-plugins.md) | | `restore` | `[backup-name] [--list] [--mcp-only] [--dry-run]` | Interactive selection from backups | [restore.md](references/restore.md) | | `retrospective` | `[session-id] [--current] [--days N]` | Analyze most recent session | [retrospective.md](references/retrospective.md) | | `session-stats` | `[--all-projects]` | Stats for current project | [session-stats.md](references/session-stats.md) | | `status` | (none) | Unified config overview | [status.md](references/status.md) | | `storage` | `[--verbose]` | Storage analysis with recommendations | [storage.md](references/storage.md) | | `transcript-search` | `<query> [--days N] [--project] [--regex] [--context N]` | Search all projects, all time | [transcript-search.md](references/transcript-search.md) | ## Common Argument Patterns These patterns are shared across multiple actions: | Pattern | Used By | Description | |---------|---------|-------------| | `[days]` | cleanup-agents, cleanup-debug, cleanup-sessions, prune | Remove files older than N days (non-negative integer) | | `--dry-run` | cleanup-*, prune, reset-plugins, restore | Preview without making changes | | `--all-projects` | cleanup-agents, cleanup-sessions, prune | Apply to all projects (default: current only) | | `--days N` | costs, history, prompt-extract, transcript-search | Limit time range for analysis | | `--export FILE` | costs, history, mcp, prompt-extract | Export results to file | | `--project` | costs, transcript-search | Limit to current project | ## Safety Classification ### Read-Only Actions (Always Safe) `audit` (without --fix), `compaction-review`, `costs`, `file-versions` (without --restore), `prompt-extract`, `retrospective`, `session-stats`, `status`, `storage`, `transcript-search` ### Destructive Actions (Require Confirmation) All destructive actions MUST use `AskUserQuestion` before deletion. Never delete files without explicit user confirmation. | Action | What Gets Deleted | Reversible? | |--------|-------------------|-------------| | `cleanup-agents` | Agent transcript files (agent-*.jsonl) | No | | `cleanup-debug` | Debug transcript files | No | | `cleanup-hook-logs` | Hook log .jsonl files | No | | `cleanup-sessions` | Session .jsonl files | No | | `prune` | Sessions + agents + statsig + plans + optionally debug/todos/locks | No | | `reset` | User must manually delete ~/.claude/ (skill only prepares backup) | Partially (backup) | | `reset-plugins` | Plugin cache, registry, enabledPlugins setting | Partially (reinstall) | | `history --clear` | Command history entries | No | ### Write Actions (Create/Modify Files) | Action | What Gets Written | |--------|-------------------| | `backup` | Creates backup in ~/.claude-backups/ | | `restore` | Overwrites config files from backup | | `global --edit` | Modifies ~/.claude.json | | `mcp --add/--remove/--import` | Modifies ~/.claude.json mcpServers | | `plans --archive` | Moves plan files to archive/ subdirectory | ## Protected Files (Never Deleted) These files are NEVER touched by any cleanup action: | File | Reason | |------|--------| | `~/.claude/CLAUDE.md` | User instructions | | `~/.claude/settings.json` | User settings | | `~/.claude/settings.local.json` | Local settings | | `~/.claude/.credentials.json` | OAuth tokens (never backup either) | | `~/.claude/history.jsonl` | Command hist
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.