source-command-commit
Use this skill when the user asks to run the migrated source command commit.
Command Template
Commit
Create a conventional commit following StarMapper conventions.
Steps
rtk git status+rtk git diff— understand what changed- Detect scope from files:
components/map/→mapapp/api/chunk/→apiapp/api/repo-info/→apilib/geocoder.ts→geocoderlib/github.ts→githublib/db.tsorprisma/→dbapp/page.tsxorapp/[owner]/[repo]/page.tsx→uinext.config,tsconfig,.Codex/,.env.example→configpackage.json,pnpm-lock.yaml→deps
- Scope Check avant de stager :
- Chaque fichier stagé est directement lié au changement en cours
- Pas de "refactoring opportuniste" non demandé
- Si un fichier n'est pas directement lié → commiter séparément
- Stage specific files (never
git add -A) - Commit with HEREDOC:
git commit -m "$(cat <<'EOF'
type(scope): imperative lowercase message
[Optional body: explain WHY, not what]
Co-Authored-By: Codex Sonnet 4.6 <noreply@anthropic.com>
EOF
)"
rtk git statusto verify
Types
feat— new feature or capabilityfix— bug fixperf— performance improvementrefactor— restructure without behavior changechore— deps, config, toolingdocs— documentation only
Examples
feat(map): add unmapped users drawer
fix(db): add url to datasource in schema.prisma
perf(geocoder): cache null results to skip re-geocoding
chore(deps): upgrade maplibre-gl to 5.21
fix(api): handle github graphql 429 rate limit
refactor(github): remove null cursor from graphql variables
feat(ui): add star count progress bar
fix(geocoder): normalize location key before cache lookup
Rules
- Granularity : commiter APRÈS chaque changement logique terminé, pas tout à la fin
- Never stage
.env.local,.env*, or any secrets - Specify files explicitly — no
git add . - Message: imperative, lowercase, max 50 chars
- Body optional but valuable for non-obvious changes