Build a repository's .gitignore from gitignore.io, keeping its own custom rules — with a Claude Code skill that drives it
Project description
manage-gitignore
Build a repository's .gitignore from gitignore.io,
writing the template block verbatim and preserving the repo's own custom rules —
then review the diff and, with confirmation, commit and push it.
This repository ships one thing: a Claude Code
skill, delivered as a Python package. The package is the delivery mechanism —
it carries the skill directory and provides the install/uninstall pair that
puts it where Claude Code looks. It is not a general-purpose CLI.
Install
pipx install manage-gitignore # or: pip install manage-gitignore
manage-gitignore install # symlink the skill into ~/.claude/skills/
Restart Claude Code, and the skill is available. install links rather than
copies, so upgrading the package upgrades the skill — no second step, and no
chance of the two drifting. manage-gitignore uninstall removes that link
again, and refuses to touch anything it did not create: a real directory, or a
link pointing somewhere else, is left alone unless you pass --force. Both take
--dest if your skills directory is not ~/.claude/skills. Removing the
package itself is pipx uninstall manage-gitignore.
install and uninstall are the only commands. Everything else happens through
the skill.
Use
Ask Claude Code, in whatever words you would use anyway:
Give this repo a proper
.gitignore.Add Rust and JetBrains ignores.
What does my
.gitignoreactually cover?
The skill takes it from there: it scans the repository, proposes a template set with the file that justifies each one, asks you to confirm, writes the file preserving your own custom rules, shows you the real diff, and — only with your say-so — commits and pushes it.
The scripts under skill/scripts/ are how the skill does that work. They are
its internals, driven by SKILL.md; calling them yourself is not a supported
interface and their arguments may change without notice.
Safety properties
This tool writes to your repository and, with your say-so, pushes. Each of these fails closed, and each has a test:
- a response that is not exactly the requested gitignore.io block is never written
- a symlinked, FIFO, or oversized
.gitignoreis refused, never followed - the file is re-read and verified after writing (block intact, custom rules present, no ANSI or bidi characters) before success is reported
- a
.gitignorecreated or edited during the fetch is detected, not clobbered commitrefuses a file whose checksum no longer matches what was verified, and proves the committed blob is that content — not just that the path matched- a commit touching anything besides
.gitignoreis reported, never pushed pushexecutes only what its own freshly computed plan permits, by explicit refspec, and will not force outside a genuinely diverged branch- a force-push is leased against the remote sha the user approved, not the
tracking ref that
push's owngit fetchjust refreshed ext::remotes and interactive credential prompts are refused outright- no repo- or API-derived text can forge a line or an escape sequence in the summary
Most of that list came from review rather than from the first draft: this was built with Claude Code, then examined across ten rounds by a nine-agent panel (skill design, Python, testing, application security, shell, documentation, software design, test design, UX), and around 390 findings were applied.
Contributing
Runs on Python 3.10 through 3.14, with no third-party runtime dependencies —
standard library only, plus curl and git on PATH.
See CLAUDE.md: repository layout, the rules that hold its shape, build and test commands, and the release process.
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manage_gitignore-0.2.1.tar.gz.
File metadata
- Download URL: manage_gitignore-0.2.1.tar.gz
- Upload date:
- Size: 99.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46e05413c110ed915db0c5384d3f2dd708d2314b51e1d5cc335a31dbb5025e67
|
|
| MD5 |
2911c2b43291115c669481304f3abeed
|
|
| BLAKE2b-256 |
7f8c66127d8174442db2aa291a08bf94192b975608cbaed41adee851163c0a4b
|
Provenance
The following attestation bundles were made for manage_gitignore-0.2.1.tar.gz:
Publisher:
release.yml on grammy-jiang/manage-gitignore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manage_gitignore-0.2.1.tar.gz -
Subject digest:
46e05413c110ed915db0c5384d3f2dd708d2314b51e1d5cc335a31dbb5025e67 - Sigstore transparency entry: 2335146894
- Sigstore integration time:
-
Permalink:
grammy-jiang/manage-gitignore@1c79c4994458d910c35d861681a6f354451d7de7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/grammy-jiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c79c4994458d910c35d861681a6f354451d7de7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file manage_gitignore-0.2.1-py3-none-any.whl.
File metadata
- Download URL: manage_gitignore-0.2.1-py3-none-any.whl
- Upload date:
- Size: 59.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd8dd01e90f15f36ec2d1ada289f7bbaefd18a6b1ff69539064d4b485a823e37
|
|
| MD5 |
3fc8f781f7704e8098b63225ce952075
|
|
| BLAKE2b-256 |
ace9ac8787c4c6b41e08410345c9df6be23e0786a7ca5be8784ab1c6afd893f7
|
Provenance
The following attestation bundles were made for manage_gitignore-0.2.1-py3-none-any.whl:
Publisher:
release.yml on grammy-jiang/manage-gitignore
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manage_gitignore-0.2.1-py3-none-any.whl -
Subject digest:
fd8dd01e90f15f36ec2d1ada289f7bbaefd18a6b1ff69539064d4b485a823e37 - Sigstore transparency entry: 2335146903
- Sigstore integration time:
-
Permalink:
grammy-jiang/manage-gitignore@1c79c4994458d910c35d861681a6f354451d7de7 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/grammy-jiang
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1c79c4994458d910c35d861681a6f354451d7de7 -
Trigger Event:
push
-
Statement type: