From marcoshack
Create a well-structured git commit with security scanning, change analysis, and conventional commit messages. Use when the user asks to commit, create a commit, or save their changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/marcoshack:commitThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create a secure, well-structured git commit by analyzing all changes, running a security scan, and writing a clear commit message.
Create a secure, well-structured git commit by analyzing all changes, running a security scan, and writing a clear commit message.
Run these commands in parallel to understand the current state:
# See all modified, staged, and untracked files (never use -uall)
git status --porcelain
# See the full diff of all changes (staged + unstaged)
git diff HEAD
# See untracked files that would be added
git ls-files --others --exclude-standard
# Recent commit messages to match the repository's style
git log --oneline -10
Before proceeding, ask the user whether they want to run a security scan:
/security-scan skill to check for leaked secrets, credentials, or sensitive data in the changes.If the security scan runs and finds issues: STOP immediately. Report the findings to the user and do NOT create a commit. Wait for the user to resolve the issues before retrying.
If the security scan passes or was skipped: Continue to the next step.
Read and understand all changes that will be committed:
Do not commit files that likely contain secrets (.env, credentials.json, private keys, etc.) even if they are not in .gitignore. Warn the user if such files are present in the changes.
Stage files intentionally. Prefer adding specific files by name rather than git add -A or git add .:
git add file1.py file2.py ...
Only use git add -A if the user explicitly requests it or if all changed files clearly belong in the commit.
If there are unrelated changes that should be separate commits, ask the user whether they want to commit everything together or split into multiple commits.
Write a commit message following these rules:
Title line (first line):
feat:, fix:) unless the repository already uses them (check git log)Body (separated by a blank line):
Example:
Add agent session persistence across restarts
- Introduce FileSessionManager to save conversation history to disk
- Add SNAKE_SESSIONS_DIR env var for configurable storage path
- Mount sessions directory as Docker volume for container survival
- Update agent runner to reuse existing sessions on startup
Always pass the commit message via a HEREDOC for correct formatting:
git commit -m "$(cat <<'EOF'
Title line here
Body line 1
Body line 2
EOF
)"
IMPORTANT: Do NOT add a Co-Authored-By trailer to the commit message.
After committing, run git status to confirm the commit succeeded and the working tree is in the expected state. Show the user the commit hash and title.
--no-verify) unless the user explicitly asks for it-i) as they require interactive inputProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub marcoshack/agent-skills --plugin marcoshack