pre-commit-check

Verify EmbodiChain Python code against pre-commit CI rules.

206|20|Updated Oct 24, 2025
One-click install
npx skills add https://github.com/DexForce/EmbodiChain --skill pre-commit-check-dexforce
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit-check
Source: https://github.com/DexForce/EmbodiChain/tree/main/skills/pre-commit-check
Command: npx skills add https://github.com/DexForce/EmbodiChain --skill pre-commit-check-dexforce

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents failed commits and PRs by running the same style, header, annotation, export, and docstring checks that the CI pipeline enforces.

Core Features & Use Cases

  • Enforces code style with a Black formatting gate that mirrors CI behavior.
  • Validates licensing and module hygiene by checking the required Apache 2.0 header, presence of from __future__ import annotations, and correctness of __all__ exports in public modules.
  • Improves API quality and maintainability by requiring Google-style docstrings, type annotations, and correct @configclass usage for configuration classes.
  • Supports reliability by verifying that new public modules/functions include corresponding tests with the same header requirements.

Quick Start

Run the pre-commit-check skill before committing or creating a PR, especially after you change any .py files, to produce a local pass/fail summary aligned with CI.

Frequently Asked Questions about pre-commit-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run pre-commit checks locally before pushing Python code changes?

Run pre-commit checks locally before pushing to verify Python code against CI rules, producing a pass/fail summary that catches formatting, docstring, and API contract regressions early.

Why does my CI pipeline fail after I add new Python modules without tests?

CI fails because pre-commit checks require new public Python modules and functions to have corresponding tests with the correct Apache 2.0 file headers to ensure reliability.

How do I enforce Black formatting and type annotations before a git commit?

Enforce Black formatting and type annotations before a commit by running pre-commit checks that gate your code, validating style, Google-style docstrings, and `__all__` exports.

What CI checks are required for Python code style and module hygiene?

Required CI checks for Python code style include Black formatting, Apache 2.0 file headers, `from __future__ import annotations`, valid `__all__` exports, and correct `@configclass` usage.

Does this pre-commit check work without any external dependencies?

Yes, the pre-commit check runs without external dependencies, directly validating your Python code changes against the repository's established CI rules.

When do I need to run pre-commit checks during my development workflow?

Run pre-commit checks during workflow moments like before commits or pull requests, especially after you modify or add any `.py` files across the project.