- Home
- Skills
- DevOps & Cloud
- gitignore-generator
More screenshots
Works with the AI Agents you already use
Gitignore Generator
Generate, audit and validate .gitignore files for your stack, and catch tracked .env and secret files before they reach your repository history.
Free
gitignore-generator
Example session with this skill installed
"Generate a .gitignore for this project. It's a Next.js app with a Python backend."
- Read your context and instructions
- Compiled the gitignore-generator
Project Detection
Stacks found: Node.js (package.json), Python (requirements.txt), Docker
Sensitive files found: .env (tracked!), .env.local (tracked!)
CRITICAL: 2 sensitive files are git-tracked
git ls-files .env .env.local → Both tracked ⚠️
Remediation
git rm --cached .env .env.local
echo ".env" >> .gitignore
echo ".env.local" >> .gitignore
git commit -m "chore: untrack sensitive env files"
Generated .gitignore (87 lines)
[Sections: Secrets | OS | Editor | Logs | Python | Node.js | Docker]
Key patterns included:
.env* ← catches .env, .env.local, .env.production
*.pem, *.key ← certificates and private keys
pycache/, *.pyc ← Python bytecode
node_modules/ ← npm dependencies
.next/ ← Next.js build output
.DS_Store ← macOS junk
.vscode/, .idea/ ← IDE configs
*.log ← log files
Connects securely to your tools. The creator never sees your data.
About this skill
The Problem
A developer joins the team, clones the repo, runs npm install, and pushes. Their .env file with database passwords gets committed because the root .gitignore was created from a Python template and doesn't include Node.js patterns. Three months later, someone runs git log --all --diff-filter=A -- "*.env" and finds 14 .env files in the history — each containing different credentials that were supposed to be secret.
Or the repo has 50MB of node_modules/ in git history because .gitignore was added after the files were already tracked (.gitignore only affects untracked files). Or a developer's .vscode/settings.json with personal paths and preferences gets committed, causing conflicts on every machine. Or __pycache__/ directories litter the repo because someone added Python files from a Windows machine where the pyc patterns weren't caught.
Every one of these is a .gitignore gap that a proper generator would have caught.
What You Get
- Automatic stack detection — scans for
package.json,requirements.txt,Cargo.toml,go.mod,pom.xml,build.gradle,Gemfile,composer.json,*.csproj,CMakeLists.txt,Dockerfile, and framework-specific indicators (Next.js, Django, Flask, Terraform) - Sensitive file scan — finds
.env,.env.*,*.pem,*.key,*.p12,secrets.*,id_rsa,*.token,.npmrc,.pypircand checks if they're git-tracked - Seven-section generated .gitignore — Secrets/Sensitive (universal), OS Generated Files, Editor/IDE, Logs, Dependency Directories, then stack-specific sections for Python, Node.js, Java, Go, Rust, Docker, Terraform, and Ruby
- Existing file audit — checks for tracked files that should be ignored (
git ls-files | grep), missing common patterns, duplicate entries, and syntax errors (broken negations, incorrect**usage, missing trailing slashes) - Already-tracked remediation — provides
git rm --cachedcommands to untrack files without deleting them, andgit filter-repoinstructions for secrets already in history - Monorepo awareness — handles combined patterns for multiple stacks in a single repo without ignoring files needed by one subproject but not another
Why This Beats Prompting It Yourself
Copy-pasting from gitignore.io gives you a template — it doesn't check whether your .env is already tracked, whether your existing file has gaps, or whether you're in a monorepo where a root-level pattern might accidentally ignore files in a subproject. The generator detects your actual stack, scans for sensitive files that are already committed (the most urgent finding), and produces a file organized by category with a date header so future developers know when it was last reviewed.
Example Session
You: "Generate a .gitignore for this project. It's a Next.js app with a Python backend."
Agent:
Stacks found: Node.js (package.json), Python (requirements.txt), Docker
Sensitive files found: .env (tracked!), .env.local (tracked!)
git ls-files .env .env.local → Both tracked ⚠️
Remediation:
git rm --cached .env .env.local
echo ".env" >> .gitignore
echo ".env.local" >> .gitignore
git commit -m "chore: untrack sensitive env files"
[Sections: Secrets | OS | Editor | Logs | Python | Node.js | Docker]
.env* ← catches .env, .env.local, .env.production
*.pem, *.key ← certificates and private keys
__pycache__/, *.pyc ← Python bytecode
node_modules/ ← npm dependencies
.next/ ← Next.js build output
.DS_Store ← macOS junk
.vscode/, .idea/ ← IDE configs
*.log ← log files
Use Cases
- New repository initialization — create a comprehensive .gitignore from the start before any sensitive files are committed
- Existing repo audit — scan for tracked files that should be ignored and gaps in coverage
- Secret exposure response — after accidentally committing
.env, generate the right patterns and provide cleanup commands - Monorepo setup — generate combined patterns for multi-stack repositories without pattern conflicts
- Framework migration — update patterns when switching from one framework/stack to another (e.g., adding Python backend to a Node.js frontend)
Known Limitations
The generator creates patterns based on common conventions for each stack — custom or unusual project structures may need manual additions. Already-committed files in git history require git filter-repo or BFG to fully remove, not just git rm --cached. The tool generates the .gitignore file but does not automatically run the remediation commands — the user reviews and executes them.
The generator creates patterns based on common conventions for each stack — custom or unusual project structures may need manual additions. Already-committed files in git history require git filter-repo or BFG to fully remove, not just git rm --cached. The tool generates the .gitignore file but does not automatically run the remediation commands — the user reviews and executes them.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
7 uses
Times used to date
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 months ago
- Free with an Agensi account
Requires