Skip to content
Back to skills

Commit 54

ASecurity

Create git commits following RentPath conventions. Scopes commits to current session changes, handles pre-commit hooks, no AI attribution. Auto-triggers on "commit", "create commit", "commit these changes", "commit what we did".

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 27, 2026
developmenttypescriptgophpbashrefactoringgitfrontendbackenddocumentation

Security analysis

A100/100

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill commit-54 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Commit 54?

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

Security grade badge for Commit 54
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-commit-54/badge)](https://www.skillsdirectory.com/skills/david-li0406-commit-54)

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: commit
description: Create git commits following RentPath conventions. Scopes commits to current session changes, handles pre-commit hooks, no AI attribution. Auto-triggers on "commit", "create commit", "commit these changes", "commit what we did".
---

# RentPath Commit Guide

You are helping create a git commit following RentPath conventions.

## Arguments

This skill accepts optional arguments to scope what gets committed:

| Usage                                 | Behavior                                           |
| ------------------------------------- | -------------------------------------------------- |
| `/commit`                             | Interactive - analyze changes, ask what to include |
| `/commit application workflow`        | Only changes related to application workflow       |
| `/commit wizard validation`           | Only wizard and validation changes                 |
| `/commit docs/`                       | Only documentation changes                         |
| `/commit app/Services/`               | Only changes in that path                          |
| `/commit the refactoring we just did` | Natural language - scope to recent work            |
| `/commit --all`                       | Stage all changes (when everything is yours)       |

**Argument interpretation:**

- **Paths** (`app/Services/`, `docs/`) - Stage only files matching that path
- **Topics** (`wizard`, `validation`) - Stage files related to those concepts
- **Plans** (`the refactoring`, `what we just did`) - Stage changes from current session/plan
- **Bundles** (`application workflow`) - Stage cohesive set of related changes

After scoping, Claude will draft an appropriate commit message based on the staged changes.

## Critical Rules

1. **No AI attribution** - Never include "Co-Authored-By", "Generated by", or any AI-related metadata
2. **Session-scoped commits** - Only commit changes from the current session/plan, not unrelated changes
3. **Fix pre-commit issues** - If hooks fail, fix the issues and retry (don't skip hooks)
4. **Conventional commits** - Use the format: `type: description`

## Commit Types

| Type       | When to Use                                |
| ---------- | ------------------------------------------ |
| `feat`     | New feature or functionality               |
| `fix`      | Bug fix                                    |
| `refactor` | Code restructuring without behavior change |
| `docs`     | Documentation only changes                 |
| `chore`    | Tooling, dependencies, config              |
| `test`     | Adding or updating tests                   |
| `style`    | Formatting, whitespace (no code change)    |

## Commit Process

### Step 1: Review All Changes

```bash
# See all changes (staged and unstaged)
git status

# See what's modified (not staged)
git diff

# See what's staged
git diff --staged
```

### Step 2: Identify Session Changes

**Ask yourself:**

- Which files did we modify during this session/plan?
- Are there unrelated changes from other work?

**Common patterns:**

```bash
# If only our changes exist, stage all
git add -A

# If mixed with other changes, stage selectively
git add app/Http/Controllers/ApplicationController.php
git add app/Services/ApplicationService.php
git add tests/Feature/ApplicationFlowTest.php

# Stage by pattern
git add app/Http/Requests/Application/Steps/*.php
```

### Step 3: Verify Staged Changes

```bash
# Confirm only intended changes are staged
git diff --staged --name-only

# Review the actual diff
git diff --staged
```

**Leave for separate commits:**

- Changes from other sessions/agents
- Unrelated refactoring spotted during work
- Auto-generated files that weren't part of this work

### Step 4: Create Commit

```bash
git commit -m "type: concise description of what changed"
```

**Good commit messages:**

```
feat: add visit scheduling to application workflow
fix: prevent duplicate application submissions
refactor: extract application logic to ApplicationService
docs: update wizard documentation with new steps
chore: update dependencies for PHP 8.3
```

**Bad commit messages:**

```
update files                    # Too vague
fix bug                         # What bug?
WIP                             # Not descriptive
feat: add feature               # Redundant
```

### Step 5: Handle Pre-Commit Hook Failures

If commit fails due to pre-commit hooks:

**PHP formatting (Pint):**

```bash
# Hook auto-fixes files, just re-stage and commit
git add -A
git commit -m "type: description"
```

**ESLint/Prettier:**

```bash
# Fix JS/TS issues
npm run lint:fix
npm run format

# Re-stage and commit
git add -A
git commit -m "type: description"
```

**Type errors:**

```bash
# Fix TypeScript errors first
npm run types

# Fix issues, then re-stage and commit
```

**Test failures:**

```bash
# Run failing tests
php artisan test --filter="FailingTest"

# Fix issues, then re-stage and commit
```

**Never skip hooks:**

```bash
# DON'T DO THIS
git commit --no-verify  # BAD - skips quality checks
```

## Splitting Large Changes

If you made many changes, consider multiple commits:

```bash
# Commit backend changes first
git add app/Models/ app/Http/ app/Services/
git commit -m "feat: add application visit scheduling"

# Commit frontend changes
git add resources/js/
git commit -m "feat: add visit scheduling UI components"

# Commit tests
git add tests/
git commit -m "test: add visit scheduling tests"

# Commit docs
git add docs/ .claude/
git commit -m "docs: document visit scheduling feature"
```

## Multi-Agent Session Handling

When working in a session with multiple plans/agents:

### Scenario: Mixed Changes

```bash
$ git status
M app/Http/Controllers/ApplicationController.php  # This session
M app/Http/Controllers/PropertyController.php     # Different agent
M tests/Feature/ApplicationFlowTest.php           # This session
```

**Solution:** Stage only this session's changes:

```bash
git add app/Http/Controllers/ApplicationController.php
git add tests/Feature/ApplicationFlowTest.php
git commit -m "feat: add application status transitions"

# Leave PropertyController for its own commit
```

### Scenario: You're Unsure What's Yours

Ask the user:

```
I see changes in these files. Which ones should be included in this commit?
- app/Http/Controllers/ApplicationController.php
- app/Http/Controllers/PropertyController.php
- tests/Feature/ApplicationFlowTest.php
```

## Quick Reference

```bash
# Full workflow
git status                          # Review all changes
git add [specific files]            # Stage session changes only
git diff --staged                   # Verify staged changes
git commit -m "type: description"   # Commit (no AI attribution)

# If hooks fail
# Fix the issues
git add -A                          # Re-stage fixes
git commit -m "type: description"   # Retry commit
```

## What NOT to Do

- ❌ `git commit --no-verify` - Never skip hooks
- ❌ `Co-Authored-By: Claude` - No AI attribution
- ❌ `git add -A` when there are unrelated changes
- ❌ Vague messages like "update", "fix", "changes"
- ❌ Committing generated files that shouldn't be tracked
- ❌ Committing `.env` or secrets

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.

Comments

Loading comments…