# Generate Gitignore

> Create or update .gitignore files by fetching standard templates from the GitHub/gitignore repository. Use when this capability is needed.

- Skill: `tomevault-io/generate-gitignore` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/generate-gitignore`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/generate-gitignore/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/generate-gitignore

---


# SKILL-015: Generate .gitignore

## Overview

Ensures the workspace has a proper `.gitignore` file by fetching industry-standard templates (e.g., Python, Node, VisualStudio, macOS) and merging them. Prevents binary artifacts and secrets from being committed.

## Trigger Phrases

- `create gitignore`
- `update gitignore`
- `ignore build files`
- `add python to gitignore`

## Inputs

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `--workspace-path` | string | No | Current directory | Root to check |
| `--templates` | string[] | Yes | - | List of templates (e.g. `Python`, `Node`, `VisualStudio`) |
| `--append` | switch | No | false | If file exists, append instead of overwrite |

## Outputs

### 1. .gitignore

The resulting ignore file at the workspace root.

## Implementation

### Script: generate_gitignore.ps1

1. Validates input templates against GitHub/gitignore API or raw URLs.
2. Fetches content for each requested template.
3. Merges them.
4. Writes to `.gitignore`.

## Use Cases

1. **New Project:** Setting up a fresh repo for a combined C#/React project (`VisualStudio` + `Node`).
2. **Maintenance:** Realizing your Python project is committing `__pycache__` and fixing it instantly.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/sounder25) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

