Back to skills
SKILL.md
Generate Gitignore
ASecurityGenerate `.gitignore` content from GitHub's official templates with `gh repo gitignore view <template>` instead of hand-writing it, and record the command used in a comment. Use when creating a `.gitignore` or adding ignore patterns for a language or toolchain to an existing one.
- 3 stars
- 0 votes
- 0 copies
- 1 view
- Added December 2, 2026
Security analysis
100/100npx -y skills add ncaq/konoka --skill generate-gitignore --agent claude-codeAre you the author of Generate Gitignore?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ncaq-generate-gitignore)---
name: generate-gitignore
description: Generate `.gitignore` content from GitHub's official templates with `gh repo gitignore view <template>` instead of hand-writing it, and record the command used in a comment. Use when creating a `.gitignore` or adding ignore patterns for a language or toolchain to an existing one.
user-invocable: false
---
# `.gitignore`はテンプレートから生成する
`.gitignore`に言語やツールチェーンの項目を入れるときは、手で書かずに、
`gh repo gitignore view <テンプレート名>`でGitHubの公式のテンプレートを生成して、
その出力を元にしてください。
新しく作るときも、既存の`.gitignore`に足すときも同じです。
手で書いた数行は漏れが出やすく、
公式のテンプレートの方が網羅的で保守しやすいためです。
テンプレート名は大文字と小文字を区別します。
`gh repo gitignore list`で一覧を確かめてください。
```console
gh repo gitignore list
gh repo gitignore view Dotnet
```
## 生成に使ったコマンドを書き残す
生成に使ったコマンドは、テンプレートの出力の前にコメントで書き残してください。
どこが生成された部分なのかが分かり、
同じコマンドでテンプレートの更新を取り込めるようにするためです。
複数のテンプレートを組み合わせるときは、
テンプレートの境目に見出しのコメントを置いて、
そこにそれぞれのコマンドを書いていきます。
コメントには、バッククォートで囲んだコマンドだけを書きます。
コマンドがあれば生成したものだと分かるので、説明の言葉は添えません。
```text
# Nix
# `gh repo gitignore view Nix`
<Nixのテンプレートの出力>
# .NET
# `gh repo gitignore view Dotnet`
<Dotnetのテンプレートの出力>
```
## テンプレートに無い項目
合うテンプレートが無い項目や、プロジェクトに固有の項目は、手で書いて構いません。
生成した部分には混ぜずに、見出しのコメントで分けた別の節に置きます。
生成した部分をコマンドで更新するときに、手で書いた項目が消えないようにするためです。
Attribution
Related skills
View all in ai-agents →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.