default-gitignore-files
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Adds a sensible .gitignore file to a project. Use this whenever the user is starting, initializing, or scaffolding a new project (running git init, creating a new repo, setting up a codebase in any language), or explicitly asks for a .gitignore, wants to ignore build artifacts/node_modules/__pycache__/target//.env files, or mentions committing files they didn't mean to commit. Also use it proactively any time you notice a project root has no .gitignore file yet — check for one before your first commit or before creating new source files in a fresh repo, and if a template matches the project's stack, offer to add it. Covers TypeScript/Node, Go, Python, Rust, Ruby, Java, C++, C#, PHP, and Swift out of the box, and can still help (by searching for or drafting one) even for stacks without a bundled template.
- Reads credentials
In this repository12 other files it gives its agents.
- api-conventionsSkill
- csharp-styleSkill
- database-conventionsSkill
- fusion-360-addinSkill
- git-workflowSkill
- godot-game-engineSkill
- logging-conventionsSkill
- npm-registrySkill
- postgres-styleSkill
- python-styleSkill
- typescript-styleSkill
- ui-designSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Check for a .gitignore in the project root whenever:
- Distinctive: line 25
Identify the project's stack: Look for clear signals:
- Very specific: line 62
Read the relevant file(s) directly and write their contents (or the combined/deduped result) to .gitignore at the project root.
- Very specific: line 66
Never overwrite an existing .gitignore without the user's OK.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Default .gitignore Files
Give a project a good .gitignore with minimal friction, using vetted templates for TypeScript/Node, Go, and Python.
Why this matters
A missing or weak .gitignore is how build output, dependency folders (node_modules/), secrets (.env), and editor/OS clutter end up committed to a repo. It's cheapest to fix before the first commit — but it's still worth fixing later, since anything not yet tracked by git will simply start being ignored going forward.
When to act
Check for a .gitignore in the project root whenever:
- The user is initializing a new project or repo (
git init, scaffolding a new app,npm create,go mod init, a fresh Python project, etc.) - The user explicitly asks for a
.gitignoreor mentions wanting to ignore certain files/folders - You're about to make the first commit in a repo and notice there's no
.gitignoreyet - The user mentions accidentally committing something that should have been ignored (e.g.
node_modules,.env,__pycache__, build output)
Workflow
- Check whether a
.gitignorealready exists in the project root. If one exists, don't overwrite it silently — if it looks incomplete for the stack in use, offer to append the missing sections instead of replacing the file. Identify the project's stack. Look for clear signals:
Stack Signals TypeScript / Node.js package.json,tsconfig.jsonGo go.modPython requirements.txt,pyproject.toml,*.pyfilesRust Cargo.tomlRuby Gemfile,*.gemspecJava pom.xml,build.gradle(.kts)C++ CMakeLists.txt,*.cpp/*.hppfilesC# *.csproj,*.slnPHP composer.jsonSwift Package.swift,*.xcodeproj/*.xcworkspaceA project can match more than one (e.g. a Python backend with a TypeScript frontend) — that's fine, combine templates.
- If no
.gitignoreexists and a matching template is available, ask the user before adding it. Don't add files to their project silently. A short confirmation is enough, e.g.: "This looks like a TypeScript project with no .gitignore yet — want me to add one?" Once they confirm, write the template to<project-root>/.gitignore. - If the stack doesn't match a bundled template, say so plainly rather than guessing — offer to search for a well-known template for that stack (e.g. from GitHub's github/gitignore collection) or draft a reasonable one based on what's in the project directory.
- If the stack combines multiple bundled templates (e.g. Python + TypeScript monorepo), concatenate the relevant templates with a comment header separating each section, and dedupe obviously repeated lines (like
.env,.DS_Store).
Templates
Bundled templates live in templates/:
| Stack | File |
| TypeScript / Node.js | templates/typescript.gitignore |
| Go | templates/go.gitignore |
| Python | templates/python.gitignore |
| Rust | templates/rust.gitignore |
| Ruby | templates/ruby.gitignore |
| Java | templates/java.gitignore |
| C++ | templates/cpp.gitignore |
| C# | templates/csharp.gitignore |
| PHP | templates/php.gitignore |
| Swift | templates/swift.gitignore |
Read the relevant file(s) directly and write their contents (or the combined/deduped result) to .gitignore at the project root. Don't paraphrase or retype them from memory — copy them as-is so nothing is missed.
Notes
- Never overwrite an existing
.gitignorewithout the user's OK. - If you add or extend a
.gitignorefor a repo that already has commits, remind the user that a.gitignoreonly affects untracked files — anything already committed (e.g.node_modules/that snuck in before) needs to be removed withgit rm -r --cached <path>separately. Offer to do that too, but don't run it without confirmation.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

