Awesome-omni-skill 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).
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/code-quality" ~/.claude/skills/diegosouzapw-awesome-omni-skill-code-quality-af8435 && rm -rf "$T"
manifest:
skills/development/code-quality/SKILL.mdsource content
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
- Determine the language of the file(s) to be reviewed:
- C++ (
,.cpp
).h - React/JavaScript/CSS (
,.jsx
,.js
).scss
- C++ (
- 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):
src/- Run Static Analysis: Execute the PlatformIO
command.checkplatformio check - Analyze the output for any reported defects, vulnerabilities, or performance issues.
For React/JavaScript Frontend (web/
directory):
web/- Check for ESLint setup:
- Look for an
file in the root or.eslintrc.*
directory.web/ - Check
for aweb/package.json
script.lint
- Look for an
- 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
and a standard configuration (e.g.,eslint
). Create a basiceslint-plugin-react
and add a.eslintrc.js
script tolint
.package.json
- If ESLint is configured:
- Execute the linting command.
npm run lint --prefix web - Analyze the output for any errors or warnings.
- Execute the linting command.
Step 3: Apply Automatic Formatting
After the deep analysis, apply standard code formatting for consistency.
For C++ Firmware:
- Formatting: If the project provides a formatting script (e.g.,
) or a documented process, use that. Otherwise, usescripts/format.sh
directly:clang-format
(Adjust the file pattern as needed for your project structure.)clang-format -i src/**/*.cpp src/**/*.h - If no formatting tool is available, inform the user and offer to help set up
with a standard configuration file (e.g.,clang-format
)..clang-format
For React/JavaScript Frontend:
npm run format --prefix web
(Note: If the
script doesn't exist, offer to set it up with Prettier.)format
Step 4: Report Findings and Suggestions
- Summarize Static Analysis Results: Report the critical findings from
orcppcheck
. For each issue, provide the file, line number, and a description of the problem.ESLint - Summarize Formatting: Mention that the code has been automatically formatted for consistency.
- Offer to Fix: Ask the user if they would like you to attempt to fix the issues found by the static analysis tools.