chore: ignore all of .claude and .agents except skills#1185
Merged
Conversation
Replace the single .claude/settings.local.json ignore with a broad ignore-all-except-skills policy so only the shared skills (and the .agents symlink) are tracked, while everything else under .claude/ and .agents/ stays local. Uses /* + negation so git still descends into the dirs and honors the re-include. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of changes
Follow-up to the skill-sharing change. The
.gitignoreonly kept.claude/settings.local.jsonout of git, leaving the rest of.claude/(and all of.agents/) tracked. This switches to an ignore-everything-except-skills policy: only.claude/skills/and the.agents/skillssymlink are tracked; anything else either tool writes under those dirs stays local.The pattern matters —
.claude/(trailing slash) excludes the directory itself so git never descends and a negation can't re-include anything. Using/*excludes only the contents, so!.claude/skillsre-includes the folder. The.agents/skillsnegation has no trailing slash because it's a symlink, not a real directory.Verified with
git check-ignore: the skill + symlink stay tracked, any other path under.claude//.agents/is ignored.Docs
No docs impact — tooling/config only.