nitpum/agentskills/gitattributes
Claude Code and agent skill by nitpum/agentskills
- community
Checking that the SKILL.md file is still in the repository.
Generates .gitattributes files with sensible defaults for line endings and binary handling. Use when the user asks to create or update a .gitattributes file, wants to enforce LF line endings, needs binary file handling, or mentions gitattributes, line endings, eol, or text normalization.
Install
npx vskill@latest install nitpum/agentskills/gitattributesSKILL.md
The same SKILL.md was published earlier as nitpum/agentskills/gitattributes.
gitattributes Skill
Generate .gitattributes files with proper line ending normalization and binary file handling.
When to Use
- User asks to create or update a
.gitattributesfile - User wants to enforce consistent line endings (LF vs CRLF)
- User mentions gitattributes, line endings, eol, text normalization
- Setting up a new project that needs consistent file handling
Base Configuration
Every .gitattributes file must start with these base rules:
This ensures:
- Git auto-detects text files
- All text files use LF line endings on checkout (consistent across Windows/Linux/macOS)
Workflow
Generating a .gitattributes
- Always include the base rule
* text=auto eol=lfat the top. - Determine which language/framework-specific rules the project needs.
- Add binary file exclusions so Git doesn't corrupt binaries.
- Write the result to
.gitattributesin the project root.
Updating an existing .gitattributes
- Read the existing file.
- Ensure the base rule
* text=auto eol=lfis present (add if missing). - Add any new rules without duplicating existing entries.
Common Binary File Patterns
These should be marked as binary to prevent text normalization:
Language-Specific Patterns
Go
Python
Node.js / JavaScript / TypeScript
Rust
Java / JVM
Shell scripts
Using the Helper Script
No Explanatory Comments in Output
The generated output must not include any explanatory comments. Only output the raw rules. Preserve any existing comments when appending to an existing file.
Gotchas
.gitattributesrules are evaluated top-to-bottom; later rules override earlier ones.- Always place
* text=auto eol=lfat the very top as the catch-all base rule. - Forgetting to mark binaries causes corruption (Git tries to convert line endings in images, etc.).
- After changing
.gitattributes, existing files need re-normalization:git add --renormalize . eol=lfforces LF on checkout regardless of OS; useeol=crlfonly for Windows-specific tooling that requires it..gitattributesmust be committed to the repo to apply to all collaborators.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckinggitattributes/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/nitpum/agentskills/gitattributes)