Version Controlling Global Configuration
Use when user asks about version controlling ~/.claude directory or syncing Claude Code settings across machines. Provides git setup instructions and .gitignore patterns to track only portable settings while excluding logs, session data, and machine-specific plugin metadata. Invoke before initializing git in ~/.claude to prevent committing non-portable data.
What this skill does
# Version Controlling Claude Code Global Configuration Use this skill when users want to version control their `~/.claude` directory to sync settings across machines. ## Critical Understanding The `~/.claude` directory contains both portable settings and machine-specific data. **Not everything should be version controlled.** ### Safe to Version Control - `CLAUDE.md` - Global instructions - `settings.json` - User preferences (only contains enabled plugin names) - Documentation files you create (README, PLUGINS.md) ### NEVER Version Control - `plugins/installed_plugins.json` - Contains absolute paths and timestamps - `plugins/known_marketplaces.json` - Contains absolute paths and timestamps - `plugins/config.json` - Machine-specific configuration - `plugins/marketplaces/` and `plugins/repos/` - Downloaded plugin data - `debug/`, `file-history/`, `history.jsonl` - Logs and session data (may contain sensitive info) - `projects/`, `session-env/`, `shell-snapshots/`, `todos/` - Session-specific cache - `statsig/` - Analytics cache ## Why Plugin Metadata Shouldn't Be Versioned The plugin metadata files contain: 1. **Absolute paths** specific to each machine (e.g., `/Users/username/...`) 2. **Timestamps** that cause unnecessary merge conflicts 3. **Git commit SHAs** from local repositories These files are **automatically regenerated** by Claude Code when plugins are installed. You don't need to preserve them. ## Standard .gitignore Template ```gitignore # Session data and logs debug/ file-history/ history.jsonl session-env/ shell-snapshots/ todos/ # Project-specific cache projects/ # Analytics and telemetry statsig/ # Plugin metadata (machine-specific paths and timestamps) plugins/installed_plugins.json plugins/known_marketplaces.json plugins/config.json plugins/marketplaces/ plugins/repos/ # Any log files *.log # Temporary files *.tmp *.swp *~ # OS-specific files .DS_Store Thumbs.db ``` ## Recommended Workflow ### Initial Setup 1. Examine the `~/.claude` directory to understand what's there 2. Create `.gitignore` with the template above 3. Create `PLUGINS.md` to document which plugins to install: ```markdown # Installed Plugins ## Marketplaces - **marketplace-name**: `https://github.com/user/repo` ## Plugins From `marketplace-name`: - `plugin-name` - Brief description ## Installation on New Machine 1. Clone/install marketplaces listed above 2. Use Claude Code to install plugins 3. Copy `settings.json` and `CLAUDE.md` from this repo ``` 4. Create `README.md` explaining what the repo contains and setup process 5. Initialize git: `git init` 6. Verify with `git status` - should only show safe files 7. Commit the initial setup ### Cross-Machine Sync On a new machine: 1. Clone the config repo to `~/.claude` 2. Manually install marketplaces and plugins per `PLUGINS.md` 3. Claude Code will regenerate all machine-specific metadata automatically ## Validation Steps After creating `.gitignore`: 1. Run `git status` to see what will be tracked 2. Verify NO plugin metadata files appear 3. Verify NO log or session files appear 4. Should only see: `.gitignore`, `CLAUDE.md`, `settings.json`, and any docs you created If plugin metadata appears in `git status`, the `.gitignore` is incorrect. ## Common Mistakes to Avoid - **Don't** version control the entire `plugins/` directory - **Don't** try to preserve absolute paths across machines - **Don't** commit `history.jsonl` (contains conversation history, potentially sensitive) - **Don't** assume plugin metadata needs to be preserved ## When to Use This Skill Trigger this skill when users: - Ask about version controlling `~/.claude` - Want to sync Claude settings across machines - Ask what's safe to commit from their Claude directory - Question whether plugin files should be in git
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.