Comprehensive Code Review logo

Comprehensive Code Review

Organization
openharmonyinsight
comprehensive-code-review

Code review for ACE Engine (OpenHarmony ArkUI) covering C++/JS/TS/ArkTS. Analyzes 19+ dimensions: stability, performance, threading, security, memory, Modern C++ practices, SOLID principles, design patterns, robustness, testability, maintainability, observability, API design, technical debt, backward compatibility. Reports severity levels, refactoring suggestions, and ACE Engine checks (Pattern/Model/Property, component lifecycle, RefPtr/WeakPtr, four-layer architecture). Use when: reviewing PRs, analyzing code quality, enforcing standards, identifying technical debt, validating architecture, generating quality reports.

Overview

Publisheropenharmonyinsight
Repositoryopenharmony-skills
Skill namecomprehensive-code-review
Stars
36
Forks
7
Bundled files
9
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 9 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by openharmonyinsight on GitHub. Read the source before you install it.

Installation

Install the Comprehensive Code Review AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/comprehensive-code-review
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openharmonyinsight/openharmony-skills.git /tmp/openharmony-skills
mkdir -p .claude/skills
cp -r /tmp/openharmony-skills/skills/comprehensive-code-review .claude/skills/comprehensive-code-review
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Comprehensive Code Review in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Comprehensive Code Review on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Comprehensive Code Review is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Comprehensive Code Review for ACE Engine

Quick Start

Perform comprehensive code review analysis directly with AI:

"Review the code in frameworks/core/components_ng for memory management issues"

"Analyze this pull request focusing on security vulnerabilities"

"Check path/to/code.cpp for ACE Engine architecture compliance"

Review Workflow

Phase 1: Code Analysis

AI will analyze code across all relevant dimensions based on:

  1. Reading the code files - Understanding implementation details
  2. Applying reference standards - Using criteria from references/ directory
  3. Checking against ACE Engine patterns - Validating project-specific conventions

Phase 2: Dimension-Based Review

Review code across 19+ dimensions. See DIMENSIONS.md for complete coverage.

High-Priority Dimensions:

  • Security (CRITICAL) - Input validation, command injection, buffer overflows
  • Memory (CRITICAL) - Smart pointers, leaks, ownership semantics
  • Threading (HIGH) - Data races, deadlocks, callback safety
  • Stability (HIGH) - Error handling, boundary conditions

Medium-Priority Dimensions:

  • Performance - Algorithm complexity, optimization opportunities
  • SOLID Principles - Single responsibility, Open/Closed, etc.
  • Code Smells - Long methods, large classes, duplicate code
  • Testability - Dependency injection, decoupling

Phase 3: Report Generation

AI generates comprehensive review report including:

  • Executive Summary - Issue counts by severity
  • Critical Issues (🔴) - Must fix before merge
  • High Priority Issues (🟠) - Should fix before merge
  • Medium Priority Issues (🟡) - Fix soon
  • Low Priority Issues (🟢) - Nice to have
  • Dimension Breakdown - Issues grouped by category
  • File-by-File Details - Specific line numbers and code snippets
  • Recommendations - Prioritized action items with before/after examples
  • Review Checklist - Pre-merge verification

Dimension Reference

Quick reference to all dimensions:

