One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill compile-analysis-openharmonyinsight
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: compile-analysis
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/compile-analysis
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill compile-analysis-openharmonyinsight

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the problem of identifying why a specific source file compiles slowly by measuring real compile time and peak memory, then mapping which header dependencies drive that cost.

Core Features & Use Cases

  • Compilation efficiency metrics: Measures elapsed compile time and peak memory from an actual isolated build run (no guessing).
  • Header dependency visualization: Parses the generated .ii output to produce a hierarchical include dependency tree for the analyzed file.
  • Reusable benchmark scripts: Generates standalone enhanced compile scripts you can re-run multiple times for before/after performance comparisons.
  • Use Case: When a hot or suspicious .cpp causes slow CI or developer iteration, run this skill on that file to quantify time/memory and pinpoint deep or broad include chains for optimization.

Quick Start

Run the skill from the ACE Engine workspace to analyze a file: ask the AI to “analyze compilation efficiency for frameworks/core/components_ng/base/frame_node.cpp with product rk3568”.

Frequently Asked Questions about compile-analysis

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

FAQPage Schema
How do I measure single-file compile time and peak memory for OpenHarmony ACE Engine?

To measure single-file compile time, the skill extracts real compile commands and executes an isolated build run in the out/{product} directory, capturing elapsed time and peak memory metrics for the specific OpenHarmony ACE Engine .cpp file.

How does header include dependency visualization work for slow compiling C++ files?

Header include dependency visualization works by parsing generated .ii preprocessed files using the built-in parse_ii.py script, producing a hierarchical dependency tree that maps which headers drive the compilation cost for the analyzed file.

How do I find compilation bottlenecks in a specific .cpp source file?

To find compilation bottlenecks in a specific .cpp file, the skill measures real compile time and peak memory from an isolated build run and visualizes deep or broad header include chains that cause slow builds or recompilation costs.

Can I use standalone benchmark scripts to validate build optimization results?

Yes, you can use standalone benchmark scripts to validate build optimization results. The skill generates reusable enhanced compile scripts that you can re-run multiple times for accurate before and after performance comparisons.

Do I need a specific OpenHarmony product configuration to analyze ACE Engine compilation efficiency?

Yes, you need a specific OpenHarmony product configuration. The skill executes enhanced compilation directly in the out/{product} directory, requiring you to specify a target product such as rk3568 when analyzing ACE Engine compilation efficiency.