code-checker

Scans C/C++ codebases for oversized files, functions, and circular GN build dependencies.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill code-checker
Or copy as Structured Prompt for Agentโ–ผ
Please help me install this Agent Skill.
Skill: code-checker
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/code-checker
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill code-checker

SYSTEM DOCUMENTATION & REQUIREMENTS

๐Ÿ’ก This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

It helps you detect maintainability risks in C/C++ projects by identifying oversized files and functions and by exposing circular dependencies between directory modules that can slow builds and increase refactoring cost.

Core Features & Use Cases

  • Large file analysis: Flags translation units and headers that exceed configurable effective-line thresholds, making them hard to navigate and review.
  • Large function analysis: Finds functions whose effective line counts exceed thresholds, highlighting candidates for decomposition and simplification.
  • Circular dependency detection: Parses GN build metadata and local includes to detect dependency cycles between directory-based modules, then generates a markdown report.
  • Use case: When onboarding or before a refactor, scan a moduleโ€™s directory to quickly pinpoint the largest maintainability hotspots and the architectural cycles to fix first.

Quick Start

Run the C/C++ code checker on your target directory or file to produce a markdown report of large files/functions and any detected circular dependencies.

Frequently Asked Questions about code-checker

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

FAQPage Schema
How do I find oversized C++ files and functions for a maintainability audit?โ–ผ

To find oversized C++ files and functions, you can scan your codebase using configurable effective-line thresholds. This flags translation units, headers, and functions that exceed size limits, generating a markdown report of maintainability hotspots.

What's the best way to detect circular dependencies between C++ directory modules?โ–ผ

Detecting circular dependencies involves parsing GN build metadata and local header includes to map the dependency graph. This process identifies dependency cycles between directory-based modules and outputs a markdown report for troubleshooting.

Can I run code size analysis on a project without GN build files?โ–ผ

Running code size analysis without GN build files limits functionality. The circular dependency detection specifically parses GN build metadata to map includes, so projects without GN files will only support standalone size threshold checks for oversized files and functions.

How do I identify refactoring targets in a large C/C++ codebase?โ–ผ

To identify refactoring targets in a large C/C++ codebase, scan for oversized files and functions exceeding effective line count thresholds. This highlights maintainability risks and candidates for decomposition before you begin restructuring.

Does circular dependency detection work with system or external includes?โ–ผ

Circular dependency detection does not work with system or external includes. It specifically analyzes local header includes combined with GN build metadata to identify dependency cycles strictly between internal directory-based modules.