Agent skill

Harmony Arkts

by Mindrally in Mindrally/skills

Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility.

Apache-2.0Auto-check passedFrontend & Design

Install Harmony Arkts

skills CLI
$ npx skills add Mindrally/skills --skill harmony-arkts -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Mindrally/skills harmony-arkts --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Mindrally/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/harmony-arkts .claude/skills/harmony-arkts && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
harmony-arkts
GitHub stars
269
Token cost
~2k tokens
SKILL.md length
864 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
Apache-2.0

At a glance

Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility.

  • Works in 8 steps: Define the component — Create a struct… → Declare state near the top — List… → Add lifecycle hooks — Implement… → …
  • Writing .ets component files
  • SKILL.md covers Workflow for Building an ArkTS…, Component Structure, State and Data Flow and Layout and Styling, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Harmony Arkts is an agent skill from Mindrally/skills. Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility. Use when writing .ets component files, using ArkUI decorators like @Component/@State/@Prop/@Link, building layouts with Column/Row/Stack/List, managing HarmonyOS app resources with $r(), or handling component lifecycle and accessibility on HarmonyOS.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Accessibility, State management and Link building. The repository describes itself as: 265+ Claude Code skills for every major framework and language. Install with: npx skills add Mindrally/skills. The licence is Apache-2.0.

When your agent uses it

  • Writing .ets component files
  • Using ArkUI decorators like @Component/@State/@Prop/@Link
  • Building layouts with Column/Row/Stack/List
  • Managing HarmonyOS app resources with $r()

Example prompts

  • “/harmony-arkts”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Define the component — Create a struct decorated with @Component, named in PascalCase.
  2. Declare state near the top — List @State, @Prop, @Link, and other state decorators first, before any methods.
  3. Add lifecycle hooks — Implement aboutToAppear()/aboutToDisappear() (and others as needed) after state, before build().
  4. Compose the UI in build() — Place build() last, using ArkUI primitives (Column, Row, Stack, List, etc.) to lay out child components.
  5. Extract complex UI — Once build() grows large or nested, pull sections into smaller @Component structs or @Builder functions.
  6. Wire events — Attach arrow-function event handlers that delegate non-trivial logic to named methods on the component.
  7. Externalize resources — Move strings, colors, dimensions, and images into the resource system and reference them with $r().
  8. Verify accessibility and responsiveness — Add accessibility labels, check touch target sizes, and test across representative device…

What it can do on your machine

Read from SKILL.md and the folder at commit 7682ca7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Harmony Arkts loads about 2k tokens when it runs. Until then it costs about 107 tokens; SKILL.md has 864 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~107
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from Mindrally/skills at commit 7682ca7, republished under its Apache-2.0 licence (© Mindrally). 864 words, ~2,037 tokens.

Download SKILL.mdSave it as .claude/skills/harmony-arkts/SKILL.md (or your agent's skills folder).
name
harmony-arkts
description
Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility. Use when writing .ets component files, using ArkUI decorators like @Component/@State/@Prop/@Link, building layouts with Column/Row/Stack/List, managing HarmonyOS app resources with $r(), or handling component lifecycle and accessibility on HarmonyOS.
metadata.maintainer
Mindrally
metadata.source
https://github.com/Mindrally/skills

HarmonyOS ArkTS Development

This skill covers building HarmonyOS applications with ArkTS and the declarative ArkUI framework, including component structure, state management, layout, lifecycle, resources, and accessibility.

Workflow for Building an ArkTS Component

  1. Define the component — Create a struct decorated with @Component, named in PascalCase.
  2. Declare state near the top — List @State, @Prop, @Link, and other state decorators first, before any methods.
  3. Add lifecycle hooks — Implement aboutToAppear()/aboutToDisappear() (and others as needed) after state, before build().
  4. Compose the UI in build() — Place build() last, using ArkUI primitives (Column, Row, Stack, List, etc.) to lay out child components.
  5. Extract complex UI — Once build() grows large or nested, pull sections into smaller @Component structs or @Builder functions.
  6. Wire events — Attach arrow-function event handlers that delegate non-trivial logic to named methods on the component.
  7. Externalize resources — Move strings, colors, dimensions, and images into the resource system and reference them with $r().
  8. Verify accessibility and responsiveness — Add accessibility labels, check touch target sizes, and test across representative device sizes/orientations.

Component Structure

  • Use @Component to define components and PascalCase for the component struct name (e.g., struct UserProfileCard).
  • Keep state declarations (@State, @Prop, @Link, @StorageLink, plain fields) near the top of the component, before methods and lifecycle hooks.
  • Group lifecycle hooks (aboutToAppear, aboutToDisappear, onPageShow, onPageHide) before build() so the component's lifecycle is easy to scan.
  • Place build() last and keep it focused purely on UI composition — pull data transformation and business logic out into methods called from build(), not embedded inline.
  • Extract complex UI into smaller @Component structs (or @Builder functions for lightweight, reusable UI fragments) once a build() method grows past a screenful or nests more than a few levels deep.

State and Data Flow

  • Use @State for state owned and mutated by the component itself.
  • Use @Prop for one-way parent-to-child data — the child gets its own copy and local changes don't propagate back up.
  • Use @Link only for intentional two-way binding where the child genuinely needs to mutate the parent's state (e.g., a custom form control).
  • Keep derived values in computed helper methods rather than duplicating and manually syncing state (don't store both items and itemCount as separate @State fields when itemCount can be this.items.length).
  • Avoid broad global state (AppStorage/LocalStorage used indiscriminately) unless the project has an established app-state pattern; prefer passing data down through props/links for anything not genuinely global.
Example: A Component with State, Props, and Lifecycle
typescript
@Component
export struct CounterCard {
  @Prop label: string = 'Counter';
  @State private count: number = 0;
  private maxCount: number = 99;

  aboutToAppear(): void {
    console.info(`CounterCard mounted with label=${this.label}`);
  }

  private increment = (): void => {
    if (this.count >= this.maxCount) {
      return;
    }
    this.count += 1;
  };

  private reset = (): void => {
    this.count = 0;
  };

  build() {
    Column({ space: 12 }) {
      Text(this.label)
        .fontSize(18)
        .fontWeight(FontWeight.Medium)

      Text(`${this.count}`)
        .fontSize(32)
        .fontColor($r('app.color.primary'))
        .accessibilityText(`Current count is ${this.count}`)

      Row({ space: 8 }) {
        Button('Increment')
          .onClick(this.increment)
          .accessibilityText('Increment counter')

        Button('Reset')
          .onClick(this.reset)
          .accessibilityText('Reset counter')
      }
    }
    .width('100%')
    .padding(16)
    .alignItems(HorizontalAlign.Center)
  }
}

Layout and Styling

  • Use Column, Row, Stack, List, and other ArkUI layout primitives intentionally based on the axis and stacking behavior actually needed, rather than defaulting to Stack and positioning everything absolutely.
  • Group layout properties — width, height, alignment, layout weight (layoutWeight) — before visual properties (color, font, border) in the chained modifier calls, so structure reads before decoration.
  • Use object notation for margin and padding when the sides differ (.margin({ top: 8, bottom: 16, left: 12, right: 12 })) rather than a single shorthand that implies uniform spacing.
  • Use logical pixels (vp) consistently for sizes so layouts scale correctly across device pixel densities; avoid mixing raw pixel values.
  • Use percentage strings ('100%', '50%') for sizes that should be relative to the parent container instead of hardcoded fixed values.
  • Keep reusable spacing, colors, and typography values in the resource system ($r('app.color.primary'), $r('app.float.spacing_md')) when the project supports it, instead of repeating literals across components.
Show full SKILL.md (313 more words)Show less

Events and Lifecycle

  • Use arrow functions for event handlers (.onClick(() => this.handleTap()) or a bound class field like private handleTap = () => {...}) so this binds correctly without extra boilerplate.
  • Keep event handlers themselves short — read the event, then delegate any non-trivial logic to a named method that can be tested and reasoned about independently.
  • Handle async failures explicitly (try/catch around await) and surface user-facing errors (a toast, an inline error state) instead of letting a rejected promise disappear silently.
  • Use lifecycle hooks (aboutToAppear, aboutToDisappear, onPageShow, onPageHide, onBackPress) only for setup/teardown that genuinely depends on the component or page's lifecycle — don't use them as a dumping ground for logic that could live in a regular method.

Resources and Accessibility

  • Use $r() to reference app resources (strings, colors, media, floats) instead of embedding literal values directly in component code.
  • Group resource references consistently — organize resources/base/element/string.json, color.json, float.json by feature or screen so they stay navigable as the app grows.
  • Add descriptive accessibility labels (.accessibilityText(), .accessibilityDescription()) and correct focus handling (.focusable(true), .tabIndex()) for every interactive element.
  • Maintain sufficient color contrast between text and background, and keep touch targets at least the platform-recommended minimum size (generally 40vp or larger) for anything tappable.
  • Test on representative device sizes and orientations (phone, foldable, tablet, landscape/portrait) since ArkUI layouts that look correct on one form factor can break on another.

Common Mistakes

  • Burying business logic (data fetching, validation, complex branching) directly inside build() instead of in dedicated methods — build() should read like a UI tree, not a program.
  • Using @Link two-way binding when a simple one-way @Prop would do, which makes data flow harder to trace and invites accidental mutation from child components.
  • Hardcoding repeated strings, colors, and dimensions that belong in the resource system, making localization and theming changes require hunting through component code.
  • Leaving debug console.log/console.info calls in production code paths, which adds noise and can leak internal state into logs.

© Mindrally, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in harmony-arkts of Mindrally/skills.

Open the folder on GitHubat commit 7682ca7

Compare with similar skills

Harmony Arkts next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Harmony Arkts compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Harmony Arkts this skillMindrally/skills269—~2kAutomated safety check: PassApache-2.0
Component ForgeEliasOulkadi/shokunin114—~3.6kAutomated safety check: NotesMIT
Acarshub Design Languagesdr-enthusiasts/docker-acarshub117—~1.1kAutomated safety check: PassGPL-3.0
Discover Frontendrand/cc-polymath181—~2.4kAutomated safety check: PassMIT
Salesforce Component Standardsgithub/awesome-copilot40k1 repos~2.4kAutomated safety check: PassMIT
React Code Reviewgiuseppe-trisciuoglio/developer-kit356—~2.6kAutomated safety check: NotesMIT

Similar skills

  • Component Forge

    EliasOulkadi/shokunin

    Build production-grade components for React, Vue 3, and Svelte 5 with all states (loading, empty, error, success, idle), TypeScript strict, WCAG 2.2 accessibility, server components (RSC), and…

    114 GitHub stars~3.6k tokensUpdated 4 days ago
    Frontend & DesignAuto-check: notes
  • Acarshub Design Language

    sdr-enthusiasts/docker-acarshub

    Use ONLY when working in the docker-acarshub repository AND building UI -- React components, SCSS modules, theme variables, accessibility, mobile responsiveness, Catppuccin color usage, Zustand…

    117 GitHub stars~1.1k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Discover Frontend

    rand/cc-polymath

    Automatically discover frontend development skills when working with React, Next.js, UI components, state management, data fetching, forms, accessibility, performance optimization, or SEO.

    181 GitHub stars~2.4k tokensUpdated 7 mo ago
    Frontend & DesignAuto-check passed
  • Salesforce Component Standards

    github/awesome-copilot

    Official

    Quality standards for Salesforce Lightning Web Components (LWC), Aura components, and Visualforce pages.

    40k GitHub starsUsed in 1 repo~2.4k tokens
    Frontend & DesignAuto-check passed
  • React Code Review

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive code review capability for React applications, validates component architecture, hooks usage, React 19 patterns, state management, performance optimization, accessibility…

    356 GitHub stars~2.6k tokensUpdated 29 days ago
    Frontend & DesignAuto-check: notes
  • Link Text Design

    Owl-Listener/inclusive-design-skills

    Write link text that makes sense out of context for screen reader users and improves usability for everyone.

    104 GitHub stars~702 tokensUpdated 4 mo ago
    Frontend & DesignAuto-check passed

More from Mindrally/skills

All 34 skills in this repo
  • Analytics Data Analysis

    Mindrally/skills

    Best practices for analytics, data analysis, and visualization using Python, pandas, matplotlib, seaborn, and Jupyter notebooks.

    269 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Best practices for AutoML and hyperparameter search with Optuna, Ray Tune, and PyCaret, covering search-space design, validation splits, and leakage prevention.

    269 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Blender Python Addon

    Mindrally/skills

    Best practices for writing Blender Python add-ons using the bpy API, covering operators, panels, properties, registration, and API-safe scripting.

    269 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Expert guidelines for Chrome extension development with Manifest V3, covering security, performance, and best practices.

    269 GitHub stars~1.7k tokensUpdated yesterday
    Auto-check passed
  • Clean Code

    Mindrally/skills

    Clean, maintainable, human-readable code principles combined with anti-over-engineering discipline: naming, single responsibility, DRY, and scoping changes to exactly what was requested.

    269 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Design Systems

    Mindrally/skills

    Comprehensive design system guidelines for building consistent, accessible, and scalable component libraries.

    269 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed

Questions about Harmony Arkts

What does Harmony Arkts do?

Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility. Harmony Arkts is an agent skill from Mindrally/skills. Best practices for HarmonyOS application development with ArkTS and ArkUI, covering components, state management, resources, layout, lifecycle, and accessibility.

When should I use Harmony Arkts?

Harmony Arkts fits situations like: writing .ets component files; using ArkUI decorators like @Component/@State/@Prop/@Link; building layouts with Column/Row/Stack/List; managing HarmonyOS app resources with $r().

How do I install Harmony Arkts in Claude Code?

Run `npx skills add Mindrally/skills --skill harmony-arkts -a claude-code`. Or copy the skill folder (harmony-arkts in Mindrally/skills) into .claude/skills/harmony-arkts in your project. Claude Code loads it when a task matches its description.

How do I install Harmony Arkts in Codex?

Run `npx skills add Mindrally/skills --skill harmony-arkts -a codex`. Or copy the skill folder (harmony-arkts in Mindrally/skills) into .agents/skills/harmony-arkts in your project. Codex loads it when a task matches its description.

Can I use Harmony Arkts in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Mindrally/skills --skill harmony-arkts -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/harmony-arkts, .gemini/skills/harmony-arkts, .github/skills/harmony-arkts and .opencode/skills/harmony-arkts in your project.

What does Harmony Arkts need to run?

SKILL.md names no scripts, command-line tools or credentials: Harmony Arkts is instructions for the agent only.

Does Harmony Arkts access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Harmony Arkts safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Harmony Arkts use?

Harmony Arkts is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Harmony Arkts use?

About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Harmony Arkts?

Skills that share tags, products or a category with Harmony Arkts: Component Forge (EliasOulkadi/shokunin, 114 stars), Acarshub Design Language (sdr-enthusiasts/docker-acarshub, 117 stars), Discover Frontend (rand/cc-polymath, 181 stars) and Salesforce Component Standards (github/awesome-copilot, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Harmony Arkts?

Mindrally (a GitHub organization) maintains it in Mindrally/skills, which has 269 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 8, 2026.

Source: Mindrally/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.