pre-commit

Run configured lint and syntax checks on staged files before commits.

11|1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill pre-commit-mindcockpit-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pre-commit
Source: https://github.com/mindcockpit-ai/cognitive-core/tree/main/core/skills/pre-commit
Command: npx skills add https://github.com/mindcockpit-ai/cognitive-core --skill pre-commit-mindcockpit-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Run configured lint and syntax checks on staged or specified files before committing.

Core Features & Use Cases

  • Lint and syntax checks on staged files or specified files before commit.
  • Uses CC_LINT_COMMAND and CC_LINT_EXTENSIONS from cognitive-core.conf to drive linting.
  • Optional format checks via CC_FORMAT_COMMAND for consistent formatting.

Quick Start

Run the pre-commit checks on staged files using the lint command configured in cognitive-core.conf.

Frequently Asked Questions about pre-commit

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

FAQPage Schema
How do I run lint and syntax checks on staged files before a git commit?

You can run lint checks on specified files before committing by applying this Skill to your development workflow. It enforces the lint command configured in cognitive-core.conf via CC_LINT_COMMAND and CC_LINT_EXTENSIONS to ensure code quality locally or in CI.

What is the best way to automate code quality checks before committing code?

Automating code quality checks before committing is handled by running this Skill across your staged files. It enforces your configured lint and syntax validation commands, preventing problematic code from entering the repository in both local and CI environments.

Does this pre-commit check work with my existing lint configuration?

Yes, this pre-commit check integrates with your existing lint setup by reading CC_LINT_COMMAND and CC_LINT_EXTENSIONS from cognitive-core.conf. It uses these configurations to drive lint and syntax checks on your staged or specified files.

Can I enforce format checks in addition to lint checks before committing?

You can enforce format checks in addition to lint checks before committing by utilizing the CC_FORMAT_COMMAND setting. This optional configuration ensures consistent formatting alongside the required syntax and lint validations on your staged files.

How do I run pre-commit checks across multiple programming languages?

To run pre-commit checks across multiple languages, the Skill applies your configured lint commands to the staged files based on specified extensions. It uses CC_LINT_EXTENSIONS from cognitive-core.conf to target and validate the appropriate files in your project.