arkts-syntax-assistant

Convert unsafe TypeScript patterns into compileable ArkTS code for .ets files.

83|7|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/SummerKaze/skill-arkts-syntax-assistant --skill arkts-syntax-assistant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arkts-syntax-assistant
Source: https://github.com/SummerKaze/skill-arkts-syntax-assistant/tree/main
Command: npx skills add https://github.com/SummerKaze/skill-arkts-syntax-assistant --skill arkts-syntax-assistant

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It helps developers and AI coding assistants avoid ArkTS syntax mistakes, migration pitfalls, and runtime-unsafe patterns when building HarmonyOS/OpenHarmony applications.

Core Features & Use Cases

  • Syntax Reference: Explain ArkTS declarations, types, functions, classes, generics, modules, null safety, and restricted language features.
  • TypeScript Migration: Convert common TS patterns such as indexed signatures, intersection types, constructor signatures, and object literals into ArkTS-safe alternatives.
  • Performance Guidance: Recommend ArkTS-friendly patterns for loops, arrays, functions, exceptions, and object layouts to improve runtime efficiency.
  • Error Recovery: Diagnose compile errors and provide corrected code for strict typing, object initialization, function signatures, and forbidden APIs.
  • Use Case: A developer paste-in of .ets code that uses any, globalThis, or unsupported object literals can be rewritten into valid ArkTS with clear alternatives.

Quick Start

Ask for an ArkTS-safe rewrite of your .ets code or migration issue and include the error message or snippet you want fixed.

Frequently Asked Questions about arkts-syntax-assistant

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

FAQPage Schema
How do I migrate TypeScript code with indexed signatures and object literals to ArkTS?

Migrating TypeScript to ArkTS involves transforming unsafe patterns like indexed signatures, intersection types, and object literals into compileable ArkTS-safe alternatives with strict typing constraints. This ensures your .ets files remain compliant with HarmonyOS runtime requirements.

What is the best way to fix ArkTS compile errors caused by using any and globalThis?

Fixing ArkTS compile errors requires replacing prohibited APIs and runtime-unsafe constructs like any and globalThis with valid, strictly typed ArkTS code. The assistant diagnoses the error and provides corrected code with official-style reference guidance.

Can I use standard TypeScript features like constructor signatures in HarmonyOS .ets files?

Standard TypeScript features like constructor signatures are restricted in HarmonyOS .ets files and will trigger compile errors. You must use ArkTS-safe alternatives that comply with strict typing constraints and avoid unsupported object initialization patterns.

How do I optimize ArkTS performance for loops, arrays, and functions?

Optimizing ArkTS performance involves applying ArkTS-friendly patterns for loops, arrays, functions, and object layouts to improve runtime efficiency. The assistant recommends specific structural changes to enhance execution speed in HarmonyOS applications.

Why does my OpenHarmony application fail to compile after adding state management components?

OpenHarmony applications fail to compile when state management component code violates ArkTS strict typing constraints or uses forbidden APIs. The assistant validates component code against prohibited constructs and provides corrected, compileable ArkTS snippets.