code-quality

A protocol for performing a deep code quality analysis using static analysis tools and formatting. It covers C++ (cppcheck) and React/JavaScript (ESLint).

16 stars

Best use case

code-quality is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

A protocol for performing a deep code quality analysis using static analysis tools and formatting. It covers C++ (cppcheck) and React/JavaScript (ESLint).

Teams using code-quality should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/code-quality/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/code-quality/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/code-quality/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How code-quality Compares

Feature / Agentcode-qualityStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

A protocol for performing a deep code quality analysis using static analysis tools and formatting. It covers C++ (cppcheck) and React/JavaScript (ESLint).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

## Agentic Command: /check

When the user writes `/check` in chat, immediately trigger the full code-quality protocol below, without further confirmation. This command acts as a shortcut for a comprehensive code review and static analysis. The agent should proceed automatically, applying all steps unless the user specifies otherwise.

---
## Agentic Code Analysis and Quality Protocol

As an AI assistant, your goal is to perform a comprehensive code quality check using industry-standard tools. When asked to "review the code," "check for bugs," or "improve code quality," follow this protocol.

### Step 1: Identify File Type and Scope

1.  Determine the language of the file(s) to be reviewed:
    *   C++ (`.cpp`, `.h`)
    *   React/JavaScript/CSS (`.jsx`, `.js`, `.scss`)
2.  Ask the user if you should apply formatting changes directly or just provide suggestions.

### Step 2: Run Static Analysis

This is the core of the code review. Run the appropriate tool to find bugs, vulnerabilities, and code smells.

#### For C++ Firmware (`src/` directory):

1.  **Run Static Analysis:** Execute the PlatformIO `check` command.
    ```bash
    platformio check
    ```
2.  Analyze the output for any reported defects, vulnerabilities, or performance issues.

#### For React/JavaScript Frontend (`web/` directory):

1.  **Check for ESLint setup:**
    *   Look for an `.eslintrc.*` file in the root or `web/` directory.
    *   Check `web/package.json` for a `lint` script.
2.  **If ESLint is not configured:**
    *   Inform the user that ESLint is not set up.
    *   Ask for permission to set it up: "I've noticed ESLint isn't configured for the frontend code. It's a powerful tool for finding bugs. Would you like me to set it up for you?"
    *   If yes, proceed to install `eslint` and a standard configuration (e.g., `eslint-plugin-react`). Create a basic `.eslintrc.js` and add a `lint` script to `package.json`.
3.  **If ESLint is configured:**
    *   Execute the linting command.
        ```bash
        npm run lint --prefix web
        ```
    *   Analyze the output for any errors or warnings.

### Step 3: Apply Automatic Formatting

After the deep analysis, apply standard code formatting for consistency.

#### For C++ Firmware:

1. **Formatting:** If the project provides a formatting script (e.g., `scripts/format.sh`) or a documented process, use that. Otherwise, use `clang-format` directly:
    ```bash
    clang-format -i src/**/*.cpp src/**/*.h
    ```
    *(Adjust the file pattern as needed for your project structure.)*
2. If no formatting tool is available, inform the user and offer to help set up `clang-format` with a standard configuration file (e.g., `.clang-format`).

#### For React/JavaScript Frontend:
```bash
npm run format --prefix web
```
*(Note: If the `format` script doesn't exist, offer to set it up with Prettier.)*

### Step 4: Report Findings and Suggestions

1.  **Summarize Static Analysis Results:** Report the critical findings from `cppcheck` or `ESLint`. For each issue, provide the file, line number, and a description of the problem.
2.  **Summarize Formatting:** Mention that the code has been automatically formatted for consistency.
3.  **Offer to Fix:** Ask the user if they would like you to attempt to fix the issues found by the static analysis tools.

Related Skills

checking-quality

16
from diegosouzapw/awesome-omni-skill

Ensures code quality through comprehensive checks including TDD practices, lint/test/build validation, and prevention of common mistakes. Use after completing implementations, fixing bugs, refactoring, or before committing code.

bio-read-qc-quality-reports

16
from diegosouzapw/awesome-omni-skill

Generate and interpret quality reports from FASTQ files using FastQC and MultiQC. Assess per-base quality, adapter content, GC bias, duplication levels, and overrepresented sequences. Use when performing initial QC on raw sequencing data or validating preprocessing results.

atft-code-quality

16
from diegosouzapw/awesome-omni-skill

Enforce lint, formatting, typing, testing, and security hygiene across the ATFT-GAT-FAN codebase.

assessing-architecture-quality

16
from diegosouzapw/awesome-omni-skill

Use when assessing codebase architecture and you feel pressure to soften critique, lead with strengths, or frame problems diplomatically - provides evidence-based critical assessment resisting relationship and economic pressures

architecture-quality-assess

16
from diegosouzapw/awesome-omni-skill

Converted Claude skill for architecture-quality-assess. Use when Codex should run the converted architecture-quality-assess workflow.

aposd-maintaining-design-quality

16
from diegosouzapw/awesome-omni-skill

Enforce strategic programming discipline when modifying existing code. Guide through STOP-ASK-DECIDE-VERIFY workflow with urgency tier assessment (trivial/minor/standard/emergency). Include when NOT to refactor (Chesterton's Fence, performance-critical, no tests) and block tactical shortcuts via anti-rationalization tables. Use when fixing bugs, extending features, or tempted to make quick fixes. Triggers on: modify code, fix bug, extend feature, quick fix, tactical change.

agentic-jumpstart-code-quality

16
from diegosouzapw/awesome-omni-skill

Code quality guidelines for Jarvy CLI - Rust formatting, Clippy linting, error handling patterns, documentation standards, and Conventional Commits.

data-quality-frameworks

16
from diegosouzapw/awesome-omni-skill

Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.

51-execute-quality-150

16
from diegosouzapw/awesome-omni-skill

[51] EXECUTE. Commitment to maximum quality work with 150% coverage. Use when you need the highest quality output for critical tasks, complex problems, important decisions, or when standard work isn't enough. Triggers on "maximum quality", "150% mode", "full quality", "critical task", or when you explicitly want AI to work at its best.

ai-content-quality-checker

16
from diegosouzapw/awesome-omni-skill

AI生成コンテンツの総合品質チェックスキル。読みやすさ、正確性、関連性、独自性、SEO、アクセシビリティ、エンゲージメント、文法・スタイルを多角的に評価。

1k-code-quality

16
from diegosouzapw/awesome-omni-skill

Code quality standards for OneKey. Use when fixing lint warnings, running pre-commit tasks, handling unused variables, writing comments, or ensuring code quality. All comments must be in English. Triggers on lint, linting, eslint, oxlint, tsc, type check, unused variable, comment, documentation, spellcheck, code quality, pre-commit, yarn lint.

Verification & Quality Assurance

16
from diegosouzapw/awesome-omni-skill

Comprehensive truth scoring, code quality verification, and automatic rollback system with 0.95 accuracy threshold for ensuring high-quality agent outputs and codebase reliability.