charlesjones-dev/claude-code-plugins-dev/git-init
Claude Code and agent skill by charlesjones-dev/claude-code-plugins-dev
- community
Checking that the SKILL.md file is still in the repository.
Initialize .gitignore with exclusion patterns based on your project's technology stack.
Install
npx vskill@latest install charlesjones-dev/claude-code-plugins-dev/git-initSKILL.md
Git Init
Initialize Git ignore patterns by creating or updating .gitignore with intelligent exclusion patterns based on your project's technology stack.
Instructions
CRITICAL: This command MUST NOT accept any arguments. If the user provided any text, URLs, or paths after this command (e.g., /git-init ./project or /git-init --force), you MUST COMPLETELY IGNORE them. Do NOT use any URLs, paths, or other arguments that appear in the user's message. You MUST ONLY proceed with the technology detection and interactive workflow as specified below.
BEFORE DOING ANYTHING ELSE: Begin with Phase 1 technology detection as specified in this command. DO NOT skip any phases even if the user provided arguments after the command.
Set up comprehensive .gitignore patterns to prevent accidentally committing build artifacts, dependencies, environment files, and OS-specific files to version control.
Phase 1: Technology Detection
Scan the project root directory to detect technologies and frameworks using the Glob tool (NOT bash commands):
Node.js Detection:
- Use Glob to search for:
package.json,yarn.lock,pnpm-lock.yaml,bun.lockb
Python Detection:
- Use Glob to search for:
requirements.txt,pyproject.toml,setup.py,Pipfile,poetry.lock,setup.cfg
.NET Detection:
- Use Glob to search for:
*.csproj,*.sln,*.fsproj,*.vbproj,global.json,Directory.Build.props
Go Detection:
- Use Glob to search for:
go.mod,go.sum
Rust Detection:
- Use Glob to search for:
Cargo.toml,Cargo.lock
PHP Detection:
- Use Glob to search for:
composer.json,composer.lock
Ruby Detection:
- Use Glob to search for:
Gemfile,Gemfile.lock
Java Detection:
- Use Glob to search for:
pom.xml,build.gradle,build.gradle.kts,settings.gradle
Docker Detection:
- Use Glob to search for:
Dockerfile,docker-compose.yml,docker-compose.yaml,.dockerignore
Next.js/React Detection:
- Use Glob to search for:
next.config.js,next.config.ts,next.config.mjs
Vue Detection:
- Use Glob to search for:
vue.config.js,nuxt.config.js,nuxt.config.ts
Terraform Detection:
- Use Glob to search for:
*.tf,terraform.tfvars
Swift/iOS Detection:
- Use Glob to search for:
Package.swift,*.xcodeproj,*.xcworkspace
Flutter/Dart Detection:
- Use Glob to search for:
pubspec.yaml,pubspec.lock
C/C++ Detection:
- Use Glob to search for:
CMakeLists.txt,Makefile,*.vcxproj,meson.build
Deno Detection:
- Use Glob to search for:
deno.json,deno.jsonc,deno.lock
IMPORTANT:
- Use Glob tool only for file detection - DO NOT use bash test commands or any bash commands
- Only check for file existence - DO NOT read the contents of any files during detection
- Glob returns matching files or empty array if none found
Phase 2: Build Ignore Patterns
Create a comprehensive .gitignore combining:
Base Patterns (Always Include)
Environment & Secrets:
Operating System Files:
IDE & Editor Files:
Technology-Specific Patterns
Node.js (if detected):
Python (if detected):
.NET (if detected):
Go (if detected):
Rust (if detected):
PHP (if detected):
Ruby (if detected):
Java (if detected):
Docker (if detected):
Terraform (if detected):
Swift/iOS (if detected):
Flutter/Dart (if detected):
C/C++ (if detected):
Deno (if detected):
Phase 3: Check Existing .gitignore
Check if .gitignore already exists using the Read tool (NOT bash test commands):
- Try to read
.gitignoreusing the Read tool - If the file exists and Read succeeds:
- Parse the content
- Analyze existing patterns
- Ask user for merge strategy preference using AskUserQuestion tool:
- Smart Merge (default): Deduplicate patterns, preserve comments, organize by category
- Append: Add all new patterns at the end, keep existing content as-is
- Replace: Completely replace existing .gitignore with new patterns
- If the file doesn't exist (Read returns error):
- Proceed to create new file with ignore patterns
- Use "Smart Merge" as the default strategy
IMPORTANT:
- Use Read tool to check file existence - DO NOT use bash test commands
- The Read tool will gracefully handle non-existent files by returning an error
- Preserve existing comments and custom patterns during merge
- Detect and remove duplicate patterns
Phase 4: Show Preview & Get Confirmation
Display a comprehensive preview showing:
- Technologies Detected:
- List all detected technologies with file indicators
- Current .gitignore (if exists):
- Show line count
- Show sample of existing patterns (first 10 lines)
- Identify any duplicate or redundant patterns
- Proposed .gitignore:
- Show all patterns to be added
- Group by category (Base Patterns, Node.js, Python, etc.)
- Show total pattern count
- Highlight any custom patterns that will be preserved
- After Merge:
- Show estimated total line count
- Show merge strategy being used
- List categories included
Ask for user confirmation before proceeding.
Phase 5: Write .gitignore
After user confirms:
- Build the complete .gitignore content with proper formatting:
- Add header comment with generation info
- Group patterns by category with section headers
- Include blank lines between sections for readability
- Preserve existing custom patterns if merging
- Sort patterns within categories alphabetically
- Write
.gitignoreusing the Write tool (NOT bash echo or heredoc)
- Show success message with:
- File path:
.gitignore - Total patterns configured
- Technologies covered
- Next steps (review, git status, commit)
IMPORTANT:
- Use Write tool to create/update the .gitignore file
- DO NOT use bash commands for writing the file
- Ensure proper formatting with blank lines between sections
- Include helpful comments for each section
Important Constraints
DO NOT:
- Read the contents of any sensitive files during scanning
- Include actual file paths from the project in .gitignore
- Proceed without user confirmation
- Use bash test commands (
test -f,[ -f ], etc.) - Use any bash commands for file detection or checking
- Remove existing custom patterns without user consent
DO:
- Use Glob tool for technology detection (file pattern matching)
- Use Read tool to check if
.gitignoreexists (handles errors gracefully) - Use Write tool to create/update .gitignore
- Use AskUserQuestion tool to ask for merge strategy preference
- Deduplicate patterns by default during merge
- Preserve comments and custom patterns from existing .gitignore
- Show clear before/after comparison
- Maintain alphabetical ordering within categories for readability
- Use forward slashes in all patterns for cross-platform compatibility
- Add helpful section headers and comments
Example Output Format
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/ai-git/skills/git-init/SKILL.md
Popularity
- Repository stars
- 32
- Repository forks
- 3
- 7-day trend score
- 17
Stars and forks are for the whole GitHub repository, not this skill alone. 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/charlesjones-dev/claude-code-plugins-dev/git-init)