From tour-dev-toolkit
This skill should be used when the user asks to "smart commit", "commit my changes", "commit and push", "commit and create PR", "push changes", or wants a streamlined commit workflow with safety checks.
npx claudepluginhub boburshoh122000/claude-plugins-bobur --plugin tour-dev-toolkitThis skill uses the workspace's default tool permissions.
Perform a safe, streamlined commit workflow with test verification, domain safety checks, and optional PR creation.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
Perform a safe, streamlined commit workflow with test verification, domain safety checks, and optional PR creation.
pr: commit, push, and create a pull request via gh pr createRun git diff --name-only and git diff --cached --name-only to identify all modified, added, and deleted files. Also run git status to see untracked files. Build the full list of files to commit.
For each changed source file under src/, find its co-located test file:
src/app/lib/foo-actions.ts -> src/app/lib/foo-actions.test.tssrc/lib/bar.ts -> src/lib/bar.test.tssrc/app/api/baz/route.ts -> src/app/api/baz/route.test.tsIf the changed file IS a test file, run it directly.
Run all discovered test files:
node node_modules/vitest/vitest.mjs run <test-file-1> <test-file-2> ...
If any test fails, STOP immediately. Do not proceed to commit. Report which tests failed and why.
Flag a warning if any changed files match sensitive patterns:
| Pattern | Warning |
|---|---|
src/lib/money.ts | Financial math changes |
src/lib/stripe.ts | Payment flow changes |
src/auth.ts, src/auth.config.ts | Auth config changes |
src/middleware.ts | Middleware changes |
prisma/schema.prisma | Schema changes |
**/expense-actions.ts | Financial action changes |
**/financial-actions.ts | Financial action changes |
src/lib/cron-guard.ts | Cron security changes |
src/app/lib/guide-auth.ts | Guide portal auth changes |
src/app/lib/driver-auth.ts | Driver portal auth changes |
If sensitive files are detected, include a [SAFETY] note in the commit message body listing which sensitive areas were touched.
Stage each changed file individually by name. NEVER use git add -A or git add . -- these can accidentally include sensitive files (.env, credentials) or large binaries.
git add src/app/lib/foo-actions.ts src/app/lib/foo-actions.test.ts
Analyze the staged diff to generate a commit message following conventional commit format:
feat: -- new feature or capabilityfix: -- bug fixrefactor: -- code restructuring without behavior changetest: -- adding or updating tests onlydocs: -- documentation changes onlychore: -- tooling, config, dependenciesKeep the subject line under 72 characters. Add a body with bullet points if the change is non-trivial. If domain-safety files were flagged in step 3, add a [SAFETY] section to the body.
Create the commit with the Co-Authored-By trailer:
git commit -m "$(cat <<'EOF'
feat: add expense category management
- Create/update/delete with org-scoped IDOR protection
- Zod v4 validation with audit logging
- Co-located tests with full mock coverage
[SAFETY] Touches: expense-actions.ts (financial actions)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
Push to the current branch:
git push origin HEAD
pr argument provided)If the user passed the pr argument, create a pull request using gh:
main).gh pr create --title "feat: add expense category management" --body "$(cat <<'EOF'
## Summary
- Added CRUD server actions for expense categories
- Full org-scoped IDOR protection
- Co-located Vitest test suite
## Safety
- Touches: `expense-actions.ts` (financial actions)
## Test plan
- [ ] Run `node node_modules/vitest/vitest.mjs run` -- all tests pass
- [ ] Verify org isolation in staging
- [ ] Check affected portals: main dashboard
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
EOF
)"
Return the PR URL when complete.
git add -A or git add . -- stage files individually by name.Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> in every commit.git push --force). If the push fails due to diverged history, inform the user and stop..env, .env.local, credentials.json, *.pem, *.key). Warn the user if such files appear in the diff.