Everything Claude Code Adds Full HarmonyOS Support: AI Coding for ArkTS with V2 Standards & Automated Rules
Everything Claude Code now provides comprehensive HarmonyOS development support with a dedicated agent, ArkTS syntax rules, automated hooks, and project templates that enforce V2 state management, Navigation routing, and security best practices for AI-assisted coding.
What Is Everything Claude Code?
Everything Claude Code (ECC) is a GitHub project with over 180,000 stars, built by the Anthropic hackathon champion team. After nearly a year of production hardening, it is the most popular configuration-enhancement framework for Claude Code — Anthropic's official AI coding assistant. ECC is not a standalone AI tool; it is an "advanced modification kit" that equips Claude Code with 58+ professional sub-agents covering planning, architecture, development, testing, and security auditing; 220+ skills spanning mainstream languages and frameworks; automated hooks for code-quality and security checks; and 70+ slash commands that trigger complete workflows.
HarmonyOS Support: A Complete AI Development Standard
The newly merged HarmonyOS support — contributed by the author — delivers a full toolkit covering development standards, agents, coding guides, and testing guides. It is now on ECC's main branch and available to all users.
1. HarmonyOS-Specific Agent: harmonyos-app-resolver
This expert agent acts like a senior HarmonyOS developer, enforcing the latest standards throughout the AI coding process.
Strict Technology-Stack Constraints
State Management: ArkUI V2 only. The agent mandates @ComponentV2, @Local, @Param, @Event and other V2 decorators, while automatically intercepting legacy V1 decorators ( @Component, @State, @Prop) and prompting migration.
Routing: Navigation component only. It enforces the new Navigation + NavPathStack scheme and blocks the old @ohos.router API, recommending migration to the latest approach.
ArkTS Syntax Expertise
ArkTS is a strict subset of TypeScript; many TS constructs are invalid in ArkTS, a common pitfall for AI coders. The agent embeds complete ArkTS syntax constraints to prevent compilation errors:
Prohibits any / unknown types, requiring explicit type declarations.
Bans function expressions; enforces arrow functions.
Disallows dynamic property access; requires dot notation.
Forbids destructuring assignment, with statements, and other unsupported syntax.
Enforces proper import/export conventions, avoiding CommonJS-style require.
End-to-End Development Assistant
Auto-checks API version compatibility and permission declarations.
Mandates $r() for resource references, eliminating hard-coded values.
Automatically handles multi-language i18n and dark-theme adaptation.
Triggers a build verification after every code change to ensure compilability.
2. Complete ArkTS Rule Set
Beyond the agent, ECC supplies a full ArkTS rule collection that loads into Claude's system prompt, guiding AI behavior without repeated reminders.
coding-style.md — Complete ArkTS coding-style guide: naming conventions, formatting, syntax constraints.
patterns.md — HarmonyOS best practices: V2 state-management patterns, Navigation routing patterns, MVVM architecture, animation performance optimization.
hooks.md — Automated build hooks: detects hvigor build flow, ohpm package management, intercepts V1 decorator usage.
security.md — HarmonyOS security guide: permission management, HUKS key storage, input validation, network security.
testing.md — HarmonyOS testing guide: Hypium unit tests, UI tests, TDD workflow, requires ≥80% test coverage.
3. Project-Level CLAUDE.md Template
ECC includes a ready-to-use HarmonyOS project CLAUDE.md template. Place it in the project root and Claude automatically recognizes the project as HarmonyOS, loading all corresponding rules and agents. The template pre-configures:
HarmonyOS technology-stack constraints
Code organization standards
Build and verification commands
Testing and security requirements
Project directory structure conventions
Available slash commands
Installation & Usage
Step 1: Install ECC Plugin
# Add plugin marketplace
/plugin marketplace add affaan-m/everything-claude-code
# Install pluginStep 2: Install HarmonyOS-Specific Rules
# Clone repository
git clone https://github.com/affaan-m/everything-claude-code.git
cd everything-claude-code
# Install dependencies (choose your package manager)
npm install # or: pnpm install | yarn install | bun install
# Plugin install path: copy rules only
mkdir -p ~/.claude/rules
cp -R rules/common ~/.claude/rules/
cp -R rules/harmonyos ~/.claude/rules/Step 3: Configure Your HarmonyOS Project
cp ~/.claude/rules/harmonyos/CLAUDE.md ./CLAUDE.mdThen customize the template with your project description, target devices, API level, etc.
Step 4: Start Coding
When you chat with Claude inside this HarmonyOS project, it will automatically:
Recognize the HarmonyOS project and load all ArkTS rules.
Invoke the HarmonyOS-specific agent for your requests.
Produce fully compliant code, avoiding syntax errors.
Check V1/V2 state management, routing, and other standards.
Real-World Scenarios
Scenario 1: New Page Development
Prompt:
帮我开发一个用户信息页面,包含用户头像、昵称、手机号,还有一个修改按钮Claude automatically:
Creates the component with @ComponentV2.
Manages local state via @Local.
Uses Navigation for page transitions.
References all resources through $r().
Adds dark-theme adaptation.
Runs the build command to verify the result.
No manual reminders about HarmonyOS conventions are needed.
Scenario 2: Code Review
Run /code-review. The HarmonyOS review agent automatically:
Flags any V1 state-management code and suggests migration.
Detects legacy router usage and recommends upgrading.
Verifies complete permission declarations.
Checks for hard-coded resources.
Scans for security risks such as hard-coded secrets.
Validates test coverage meets the ≥80% threshold.
Scenario 3: Test-Driven Development
Run /tdd 帮我开发一个用户信息验证的工具函数. Claude will:
Write Hypium unit tests first.
Implement the feature code.
Run tests automatically.
Ensure coverage exceeds 80%.
Guarantee all code follows ArkTS syntax rules.
Scenario 4: Fix Build Errors
Run /build-fix. The HarmonyOS build-fix agent:
Analyzes build error logs.
Locates ArkTS syntax errors.
Auto-fixes unsupported syntax.
Resolves API compatibility issues.
Re-runs the build to verify the fix.
Why This Matters for HarmonyOS Developers
The HarmonyOS ecosystem is growing rapidly, and more developers are adopting AI coding. Generic AI tools often lack HarmonyOS awareness:
They confuse ArkTS with TypeScript, producing uncompilable code.
They recommend outdated V1 state management and legacy routing.
They ignore HarmonyOS security norms, permission models, and resource referencing.
ECC's HarmonyOS support solves these gaps:
Out-of-the-box: No manual rule configuration required.
Continuous updates: Evolves with the HarmonyOS ecosystem, always reflecting latest best practices.
Full-process coverage: AI assistance across development, testing, and review.
Team standardization: Unified AI development standards ensure consistent code quality.
Summary
Everything Claude Code's HarmonyOS support is a milestone for AI-assisted HarmonyOS development. It fuses the most advanced AI coding toolchain with HarmonyOS development standards, enabling the most efficient way to build HarmonyOS apps. If you are a HarmonyOS developer using Claude Code, installing this plugin is highly recommended — it will transform your productivity and turn AI into a true development partner instead of an assistant that writes broken code.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
51CTO HarmonyOS Developer Community
The HarmonyOS Developer Community is a learning-oriented community for developers to learn, communicate, ask questions, and share.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
