setup
Installation
SKILL.md
CRITICAL:
- Always preserve custom
.gitignorerules before runninggit-agent init --gitignore. - On auth error (401), retry the same
git-agent initcommand with--freeappended.
- Verify
git config user.nameandgit config user.email; prompt if missing. - Parse
$ARGUMENTSto determine mode:- Empty → run both scope and gitignore
scope→ run only scope generationgitignore→ run only .gitignore generation
- If running gitignore and
.gitignorealready exists:- Read the current file
- Identify lines that are NOT part of the standard git-agent generated block (anything between
# --- git-agent ---markers or common auto-generated patterns) - Save those custom rules
- Run
git-agent initwith the appropriate flags:- Both:
git-agent init --scope --gitignore --force - Scope only:
git-agent init --scope --force - Gitignore only:
git-agent init --gitignore --force
- Both:
- On auth error (401), retry the same command with
--freeappended. - If custom
.gitignorerules were saved in step 3, append them back and showgit diff .gitignore.