DimensionFocusSeverity LevelsReference
StabilityError handling, boundaries🔴🟠🟡🟢STABILITY.md
PerformanceAlgorithms, optimization🔴🟠🟡🟢DIMENSIONS.md
ThreadingConcurrency, synchronization🔴🟠🟡DIMENSIONS.md
SecurityInput validation, vulnerabilities🔴🟠🟡SECURITY.md
MemorySmart pointers, leaks🔴🟠🟡MEMORY.md
Modern C++C++11/14/17/20 features🟠🟡DIMENSIONS.md
Effective C++RAII, Rule of Five🟠🟡DIMENSIONS.md
Code Smells22 types of smells🟠🟡CODE_SMELLS.md
SOLIDDesign principles🟠🟡SOLID.md
Design PatternsPattern usage🟡🟢DIMENSIONS.md
RobustnessFault tolerance🟠🟡DIMENSIONS.md
TestabilityDependency injection🟠🟡DIMENSIONS.md
MaintainabilityCode complexity🟡🟢DIMENSIONS.md
ObservabilityLogging, monitoring🟡🟢DIMENSIONS.md
API DesignInterface quality🟠🟡DIMENSIONS.md
Technical DebtTODO/FIXME tracking🟡🟢DIMENSIONS.md
Backward CompatibilityAPI stability🟠🟡DIMENSIONS.md
ArchitectureACE Engine compliance🔴🟠🟡ACE_ENGINE_SPECIFIC.md

ACE Engine Specific Checks

Architecture Validation

Four-Layer Architecture:

Frontend Bridge Layer
    ↓
Component Framework Layer (Pattern/Model/Property)
    ↓
Layout/Render Layer
    ↓
Platform Adapter Layer (OHOS/Preview)

Check:

  • No violations of layer boundaries
  • Proper use of Pattern/Model/Property separation
  • No direct platform calls from framework layer

Component Structure

components_ng/pattern/<component>/
├── *_pattern.h/cpp         # Business logic & lifecycle
├── *_model.h/cpp           # Data model interface
├── *_layout_property.h/cpp # Layout properties
├── *_paint_property.h/cpp  # Render properties
└── *_event_hub.h/cpp       # Event handling

RefPtr Usage

cpp
// ✅ Creation
auto node = AceType::MakeRefPtr<FrameNode>();

// ✅ Type-safe casting
auto pattern = AceType::DynamicCast<MenuPattern>(node->GetPattern());
if (!pattern) {
    LOGE("Failed to get pattern");
    return false;
}

// ✅ Breaking cycles with WeakPtr
class Child {
    WeakPtr<Parent> parent_;  // Use weak, not strong
};

// ✅ Safe callbacks
auto weak = AceType::WeakClaim(this);
PostTask([weak]() {
    auto pattern = AceType::DynamicCast<MenuPattern>(weak.Upgrade());
    if (pattern) pattern->Update();
});

Naming Conventions

cpp
class MenuPattern {           // PascalCase
public:
    void OnModifyDone();      // PascalCase
    int GetWidth() const;     // Get prefix

private:
    int width_;               // snake_case_ with trailing underscore
    std::string component_id_;  // Abbreviations lowercase
};

constexpr int MAX_MENU_ITEMS = 100;  // UPPER_CASE

Severity Levels

🔴 CRITICAL - Must fix before merge

  • Security vulnerabilities (command injection, buffer overflow)
  • Memory leaks in long-running processes
  • Use-after-free, double-free
  • Data races
  • Crashes / undefined behavior
  • Architecture violations

🟠 HIGH - Should fix before merge

  • Performance degradation
  • API violations
  • SOLID principle violations
  • Major code smells (Large Class, Shotgun Surgery)
  • Improper RefPtr usage
  • Unsafe callback captures

🟡 MEDIUM - Fix soon

  • Minor performance issues
  • Code smells (Long Method, Duplicate Code)
  • Style violations
  • Missing error handling in non-critical paths

🟢 LOW - Nice to have

  • Missing comments
  • Minor style issues
  • Optimization opportunities
  • Code documentation improvements

Common Issue Patterns

PatternDimensionSeverityDetection
Raw pointer instead of RefPtrMemoryHIGHnew T() without RefPtr
Command injectionSecurityCRITICALsystem(user_input)
Buffer overflowSecurityCRITICALstrcpy(), sprintf()
Unsafe this captureThreadingHIGH[this] in PostTask
Long method (>50 lines)Code SmellMEDIUMFunction length
Large class (>500 lines)Code SmellHIGHClass size
Missing null checkStabilityHIGHPointer use without validation
static_cast instead of DynamicCastMemoryMEDIUMstatic_cast<T*>

