Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Git commit workflow with precommit hook handling, lint/type checking, README updates, and API reference updates. Use when the user wants to commit changes. Handles precommit hooks that modify files (formatting, linting) by re-staging and retrying. Runs ruff lint and pyright type checks on staged Python files, and Biome lint and tsc type checks on staged TS/JS files, fixing all errors. Fixes failing unit tests automatically before committing. Updates README code maps if needed. Updates API refere
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 78% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 38% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 297% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 133% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 77% | 0% |
Create a git commit with automatic precommit hook handling, test fixing, README updates, and API reference updates.
Note: Steps 5 and the API Reference Update Guidelines are specific to the Reflexio project. They are skipped automatically when the referenced paths do not exist.
git status and git diff --cached --name-only to see staged/unstaged changesgit diff --cached --name-only and check if CLAUDE.md is in the staged changeset. If yes, copy CLAUDE.md content to GEMINI.md and AGENTS.md, then stage them. If CLAUDE.md is NOT staged, skip this step entirely — do not overwrite other instruction files that may have been intentionally edited independently..env. Never change .env file even if it is modified.reflexio/reflexio_client/reflexio/client.py or reflexio/reflexio_commons/reflexio_commons/api_schema/service_schemas.py exist AND are in the staged changeset, update reflexio/public_docs/api-reference/ (see API Reference Update Guidelines below). Otherwise skip.a. Get the list of staged Python files: bash git diff --cached --name-only --diff-filter=ACMR -- '*.py' If no Python files are staged, skip this step entirely. b. Ruff auto-fix: Run ruff check --fix <files>. Re-stage any modified files with git add <files>. c. Ruff format: Run ruff format <files>. Re-stage any modified files with git add <files>. d. Ruff remaining errors: Run ruff check <files>. If any errors remain that ruff could not auto-fix, read each error, understand the issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed ruff errors. e. Pyright type check: Run pyright <files>. If any type errors are reported, read each error, understand the type issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed pyright errors. f. Get the list of staged TypeScript/JavaScript files: bash git diff --cached --name-only --diff-filter=ACMR -- '*.ts' '*.tsx' '*.js' '*.jsx' '*.mts' If no TS/JS files are staged, skip steps 6g-6i entirely. g. Biome auto-fix: Run npx biome check --write <files> from the relevant project root (reflexio/website/ or reflexio/public_docs/ depending on file path). Re-stage any modified files with git add <files>. h. Biome remaining errors: Run npx biome check <files>. If any errors remain that Biome could not auto-fix, read each error, understand the issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed Biome errors. i. TypeScript type check: Run npx tsc --noEmit from the relevant project root. If any type errors are reported, read each error, understand the type issue, and fix the code yourself. Re-stage fixes. Do NOT proceed with unfixed tsc errors.
git commit which triggers precommit hooksgit add -u and retry commitBefore committing, always check if README files need updates. Follow how_to_write_readme.md in the repo root.
Step 1: Analyze changes with these commands:
bash# See what files are being committed git diff --cached --name-only # See detailed changes git diff --cached --stat # For unstaged changes git diff --name-only
Step 2: Check if README update is REQUIRED (update if ANY are true):
services/email/)If none of the above criteria match, skip README updates entirely and proceed to the next step.
Pre-write criteria — before writing any README changes, confirm:
Only proceed with the update if at least one criterion identifies a gap.
Step 3: Update process:
reflexio/server/README.md)README.md if high-level structure changedgit add README.md src/*/README.mdTwo-tier approach:
README.md) - High-level overview of all componentsreflexio/server/README.md) - Detailed documentationWhen changes are made to the Reflexio client or service schemas, update the API reference documentation.
Source files to watch:
reflexio/reflexio_client/reflexio/client.py - Client class methodsreflexio/reflexio_commons/reflexio_commons/api_schema/service_schemas.py - Request/Response models and enumsDocumentation to update:
reflexio/public_docs/api-reference/client.md - Client method documentationreflexio/public_docs/api-reference/schemas.md - Schema/model documentationWhen to update:
client.mdclient.mdschemas.mdschemas.mdschemas.mdUpdate process:
Documentation style:
[UserProfile](#userprofile))Use conventional commit style:
<type>: <short description>
<optional body explaining why>Types: feat, fix, refactor, test, docs, chore, style
How to write the message:
git diff --cached to understand the full scope of staged changes.git log --oneline -5 and match the existing commit style of the repo.Do NOT include Co-Authored-By lines in commit messages.
When precommit hooks fail due to file modifications:
bash# Check what was modified by hooks before re-staging git diff --name-only # Verify no unexpected files (binaries, generated assets) are being re-staged git add -u git commit -m "..."
Before running git add -u, review the output of git diff --name-only. If unexpected files appear (compiled assets, binary files, generated artifacts), stage only the expected files explicitly instead of using git add -u.
Retry up to 3 times. If the commit still fails after 3 retries, stop and report the hook output to the user rather than retrying further.
When pytest fails during precommit:
git addIf tests still fail after 3 fix attempts, stop and report the failures to the user.
Other measured skills in the registry, with their headline benchmark lift.