skills/gitattributes-manager/SKILL.md
Create, review, and safely update `.gitattributes` files with conservative Unix-first defaults and explicit attribute rationale.
npx skillsauth add abuxton/skills gitattributes-managerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
.gitattributes ManagerCreate or maintain .gitattributes files with safe, research-backed defaults for Unix-like development. This skill focuses on line-ending normalization, obvious binary handling, and precise attribute changes without trampling repository-specific rules.
You are an expert in Git attributes, cross-platform text normalization, and repository hygiene. You understand how Git resolves matching rules, when to prefer .gitattributes versus .git/info/attributes, and how to apply text, -text, eol, binary, and custom attributes conservatively.
!attr only when a path must stop inheriting a broader attribute without deleting shared defaults| Reference | When to Load |
| --------- | ------------ |
| references/defaults.md | Before creating a new .gitattributes file or heavily revising an existing one |
Discover repository context — Check whether .gitattributes already exists, inspect representative file types in the repository, and note platform signals such as shell scripts, Windows scripts, binary assets, generated files, archives, and any existing custom diff or merge filters. If the requirement is local-only and should not be version-controlled, prefer .git/info/attributes instead of .gitattributes.
Respect Git attribute semantics — Remember that later matching lines override earlier ones per attribute, negative patterns are not allowed, and directory patterns do not recurse unless written as dir/**. When removing behavior inherited from a broader rule, prefer the narrowest safe change: edit a specific rule, delete a redundant rule, or use !attr to reset an attribute to Unspecified.
Establish conservative defaults — For a new Unix-first repository, start from the baseline in references/defaults.md. Keep the baseline intentionally small:
* text=autoeol=lf on Unix-executed scripts and core text/config formats that should stay LFeol=crlf only for Windows-native scripts such as .bat, .cmd, and .ps1binaryAdd attributes safely — Before adding a rule, check whether an existing broader or narrower rule already covers the paths. Use the smallest pattern that matches the intended files, place the new rule near related rules, and preserve precedence. Explain the effect of text, -text, eol=<lf|crlf>, binary, or any custom attribute before applying it.
Remove or override attributes safely — When asked to remove an attribute:
!attr or a more specific counter-rule when a path must stop inheriting a broader attributeDocument the rationale — For each meaningful rule group, explain why it exists in terms of line-ending normalization, binary safety, diff behavior, or repository hygiene. When a plausible rule is intentionally omitted, say so instead of inventing speculative defaults.
Validate the result — Review ordering, pattern specificity, and override behavior. When Git is available, validate representative files with git check-attr -a -- <path>. If line-ending normalization is introduced to an existing repository, note that git add --renormalize . may be required and advise reviewing the resulting diff before committing.
.gitattributes patterns are similar to .gitignore, but negative patterns are forbidden.binary is a practical shorthand for disabling text and diff treatment on obvious binary assets.working-tree-encoding unless the repository explicitly needs it and all participating Git clients support it.export-ignore rules unless the repository's files justify them.development
Fetch a matching XKCD comic and generate validated Markdown or HTML embed output for docs or terminal use.
testing
Author high-quality agent skills following the agentskills.io specification, with correct frontmatter, workflow structure, and reference assets.
tools
Analyse a repository to identify its focus, technology stack, and labels, then search for and apply appropriate shields.io badges to markdown files.
data-ai
Prepare and publish an npm package that ships agent skills, following the skills-npm convention for skill bundling and distribution.