# Init

> Initializes or optimizes git-agent configuration, regenerates commit scopes from git history, and re-derives .gitignore rules.

- Skill: `fradser/init` (Agent Skill)
- Install (CLI): `npx skillmds@latest add fradser/init`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fradser/init/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: FradSer (https://skillmd.com/u/fradser)
- Updated: 2026-08-19
- Page: https://skillmd.com/skills/fradser/init

---


## Execution

Execute initialization or optimization based on `$ARGUMENTS`:

1. **Optimize commit scopes** (regenerate from history):
   ```bash
   git-agent init --scope --force
   ```
2. **Re-derive `.gitignore`** (preserve custom rules):
   ```bash
   git-agent init --gitignore
   ```
3. **Full initialization** (both scopes and `.gitignore`):
   ```bash
   git-agent init --scope --gitignore
   ```

Report the updated configuration status upon completion.

CLI Reference: `../../references/cli.md`

