Skip to content
Back to skills

Generate Gitignore

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added December 2, 2026
ai-agentsgit

Security analysis

A100/100

Scanned December 2, 2026

npx -y skills add ncaq/konoka --skill generate-gitignore --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate Gitignore?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate Gitignore
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ncaq-generate-gitignore/badge)](https://www.skillsdirectory.com/skills/ncaq-generate-gitignore)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.