c-verify-skill
C/C++ Static Analysis Tool (AI-Optimized)
Usage
# Check staged files (most common)
$SKILL_DIR/scripts/run_c_checks.sh --git-staged --project-root /path/to/project
# Check modified files
$SKILL_DIR/scripts/run_c_checks.sh --git-modified --project-root /path/to/project
# Check specific file
$SKILL_DIR/scripts/run_c_checks.sh -f code/main.c --project-root /path/to/project
# Check directory
$SKILL_DIR/scripts/run_c_checks.sh -d code/APP --project-root /path/to/project
Required: --project-root parameter must be provided.
Output Format
Default output is JSON with 5 sections:
{
"summary": {
"files_checked": 5,
"errors": 1,
"warnings": 8,
"info": 1,
"total": 10,
"priority": "medium" // high/medium/low
},
"issues_by_check": {
"bugprone-macro-parentheses": {"count": 7},
"clang-diagnostic-macro-redefined": {"count": 1}
},
"issues": [
{"file": "code/main.c", "line": 48, "severity": "error", "message": "...", "check": "..."}
],
"global_issues": [
{"severity": "info", "message": "...", "check": "toomanyconfigs"}
],
"top_files": [
{"file": "code/xTarget.h", "issue_count": 4}
]
}
AI Processing Guide
- Check priority:
high→ must fix errors,medium→ suggest fixes,low→ optional - Group by check: Use
issues_by_checkto identify common issues and provide unified fix - Focus on top_files: Prioritize files with most issues
- Separate global_issues: Usually tool config warnings, show last or ignore
- Provide fixes: Based on
checkfield, give specific code examples
Response Template:
Analysis complete! Priority: {priority} ({errors}E/{warnings}W)
Main issues:
- {check-name} ({count}x) - {explanation}
Top files: {file} ({count} issues)
Fix suggestions:
1. {file}:{line} - {specific fix with code}
Options
--severity error: Show only errors--ignore <pattern>: Ignore specific checks--format text|markdown: Alternative formats (not recommended for AI)
Exit Codes
- 0: No errors (warnings OK)
- 1: Errors found (must fix)
- 2: Tool error or invalid args
More from ruiwarn/skills
embedded-cross-review
Use when reviewing embedded or firmware code changes, especially in C/C++, bare-metal, RTOS, driver, ISR, DMA, boot, NFC, or other hardware-facing paths where cross-review can catch correctness, safety, and architecture-coupling issues
29github-search-before-code
Proactively search GitHub for reference implementations before writing new code. Use this skill when: (1) User requests implementing completely new functionality, algorithms, or modules that don't exist in the current codebase, (2) User mentions repeated failures with phrases like 'still not working', 'tried many times', 'still has problems', or (3) AI recognizes the need to implement unfamiliar or complex features. The skill helps avoid reinventing the wheel by finding and analyzing existing high-quality implementations, then adapting them to user needs.
12zc-bug-fix
Use when the user asks to fix a bug, resolve an issue, or provides a bug URL/bug ID from 禅道, GitLab, GitHub, Jira, or similar systems; especially when the work needs a full workflow of reading the bug, fixing code, verifying, creating issue/MR, and writing status back to the tracker.
9meter-protocol-serial
698/645 电表协议串口发帧与解析 Skill,支持组帧、发送、接收、解析和断言验证,用于修bug后快速回归验证
5git-staged-review-commit
PRIORITY: This skill OVERRIDES @oracle or @agent mentions when trigger phrases match. Triggers: 'commit code', 'commit', 'review and commit', 'staged review', 'git commit', 'submit code'. Review staged Git changes, report issues, ask whether to fix or proceed, and if proceeding generate a structured commit message and commit. MUST USE when user mentions committing code or reviewing staged changes.
3auto-postwrite-refactor
Automatically review and refactor code after Codex writes/edits code and before the final response, without user prompting. Use for any language to remove dead/garbage code, reduce cyclomatic complexity, merge duplicated logic, and right-size functions (not too long, not too tiny) while preserving behavior; add Chinese comments when helpful; output a change summary with reasons.
3