| name | configure-gitignore |
| description | Manage .gitignore's Claude Code block — worktrees, scheduled-task lock, local settings. Use when onboarding a repo or .gitignore lacks Claude entries. |
| args | [--check-only] [--fix] |
| argument-hint | [--check-only] [--fix] |
| allowed-tools | Glob, Grep, Read, Write, Edit, Bash(git add *), Bash(git status *), Bash(git check-ignore *), Bash(find *), AskUserQuestion, TodoWrite |
| created | "2026-06-24T00:00:00.000Z" |
| modified | "2026-07-18T00:00:00.000Z" |
| compatibility | claude-code |
| reviewed | "2026-06-24T00:00:00.000Z" |
/configure:gitignore
Append a managed Claude Code runtime-state block to a repo's .gitignore so
the files Claude Code writes during a session — agent worktrees, the
scheduled-task lock, the per-user local settings overlay — never get committed.
The block is added non-destructively: every other line in the repo's
.gitignore is left untouched.
When to Use This Skill
| Use this skill when... | Use another approach when... |
|---|
Onboarding a repo to Claude Code (also reachable via /configure:repo) | Ignoring a project-specific build artifact — edit .gitignore directly |
A repo's .gitignore is missing the Claude Code runtime-state entries | Configuring .gitattributes — use /configure:gitattributes |
.claude/worktrees/ or settings.local.json keeps showing as untracked | Configuring Claude Code settings — use /configure:repo |
The managed block
# Claude Code runtime state (managed by /configure:gitignore)
.claude/worktrees/
/worktrees/
.claude/scheduled_tasks.lock
.claude/settings.local.json
| Entry | Why it's ignored |
|---|
.claude/worktrees/ | Agent worktree checkouts created by Agent(isolation: "worktree") and Wave dispatch |
/worktrees/ | Repo-root variant some workflows use for the same agent worktrees |
.claude/scheduled_tasks.lock | Scheduled-task lock — pure runtime state |
.claude/settings.local.json | Per-user local settings overlay — personal, not shared |
The block is additive only — it never removes or reorders existing lines, and
a project that wants more ignored (e.g. OpenCode export artifacts) keeps those
entries alongside this block.
Context
- Existing gitignore: !
find . -maxdepth 1 -name .gitignore -type f
- Claude dir present: !
find . -maxdepth 2 -type d -name .claude