code-checker_skill

This skill scans C/C++ codebases for size and circular dependency issues, analyzes maintainability, and reports actionable findings to guide refactoring.
  • Python

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill openharmonyinsight/openharmony-skills --skill code-checker

  • SKILL.md3.0 KB

Overview

This skill scans C and C++ codebases to find maintainability problems like oversized files and functions and circular dependencies between modules. It supports scanning single files or entire directories with configurable thresholds and can output a concise report. Use it to prioritize refactors and quickly spot code smells that increase technical debt.

How this skill works

The scanner counts effective lines (excluding blanks, comments, and preprocessor lines) to flag files and functions that exceed configurable thresholds. It also parses include relationships and GN build files to group code into directory modules and detect circular include chains. Results are presented as a report with prioritized findings and optional output file support.

When to use it

  • You want to find files or functions that are too large to maintain or test easily.
  • You suspect or want to prevent circular dependencies between directory-level modules.
  • Before a major refactor to identify high-impact targets.
  • During code health reviews or CI checks to enforce maintainability thresholds.
  • When onboarding to understand hotspots in a legacy C/C++ codebase.

Best practices

  • Start with default thresholds (files: 2000 effective lines, functions: 50 effective lines) and tune for your codebase.
  • Scan whole directories for module-level dependency analysis; scan single files for quick size checks.
  • Prioritize fixes by impact: largest files/functions and cycles that block modularization.
  • Use verbose or output-file options to generate artifacts for code-review and tracking.
  • Combine results with manual code reading before applying refactors; automated rules guide but don’t replace context.

Example use cases

  • Run a full project scan to produce a size_report.md and circular_report.md before a release.
  • Check a suspicious file to see if any functions exceed the configured function threshold.
  • Detect and visualize circular header dependencies that prevent safe modularization.
  • Integrate size checks into CI to fail builds when new code introduces oversized functions.
  • Triage a legacy module by listing largest files and functions to create a phased refactor plan.

FAQ

C and C++ source and header extensions (.c, .cpp, .cc, .cxx, .h, .hpp, .inl, .inc, etc.).

Can I change thresholds?

Yes. File and function size thresholds are configurable via command options for tailored analysis.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational