arkts-coding-standard — how to use arkts-coding-standard how to use arkts-coding-standard, what is arkts-coding-standard, arkts-coding-standard vs TypeScript, arkts-coding-standard install, arkts-coding-standard setup guide for HarmonyOS, arkts-coding-standard best practices, arkts-coding-standard alternative for efficient coding, arkts-coding-standard tutorial for beginners, arkts-coding-standard documentation, arkts-coding-standard examples

v1.0.0
GitHub

About this Skill

Perfect for HarmonyOS Developers needing strict typing and performance optimizations in ArkTS code. arkts-coding-standard is a set of guidelines and validation rules for writing efficient and correct ArkTS code, emphasizing strict typing and performance optimizations.

Features

Enforces strict typing to prevent the use of Any/Unknown Types
Validates against illegal practices, such as Object Literal Types
Provides guidelines for performance optimizations in HarmonyOS development
Supports the development of efficient and correct ArkTS code
Helps avoid common pitfalls, such as using forbidden type annotations
Promotes best practices for ArkTS coding, including the avoidance of discouraged patterns

# Core Topics

imansmallapple imansmallapple
[0]
[0]
Updated: 3/10/2026

Quality Score

Top 5%
33
Excellent
Based on code quality & docs
Installation
SYS Universal Install (Auto-Detect)
> npx killer-skills add imansmallapple/app-StrayPet/arkts-coding-standard
Supports 18+ Platforms
Cursor
Windsurf
VS Code
Trae
Claude
OpenClaw
+12 more

Agent Capability Analysis

The arkts-coding-standard MCP Server by imansmallapple is an open-source Community integration for Claude and other AI agents, enabling seamless task automation and capability expansion. Optimized for how to use arkts-coding-standard, what is arkts-coding-standard, arkts-coding-standard vs TypeScript.

Ideal Agent Persona

Perfect for HarmonyOS Developers needing strict typing and performance optimizations in ArkTS code.

Core Value

Empowers agents to enforce strict typing and performance optimizations in ArkTS code, utilizing guidelines for HarmonyOS development and validating against forbidden practices like Any/Unknown Types and Object Literal Types.

Capabilities Granted for arkts-coding-standard MCP Server

Enforcing strict typing in ArkTS projects
Optimizing performance in HarmonyOS applications
Validating ArkTS code against discouraged practices

! Prerequisites & Limits

  • Requires ArkTS and HarmonyOS development environment
  • Limited to TypeScript-based projects
Project
SKILL.md
2.4 KB
.cursorrules
1.2 KB
package.json
240 B
Ready
UTF-8

# Tags

[No tags]
SKILL.md
Readonly

ArkTS Coding Standards

This skill provides guidelines and validation for writing correct ArkTS code, focusing on strict typing and performance optimizations required for HarmonyOS development.

❌ Illegal / Discouraged Practices

The following patterns are forbidden or highly discouraged in ArkTS:

  1. Any/Unknown Types:

    typescript
    1let x: any = 1; // ❌ Not allowed: `any` and `unknown` are forbidden.
  2. Object Literal Types:

    typescript
    1type Inline = { value: number }; // ❌ Don't declare object-literal-based types.
  3. Fresh Object Literals (Untyped):

    typescript
    1const bad: Inline = { value: 1 }; // ❌ Fresh object literal without declared class/interface instance.
  4. Runtime Shape Changes:

    typescript
    1bad.newProp = "later"; // ❌ Changing object shape (adding properties) at runtime is forbidden.
  5. Implicit Object Shapes:

    typescript
    1const obj = { 2 value: 1, 3 double() { 4 return this.value + this.value; // ❌ `this` in a non-method context is disallowed. 5 } 6}; // ❌ Even with an object literal, it must match an explicit class/interface.
  6. Type Mismatches:

    typescript
    1bad.value = "7"; // ❌ Assigning string to a number-typed field fails.
  7. Implicit Coercion:

    typescript
    1console.info(String(+bad.value)); // ❌ Unary `+` on a string for coercion is not permitted.

✅ Correct Practices

Use explicit types, classes, and safe conversions:

  1. Explicit Numeric Parsing:

    typescript
    1const s: string = "7"; 2// Use explicit parsing methods instead of unary + 3const n: number = Number.parseInt(s);
  2. Classes and Interfaces: Always define explicit classes or interfaces for your data structures.

    typescript
    1class Doubler { 2 value: number; 3 constructor(value: number) { 4 this.value = value; 5 } 6} 7 8let obj = new Doubler(n);

Summary of Rules

  • Static Typing: ArkTS is statically typed. Avoid dynamic features like any.
  • Fixed Layout: Object layout is fixed at compile time. You cannot add/remove properties at runtime.
  • Explicit Types: Define types explicitly using class or interface. Avoid anonymous object types.
  • Strict Safety: No implicit type coercion. Use standard library functions (e.g., Number.parseInt) for conversions.

Related Skills

Looking for an alternative to arkts-coding-standard or building a Community AI Agent? Explore these related open-source MCP Servers.

View All

widget-generator

Logo of f
f

widget-generator is an open-source AI agent skill for creating widget plugins that are injected into prompt feeds on prompts.chat. It supports two rendering modes: standard prompt widgets using default PromptCard styling and custom render widgets built as full React components.

149.6k
0
Design

testing

Logo of lobehub
lobehub

Testing is a process for verifying AI agent functionality using commands like bunx vitest run and optimizing workflows with targeted test runs.

73.3k
0
Communication

chat-sdk

Logo of lobehub
lobehub

chat-sdk is a unified TypeScript SDK for building chat bots across multiple platforms, providing a single interface for deploying bot logic.

73.0k
0
Communication

zustand

Logo of lobehub
lobehub

The ultimate space for work and life — to find, build, and collaborate with agent teammates that grow with you. We are taking agent harness to the next level — enabling multi-agent collaboration, effortless agent team design, and introducing agents as the unit of work interaction.

72.8k
0
Communication