---
name: commit-11db000b9fd7
description: Validated commit — runs quick checks before committing. Use when ready to commit changes.
disable-model-invocation: false
argument-hint: "[commit message]"
---

# Validated Commit

Run quick validation, then commit if clean.

## Steps

1. **Run quick validation**

```
/sdlc-core:validate --quick
```

2. **Run tests and smoke test** (if application code was changed)

```bash
# Run test suite if configured
pytest --tb=short -q 2>/dev/null || echo "No pytest configured"

# Smoke test: verify the app's main module imports cleanly
python -c "import app" 2>/dev/null || python -c "import main" 2>/dev/null || echo "No app module found"
```

If tests fail or the app cannot import, stop. Fix the issue before committing. Static analysis passing does not mean the code works.

3. **If validation or tests fail**, report the issues and stop. Do NOT commit.

4. **If all checks pass**, proceed:
   - Review all changed files with `git status` and `git diff`
   - Stage the relevant files (prefer specific files over `git add -A`)
   - If `$ARGUMENTS` is provided, use it as the commit message
   - If no message provided, draft a concise commit message based on the changes
   - Use conventional commit format: `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `chore:`

5. **Commit** using a heredoc for proper formatting:

```bash
git commit -m "$(cat <<'EOF'
<type>: <description>

<optional body>

Co-Authored-By: Claude <noreply@anthropic.com>
EOF
)"
```

6. **Run git status** after commit to verify success.


---
Source attribution: SteveGJones
Original project: https://github.com/SteveGJones/ai-first-sdlc-practices/blob/631a626ff044f069e445d40777a0951e491a8132/plugins/sdlc-core/skills/commit/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2024 Steve Jones

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



# Dave AI resource metadata

Creator / publisher: SteveGJones
Original project: https://github.com/SteveGJones/ai-first-sdlc-practices/blob/631a626ff044f069e445d40777a0951e491a8132/plugins/sdlc-core/skills/commit/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: Backend Developer, DevOps / SRE, Full-Stack Developer
Specialties: Git
Tools: Tool not specified
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: b19e1ffbe2b5ad9f8512d2f8808e334cfc41fd7c7a1c0b8e3c8d8be3e81fe73e