Usage Examples

Review a Pull Request

"Review the changes in this PR with focus on memory management and threading safety"

AI will:

  • Analyze all changed files
  • Check memory management (RefPtr, WeakPtr, raw pointers)
  • Verify threading safety (callback captures, PostTask usage)
  • Report issues with line numbers and severity

Security Audit

"Perform a security audit of path/to/code, focusing on input validation and potential vulnerabilities"

AI will check for:

  • Command injection risks (system() calls)
  • Buffer overflow vulnerabilities (strcpy, sprintf)
  • Unvalidated user input
  • Unsafe type casts

Memory Leak Detection

"Analyze frameworks/core/components for potential memory leaks and improper RefPtr usage"

AI will identify:

  • Raw new/delete without smart pointers
  • Circular references without WeakPtr
  • Missing null checks after DynamicCast
  • Improper ownership semantics

Architecture Compliance Check

"Verify that components_ng/menu follows the four-layer architecture and Pattern/Model/Property separation"

AI will validate:

  • Four-layer architecture compliance
  • Pattern/Model/Property separation
  • No layer boundary violations
  • Component lifecycle methods (OnModifyDone, etc.)

Integration Examples

Pre-commit Hook

For pre-commit hooks, consider using traditional static analysis tools:

bash
#!/bin/bash
# .git/hooks/pre-commit

CHANGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(cpp|cc|cxx|h|hpp|ts|tsx)$')

if [ -n "$CHANGED_FILES" ]; then
    echo "Running basic static analysis..."
    # Use clang-tidy, cppcheck, eslint, etc.
    for file in $CHANGED_FILES; do
        if [[ $file == *.cpp || $file == *.h ]]; then
            clang-tidy $file --checks='*' || true
        elif [[ $file == *.ts ]]; then
            eslint $file || true
        fi
    done
fi

Manual Review Workflow

For comprehensive AI-powered review:

  1. Identify code to review (PR, specific files, directory)
  2. Request review with specific focus areas
  3. AI analyzes code using reference standards
  4. Review results with severity-tagged issues
  5. Address critical and high-priority issues
  6. Re-request review for verification

References

Detailed documentation for all dimensions in references/:

Assets

Review Checklist

Before merging code:

Code Quality:

  • No CRITICAL issues
  • HIGH priority issues addressed or documented
  • No compiler warnings
  • Static analysis clean

Architecture:

  • Four-layer architecture respected
  • Proper Pattern/Model/Property separation
  • No layer boundary violations

Memory:

  • No memory leaks
  • RefPtr used correctly
  • WeakPtr used to break cycles
  • Callbacks use WeakClaim

Security:

  • All input validated
  • No command injection
  • No buffer overflows
  • Sensitive data protected

Testing:

  • Unit tests added
  • Edge cases covered
  • Error scenarios tested

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Comprehensive Code Review AI skill do?

Code review for ACE Engine (OpenHarmony ArkUI) covering C++/JS/TS/ArkTS. Analyzes 19+ dimensions: stability, performance, threading, security, memory, Modern C++ practices, SOLID principles, design patterns, robustness, testability, maintainability, observability, API design, technical debt, backward compatibility. Reports severity levels, refactoring suggestions, and ACE Engine checks (Pattern/Model/Property, component lifecycle, RefPtr/WeakPtr, four-layer architecture). Use when: reviewing PRs, analyzing code quality, enforcing standards, identifying technical debt, validating architectur...

Why use Comprehensive Code Review on TypingMind?

Because you install it once and use it with any model. Comprehensive Code Review is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Comprehensive Code Review in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/comprehensive-code-review. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Comprehensive Code Review?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Comprehensive Code Review?

As many as you like. As long as a model supports skills, you can use Comprehensive Code Review with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Comprehensive Code Review AI skill free?

It is published on GitHub by openharmonyinsight. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