| name | checkin-assistant |
| scope | partial |
| description | Guide pre-commit quality gates and check-in workflow.
Use when: committing code, preparing commits, quality gate verification.
Keywords: commit, checkin, pre-commit, quality gate, git add, ๆไบค, ็ฐฝๅ
ฅ, ๅ่ณช้ๅก.
|
Checkin Assistant
Language: English | ็น้ซไธญๆ
Version: 1.0.0
Last Updated: 2026-01-12
Applicability: Claude Code Skills
Purpose
This skill guides developers through pre-commit quality gates, ensuring every commit maintains codebase stability and follows best practices.
Note: This skill focuses on when and how to commit. For code review during PR, see Code Review Assistant.
Quick Reference (YAML Compressed)
every_commit_should:
- "Be a complete logical unit of work"
- "Leave codebase in working state"
- "Be reversible without breaking functionality"
- "Contain its own tests (for new features)"
- "Be understandable to future developers"
checklist:
build:
- "Code compiles (zero errors)"
- "Dependencies satisfied"
verify: "Run build command, exit code 0"
tests:
- "All existing tests pass (100%)"
- "New code has tests"
- "Coverage not decreased"
verify: "Run test suite, check coverage"
quality:
- "Follows coding standards"
- "No code smells (methodsโค50, nestingโค3, complexityโค10)"
- "No hardcoded secrets"
- "No security vulnerabilities"
verify: "Run linter, security scanner"
docs:
- "API docs updated"
- "README updated (if needed)"
- "CHANGELOG updated (user-facing changes โ [Unreleased])"
workflow:
- "Branch naming correct (feature/, fix/, docs/, chore/)"
- "Commit message formatted (conventional commits)"
- "Synced with target branch"
blockers:
- "Build has errors"
- "Tests are failing"
- "Feature incomplete (would break functionality)"
- "Contains WIP/TODO in critical logic"
- "Contains debugging code (console.log, print)"
- "Contains commented-out code blocks"
good_times:
- completed_unit: "Feature fully implemented with tests"
- bug_fixed: "Bug fixed with regression test"
- independent_refactor: "Refactoring complete, all tests pass"
- runnable_state: "Code compiles, app can run"
bad_times:
- "Build failures"
- "Test failures"
- "Incomplete features"
- "Experimental code with scattered TODOs"
ideal_commit:
files: "1-10 (split if >10)"
lines: "50-300"
scope: "Single concern"
split_rules:
combine: ["feature + its tests", "tightly related multi-file changes"]
separate: ["Feature A + B", "refactor + new feature", "bugfix + incidental refactor"]
emergency_leave:
recommended: "git stash save 'WIP: description'"
alternative: "Create wip/ branch"
prohibited: "Commit WIP directly on feature branch"
experimental:
branch: "experiment/topic-name"
rules: "Free commits (no strict format)"
success: "Clean up, squash, merge to feature"
failure: "Document lessons, delete branch"
hotfix:
branch: "hotfix/issue-name from main"
rules: "Minimize changes, only fix the problem"
message: "fix(scope): [URGENT] description"
Checklist Visual Format
Use this checklist before every commit:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ PRE-COMMIT CHECKLIST โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐จ BUILD โ
โ โก Code compiles successfully (zero errors) โ
โ โก All dependencies satisfied โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐งช TESTS โ
โ โก All existing tests pass (100%) โ
โ โก New code has corresponding tests โ
โ โก Test coverage not decreased โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โจ CODE QUALITY โ
โ โก Follows project coding standards โ
โ โก No hardcoded secrets or credentials โ
โ โก No security vulnerabilities โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ DOCUMENTATION โ
โ โก API documentation updated (if applicable) โ
โ โก CHANGELOG updated (user-facing changes) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ ๐ WORKFLOW โ
โ โก Branch naming follows convention โ
โ โก Commit message follows conventional commits โ
โ โก Synced with target branch (no conflicts) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Check-in Trigger Points
When to Prompt for Commit
| Trigger | Condition | Reminder Level |
|---|
| Phase Complete | Completed a development phase | Suggest |
| Checkpoint | Reached defined checkpoint | Suggest |
| Change Accumulation | Files โฅ5 or lines โฅ200 | Suggest |
| Consecutive Skips | Skipped commit 3 times | Warning |
| Work Complete | Uncommitted changes before finishing | Strongly Recommend |
Reminder Format
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ Check-in Checkpoint โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Phase 1 completed โ
โ โ
โ Change Statistics: โ
โ - Files: 5 โ
โ - Added: 180 lines โ
โ - Deleted: 12 lines โ
โ โ
โ Test Status: โ
Passed โ
โ โ
โ Suggested commit message: โ
โ feat(module): complete Phase 1 setup โ
โ โ
โ Options: โ
โ [1] Commit now (will show git commands) โ
โ [2] Commit later, continue to next phase โ
โ [3] View detailed changes โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Skip Warning
After 3 consecutive skips:
โ ๏ธ Warning: You have skipped check-in 3 times consecutively
Current accumulated changes: 15 files, +520 lines
Recommend committing soon to avoid changes becoming too large to review
AI Assistant Workflow
When AI completes code changes, follow this workflow:
Step 1: Evaluate Timing
โ
Complete: "Implemented user registration with validation, tests, and docs"
โ ๏ธ Incomplete: "Added registration form but backend validation pending"
โ Not Ready: "Started working on registration, several TODOs remain"
Step 2: Run Checklist
### Checklist Results
โ
Build: npm run build succeeded
โ
Code Quality: Follows project standards
โ ๏ธ Tests: Unit tests pass, integration tests need verification
โ
Documentation: JSDoc comments added
โ
Commit Message: Prepared following conventional commits
Step 3: Prompt User
## Please Confirm Check-in
Completed: [Brief description]
### Checklist Results
โ
Build passes
โ
Tests pass
โ
Code quality verified
โ
Documentation updated
Suggested commit message:
feat(auth): add OAuth2 Google login support
- Implement OAuth2 flow with Google provider
- Add user session management
- Include unit tests for auth service
Refs #123
Proceed with commit?
Step 4: Wait for Confirmation
AI MUST:
- โ
Wait for explicit user approval
- โ
Provide clear checklist summary
- โ
Allow user to decline or request changes
AI MUST NOT:
- โ Automatically execute
git add
- โ Automatically execute
git commit
- โ Automatically execute
git push
Common Violations
โ WIP Commits
git commit -m "WIP"
git commit -m "save work"
git stash save "WIP: feature description"
โ Commented Code
const newValue = calculateV2(x);
const newValue = calculateV2(x);
โ Mixed Concerns
git commit -m "fix bug and refactor and add feature"
git commit -m "fix(module-a): resolve null pointer"
git commit -m "refactor(module-b): extract validation"
git commit -m "feat(module-c): add CSV export"
Directory Hygiene
Before committing, verify no unwanted files:
git diff --cached --name-only | grep -E '\.idea|\.vs/|\.DS_Store'
git ls-files | grep -E '^\$'
git reset HEAD <file>
Common Artifacts to Exclude
| Pattern | Source | Action |
|---|
.idea/ | JetBrains | gitignore |
.vs/ | Visual Studio | gitignore |
.DS_Store | macOS | gitignore |
Thumbs.db | Windows | gitignore |
Configuration Detection
Detection Order
- Check
CONTRIBUTING.md for "Disabled Skills" section
- Check
CONTRIBUTING.md for "Check-in Standards" section
- Check for pre-commit hooks configuration
- If not found, default to standard checklist
First-Time Setup
If no configuration found:
- Suggest documenting in
CONTRIBUTING.md:
## Check-in Standards
### Build Commands
```bash
npm run build
Test Commands
npm test
Quality Commands
npm run lint
Minimum Coverage
---
## Detailed Guidelines
For complete standards, see:
- [Checkin Standards](../../../core/checkin-standards.md)
---
## Related Standards
- [Checkin Standards](../../../core/checkin-standards.md) - Core standard
- [Commit Message Guide](../../../core/commit-message-guide.md) - Message format
- [Code Review Checklist](../../../core/code-review-checklist.md) - PR review
- [Code Review Assistant](../code-review-assistant/SKILL.md) - Review skill
- [Commit Standards Skill](../commit-standards/SKILL.md) - Commit message skill
---
## Version History
| Version | Date | Changes |
|---------|------|---------|
| 1.0.0 | 2026-01-12 | Initial release |
---
## License
This skill is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
**Source**: [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards)