
repo-attributes
Configure .gitattributes, .editorconfig, .gitignore, and Git LFS filters for a repository: normalize line endings, mark generated, vendored, and documentation paths for GitHub linguist, set per-language editor defaults, and merge .gitignore content from GitHub templates. Use when the user says "add .gitattributes", "fix line endings", "CRLF", "linguist", "mark generated files", "set up .editorconfig", "gitignore template", "git lfs", or invokes /repo-attributes. Do NOT use for prek or pre-commit hook configuration — use /prek. GitHub custom properties (organization-level metadata) are out of scope; this skill only touches per-repository attribute, editor, and ignore files. Community health files (README, LICENSE, CODEOFCONDUCT, CONTRIBUTING, SECURITY) belong to /oss-hygiene, not this skill.
- Installs
- 53
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/paulnsorensen/git-gouda --skill repo-attributes- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads repo-attributes automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
repo-attributes
Configures the file-level attribute layer of a repository: .gitattributes, .editorconfig, .gitignore, and Git LFS filter patterns.
This is repository-only configuration. It does not touch pre-commit hooks, CI pipelines, org-level custom properties, or community health files.
Where this skill fits
| Concern | Skill |
|---|---|
| Line endings, linguist overrides, editor defaults, ignore rules, LFS patterns | /repo-attributes (this skill) |
Pre-commit / prek hook selection and prek.toml | /prek |
| Community health files (README, LICENSE, CODE_OF_CONDUCT, CONTRIBUTING, SECURITY) | /oss-hygiene |
| Org-wide settings as code, including custom properties | /safe-settings |
Protocol
1. Detect language markers and existing config
Scan the repo root for language markers, reusing the same detection approach as /prek:
| Marker file | Language/Framework |
|---|---|
Cargo.toml | Rust |
pyproject.toml, setup.py, requirements.txt | Python |
package.json | TypeScript/JavaScript |
go.mod | Go |
Gemfile | Ruby |
*.sh, zsh/, bin/ | Shell |
Dockerfile | Docker |
Multiple markers mean a polyglot project. Cover every detected language in the generated files.
Check for existing .gitattributes, .editorconfig, .gitignore, and .gitmodules. Read each file present and treat its content as a floor, not a target for replacement.
Check for Git LFS usage:
git lfs ls-files
When git lfs is not installed, skip LFS detection and say so; do not guess at LFS-tracked paths.
2. Propose .gitattributes
Use assets/gitattributes.example as the starting shape. Include, based on step 1 detection:
* text=auto— let Git normalize line endings for text files it detects.- Explicit
eol=lffor scripts and other files that must never gain CRLF, for example*.sh text eol=lf. - Binary markers for asset types that must skip line-ending and diff conversion, for example
*.png binary. linguist-generated,linguist-vendored, andlinguist-documentationfor paths that should not count toward the GitHub language bar or code review diffs.merge=unionfor append-only files such asCHANGELOG.md, so parallel entries merge instead of conflicting.export-ignorefor paths that should not ship ingit archiveoutput, for example CI-only directories.diff=drivers for file types with a more useful semantic diff (for example*.md diff=markdown, when the driver is already configured).- LFS patterns (
filter=lfs diff=lfs merge=lfs -text) for any path already tracked bygit lfs ls-files, or ones the user names.
Diff the proposal against any existing .gitattributes and ask before overwriting a line that already exists with different content.
3. Propose .editorconfig
Use assets/editorconfig.example. Include root = true, a [*] section with charset, end_of_line, insert_final_newline, trim_trailing_whitespace, indent_style, and indent_size, then one override section per detected language for its idiomatic indent style (for example tabs for Go and Makefiles, four-space indents for Python).
4. Propose .gitignore
Fetch the templates GitHub ships for the detected languages:
gh api /gitignore/templates
gh api /gitignore/templates/{name} --jq .source
Merge the fetched template content with any existing .gitignore. Append missing template lines; never remove an existing user entry, even one that looks redundant.
5. Renormalize line endings (only when authorized)
When .gitattributes changes alter how tracked files should be stored, git add --renormalize . rewrites tracked file content to match the new rules. This is a destructive rewrite of tracked content, so:
- Require a clean working tree first:
git status --porcelainmust print nothing. - Require explicit user authorization before running the command. Never renormalize as a side effect of proposing
.gitattributes. - If the tree is dirty, stop and ask the user to commit or stash before renormalizing.
6. Verify
git check-attr -a <file>
git ls-files --eol
gh api repos/{owner}/{repo}/languages
Use git check-attr -a <file> to confirm the attributes applied match the proposal. Use git ls-files --eol to confirm working-tree and index line endings agree with .gitattributes. Use the GitHub languages API call to confirm linguist overrides changed the reported language mix, after the change reaches GitHub.
What this skill is NOT for
- Pre-commit or prek hook selection — that's
/prek. - GitHub custom properties or other organization-level metadata — out of scope for this skill.
- Community health files (README, LICENSE, CODE_OF_CONDUCT, CONTRIBUTING, SECURITY) — that's
/oss-hygiene. - CI pipeline configuration — not a repo-attributes concern.
Gotchas
* text=autoalone does not force LF for scripts on a contributor's Windows checkout; pair it with an expliciteol=lfrule for files that must not gain CRLF.linguist-generatedandlinguist-vendoredchange the GitHub language bar and default PR diff collapsing, not localgit diffoutput.git add --renormalize .only rewrites the index and working tree; it does not rewrite history. Existing clones still show the old line endings until they pull and re-run it themselves.- LFS filter patterns without
git lfs installrun locally have no effect; confirm LFS is installed before proposing filter patterns as the fix for a large-file problem. .gitignoreonly affects untracked files. A path already tracked keeps being tracked until it is explicitly removed withgit rm --cached.
References
references/attributes.md— cited sources for.gitattributes, linguist overrides,.editorconfig, line-ending configuration,.gitignore, and Git LFS.
FAQ
What does the repo-attributes skill do?
Configure .gitattributes, .editorconfig, .gitignore, and Git LFS filters for a repository: normalize line endings, mark generated, vendored, and documentation paths for GitHub linguist, set per-language editor defaults, and merge .gitignore content from GitHub templates. Use when the user says "add .gitattributes", "fix line endings", "CRLF", "linguist", "mark generated files", "set up .editorconfig", "gitignore template", "git lfs", or invokes /repo-attributes. Do NOT use for prek or pre-commit hook configuration — use /prek. GitHub custom properties (organization-level metadata) are out of scope; this skill only touches per-repository attribute, editor, and ignore files. Community health files (README, LICENSE, CODEOFCONDUCT, CONTRIBUTING, SECURITY) belong to /oss-hygiene, not this skill.
How do I install repo-attributes?
Run npx skills add https://github.com/paulnsorensen/git-gouda --skill repo-attributes in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/repo-attributes/ (personal) or .claude/skills/repo-attributes/ (project).
Which AI agents can use repo-attributes?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is repo-attributes safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains repo-attributes?
It is published by paulnsorensen in paulnsorensen/git-gouda. It has 53 recorded installs.
More from paulnsorensen/git-gouda
safe-settings
paulnsorensen/git-gouda
Set up GitHub's safe-settings (a Probot-based GitHub App from the github org) for declarative, org-wide repository policy as code. Use when the user says "settings as code", "safe-settings", "manage repos declaratively", "centralize repo settings", "org-level branch protection", "scaffold an admin repo", "github settings app", or invokes /safe-settings on an org that wants to manage repo settings, branch protection, rulesets, labels, teams, environments, and collaborators from one admin repo. Scaffolds the admin-repo layout (settings.yml + suborgs/ + repos/), the GitHub App installation steps, and a scheduled full-sync GitHub Actions workflow. Distinct from /gh-bootstrap (one-shot gh api config of a single repo) — this skill is for org-scale settings as code that reconciles continuously. Not for per-task GitHub ops (PRs, issues, CI status) or local git work — those are out of this catalog's scope.
config-review-bot
paulnsorensen/git-gouda
Audit or configure CodeRabbit repository review policy from effective sources. Use for CodeRabbit setup, configuration review, path coverage, or a specific pull-request review audit. Trigger on "configure CodeRabbit", "review .coderabbit.yaml", "set up CodeRabbit", "audit CodeRabbit settings", or "is CodeRabbit covering X". Keep audits read-only by default and separate schema validity, rule quality, and completed-review evidence. Do not use it to run a CodeRabbit CLI review or autofix, or to fix review comments on a pull request.
oss-hygiene
paulnsorensen/git-gouda
Bring an open-source GitHub repository up to community-standards and supply-chain hygiene baseline: scaffold the GitHub Community Standards files (README check, LICENSE, CODEOFCONDUCT, CONTRIBUTING, SECURITY, issue + PR templates), wire Dependabot version updates, the Dependency Review action, OpenSSF Scorecard, and CodeQL (when applicable), check Dependabot alerts and secret scanning, and add the OpenSSF Best Practices Badge link. Use when the user says "set up OSS hygiene", "make this repo open-source-ready", "add community health files", "wire dependabot", "add scorecard", "OSSF badge", "supply chain hardening", or invokes /oss-hygiene on a public repo. Idempotent — safe to re-run; diffs against templates and asks before overwriting. Distinct from /gh-bootstrap (merge-button + branch protection) and /safe-settings (org-scale settings as code): focuses on the contributor-facing and supply-chain surface, not merge or org policy. Run after /gh-bootstrap; before announcing the repo.
prek
paulnsorensen/git-gouda
Onboard prek (Rust-powered pre-commit) into any project and suggest hooks tailored to the language/framework. Use when the user says "add prek", "set up pre-commit hooks", "configure prek", "what hooks should I use", or when you notice a project without a prek.toml that would benefit from pre-commit checks. Also trigger when the user wants to add new hooks to an existing prek.toml, audit their hook config, or migrate from pre-commit to prek. Covers Rust, Python, TypeScript/JavaScript, Go, Ruby, and Shell projects. Do NOT use for husky, lint-staged, or CI pipeline hook configuration — this skill is specifically for prek.
gh-bootstrap
paulnsorensen/git-gouda
One-time GitHub repository configuration via the gh CLI: lock the default branch with PR and CI rules, optionally enable a supported merge queue, lock merging to squash-only with PR-title commit messages, scaffold automatically-generated release notes (.github/release.yml), and optionally add a tag-driven release workflow. Use when the user says "set up the repo", "configure the merge queue", "enable squash merging", "lock down main", "set up branch protection", "configure release notes", "scaffold releases", "set up release tagging", or invokes /gh-bootstrap on a fresh or loosely-configured GitHub repository. Idempotent — safe to re-run on already-configured repos to bring missing pieces in line. This skill covers one-time repo policy, not per-task GitHub operations, local git commands, or project task running.
github-copilot-repo-instructions
paulnsorensen/git-gouda
Add, audit, or fix GitHub Copilot repository custom instructions — .github/copilot-instructions.md (repo-wide) and .github/instructions/.instructions.md (path-specific) — so Copilot Chat, Copilot code review, and the Copilot coding agent all pick up project-wide guidance. Also covers AGENTS.md, CLAUDE.md, and GEMINI.md as alternate agent instruction files. Use when the user says "add Copilot instructions", "set up copilot-instructions.md", "audit our Copilot config", "make Copilot follow our conventions", "configure Copilot code review", "add path-specific Copilot rules", "applyTo glob", "excludeAgent", "Copilot is ignoring our guidance", or invokes /github-copilot-repo-instructions. Do NOT use for personal (per-user) Copilot instructions; those are out of scope for this skill. For AGENTS.md authoring guidance beyond file layout, see the agents-md skill.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.