Automated summary
Automates the Git commit workflow with precommit hook handling, linting and type checking, README updates, and API reference updates when needed.
Strengths
- Runs ruff and pyright for Python, biome and tsc for TypeScript/JavaScript automatically
- Fixes linting and type errors before committing
- Updates README and API reference docs based on staged changes
- Handles precommit hooks by re-staging modified files
Limitations
- Project-specific (Reflexio paths for API docs)
- Requires tools (ruff, pyright, biome, tsc) to be installed
- Does not push commits to remote
Use this skill when you want to commit changes with comprehensive code quality checks and automatic fixes.
Do not use this skill if you want to skip quality checks or work on a project with a different toolchain.
Security analysis
SafeThe skill describes a local git commit workflow using standard linters/formatters and static analysis tools. It does not execute any external network calls, destructive commands, or secret exfiltration. No obfuscated payloads are present.
No concerns found
How this analysis is madeExamples
Commit my staged changes with full lint and type checks.Stage and commit all modified and untracked files with precommit checks.Commit the changes and update API reference docs if needed.name: commit description: 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 reference docs when client.py or service_schemas.py changed. Does not push.
Commit
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.
Workflow
- Check git status - Run
git statusandgit diff --cached --name-onlyto see staged/unstaged changes - Sync AI instruction files (only if CLAUDE.md changed) — Run
git diff --cached --name-onlyand check ifCLAUDE.mdis 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. - Stage files - Add relevant untracked/modified files if needed. Do not modify or change gitignored files, such as
.env. Never change.envfile even if it is modified. - Check README updates - Run through the README Update Guidelines checklist below. If ANY criteria match, update README files before proceeding.
- Update API Reference docs (Reflexio-specific) — If the files
reflexio/reflexio_client/reflexio/client.pyorreflexio/reflexio_commons/reflexio_commons/api_schema/service_schemas.pyexist AND are in the staged changeset, updatereflexio/public_docs/api-reference/(see API Reference Update Guidelines below). Otherwise skip. - Run lint and type checks on staged Python files
a. Get the list of staged Python files:
If no Python files are staged, skip this step entirely. b. Ruff auto-fix: Rungit diff --cached --name-only --diff-filter=ACMR -- '*.py'ruff check --fix <files>. Re-stage any modified files withgit add <files>. c. Ruff format: Runruff format <files>. Re-stage any modified files withgit add <files>. d. Ruff remaining errors: Runruff 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: Runpyright <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:If no TS/JS files are staged, skip steps 6g-6i entirely. g. Biome auto-fix: Rungit diff --cached --name-only --diff-filter=ACMR -- '*.ts' '*.tsx' '*.js' '*.jsx' '*.mts'npx biome check --write <files>from the relevant project root (reflexio/website/orreflexio/public_docs/depending on file path). Re-stage any modified files withgit add <files>. h. Biome remaining errors: Runnpx 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: Runnpx tsc --noEmitfrom 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. - Attempt commit - Run
git commitwhich triggers precommit hooks - Handle hook results:
- If hooks modify files (formatting, linting): Stage the modified files with
git add -uand retry commit - If unit tests fail: Fix the failing tests, stage fixes, and retry commit
- If hooks pass: Commit succeeds
- If hooks modify files (formatting, linting): Stage the modified files with
- Do NOT push - Only commit locally
README Update Guidelines
Before 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:
# 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):
- [ ] New directory created (e.g.,
services/email/) - [ ] New Python module/file added to existing component
- [ ] New API endpoint added
- [ ] New service or extractor added
- [ ] Architecture pattern changed
- [ ] Component relationships changed
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:
- Can an LLM currently find the right file with the existing README? If yes, no update needed.
- Are there new files/directories that need documented paths?
- Are new API endpoints to list?
- Are there anti-patterns to highlight (NEVER/ALWAYS)?
Only proceed with the update if at least one criterion identifies a gap.
Step 3: Update process:
- Identify affected component(s) from the file paths
- Read existing README(s) in affected directories
- Update component-level README first (e.g.,
reflexio/server/README.md) - Update main
README.mdif high-level structure changed - Stage README changes:
git add README.md src/*/README.md
Two-tier approach:
- Main Code Map (
README.md) - High-level overview of all components - Component Code Maps (e.g.,
reflexio/server/README.md) - Detailed documentation
API Reference Update Guidelines
When 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 enums
Documentation to update:
reflexio/public_docs/api-reference/client.md- Client method documentationreflexio/public_docs/api-reference/schemas.md- Schema/model documentation
When to update:
- New client method added → Add method documentation to
client.md - Client method signature changed → Update parameters/return types in
client.md - New request/response model added → Add model documentation to
schemas.md - Model fields changed → Update field tables in
schemas.md - New enum added or enum values changed → Update enum documentation in
schemas.md
Update process:
- Read the changed source file to understand what was added/modified
- Read the existing documentation file(s) to understand current format
- Update documentation to match the source code changes:
- For methods: Include signature, parameter table, return type, response schema, and examples
- For schemas: Include field table with Type, Description, and Default columns
- For enums: List all values with descriptions
- Maintain consistent formatting with existing documentation
- Verify format consistency: After updating, re-read the full documentation file and confirm the new section matches the structure and formatting of an adjacent existing section (same heading levels, table format, example style).
Documentation style:
- Use markdown tables for parameters and fields
- Include code examples for new methods
- Reference related schemas using links (e.g.,
[UserProfile](#userprofile)) - Keep descriptions concise but complete
Commit Message Format
Use conventional commit style:
<type>: <short description>
<optional body explaining why>
Types: feat, fix, refactor, test, docs, chore, style
How to write the message:
- Read
git diff --cachedto understand the full scope of staged changes. - The subject line should summarize the why, not list files changed.
- Include a body only for non-trivial changes — explain motivation, trade-offs, or context that isn't obvious from the diff.
- If the staged changes span multiple unrelated concerns, note this to the user and suggest splitting into separate commits rather than writing a vague summary.
- Check
git log --oneline -5and match the existing commit style of the repo.
Do NOT include Co-Authored-By lines in commit messages.
Precommit Hook Retry Logic
When precommit hooks fail due to file modifications:
# 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.
Unit Test Failure Handling
When pytest fails during precommit:
- Read the test failure output to understand what failed
- Fix the application code causing the failure first. Only modify the test itself if the test is clearly wrong (e.g., it tests old behavior that the current commit intentionally changes).
- Never delete or comment out assertions to make tests pass.
- Stage the fixes with
git add - Retry the commit
If tests still fail after 3 fix attempts, stop and report the failures to the user.
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/git-commit-workflow-mrwake52/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/git-commit-workflow-mrwake52' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/git-commit-workflow-mrwake52/download' --output '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md.part' && mv '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md.part' '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md' && test -s '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/commit' && cp -R '.skill-downloads/git-commit-workflow-mrwake52' '.claude/skills/commit'Cursor
test -f '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md' && test -s '.skill-downloads/git-commit-workflow-mrwake52/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/commit' && cp -R '.skill-downloads/git-commit-workflow-mrwake52' '.cursor/skills/commit'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/git-commit-workflow-mrwake52'openskills read 'git-commit-workflow-mrwake52'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/git-commit-workflow-mrwake52/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.