Token导航 LogoToken导航TokenDH.com
前端设计执行命令github未标认证来源可访问许可证需确认审计通过

arkts-development市场发展

Agent Skill

arkts-development 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,447

周安装

103

GitHub Stars

6

下载量

857
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:arkts-development(市场发展)
来源仓库:https://github.com/fadinglight9291117/arkts_skills
仓库路径:skills/arkts-development
安装命令:
npx skills add https://github.com/fadinglight9291117/arkts_skills --skill arkts-development
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/fadinglight9291117/arkts_skills --skill arkts-development

简介

arkts-development 指导使用 ArkTS 与 ArkUI 框架构建 HarmonyOS 应用,提供组件化开发模板。

  • 适合创建声明式 UI、管理 @State/@Prop 状态及实现跨平台交互逻辑时使用。
  • 支持传统装饰器与新范式混合开发,逐步迁移至更简洁的响应式编程模型。
  • 使用前应配置 DevEco Studio 开发环境,并确保 ArkCompiler 版本与项目要求匹配。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

ArkTS Development

Build HarmonyOS applications using ArkTS and the ArkUI declarative UI framework.

Quick Start

Create a basic component:

@Entry
@Component
struct HelloWorld {
  @State message: string = 'Hello, ArkTS!';

  build() {
    Column() {
      Text(this.message)
        .fontSize(30)
        .fontWeight(FontWeight.Bold)
      Button('Click Me')
        .onClick(() => { this.message = 'Button Clicked!'; })
    }
    .width('100%')
    .height('100%')
    .justifyContent(FlexAlign.Center)
  }
}

State Management Decorators

V1 (Traditional)

DecoratorUsageDescription
@State@State count: number = 0Component internal state
@Prop@Prop title: stringParent → Child (one-way)
@Link@Link value: numberParent ↔ Child (two-way, use $varName)
@Provide/@ConsumeCross-levelAncestor → Descendant
@Observed/@ObjectLinkNested objectsDeep object observation

V2 (Recommended - API 12+)

DecoratorUsageDescription
@ComponentV2@ComponentV2 struct MyCompEnable V2 state management
@Local@Local count: number = 0Internal state (no external init)
@Param@Param title: string = ""Parent → Child (one-way, efficient)
@Event@Event onChange: () => voidChild → Parent (callback)
@ObservedV2@ObservedV2 class DataClass observation
@Trace@Trace name: stringProperty-level tracking
@Computed@Computed get value()Cached computed properties
@Monitor@Monitor('prop') onFn()Watch changes with before/after
@Provider/@ConsumerCross-levelTwo-way sync across tree

See references/state-management-v2.md for complete V2 guide.

Common Layouts

// Vertical
Column({ space: 10 }) { Text('A'); Text('B'); }
  .alignItems(HorizontalAlign.Center)

// Horizontal
Row({ space: 10 }) { Text('A'); Text('B'); }
  .justifyContent(FlexAlign.SpaceBetween)

// Stack (overlay)
Stack({ alignContent: Alignment.Center }) {
  Image($r('app.media.bg'))
  Text('Overlay')
}

// List with ForEach
List({ space: 10 }) {
  ForEach(this.items, (item: string) => {
    ListItem() { Text(item) }
  }, (item: string) => item)
}

Component Lifecycle

@Entry
@Component
struct Page {
  aboutToAppear() { /* Init data */ }
  onPageShow() { /* Page visible */ }
  onPageHide() { /* Page hidden */ }
  aboutToDisappear() { /* Cleanup */ }
  build() { Column() { Text('Page') } }
}

Navigation

import { router } from '@kit.ArkUI';

// Push
router.pushUrl({ url: 'pages/Detail', params: { id: 123 } });

// Replace
router.replaceUrl({ url: 'pages/New' });

// Back
router.back();

// Get params
interface RouteParams {
  id: number;
  title?: string;
}
const params = router.getParams() as RouteParams;

Network Request

import { http } from '@kit.NetworkKit';

const req = http.createHttp();
const res = await req.request('https://api.example.com/data', {
  method: http.RequestMethod.GET,
  header: { 'Content-Type': 'application/json' }
});
if (res.responseCode === 200) {
  const data = JSON.parse(res.result as string);
}
req.destroy();

Local Storage

import { preferences } from '@kit.ArkData';

const prefs = await preferences.getPreferences(this.context, 'store');
await prefs.put('key', 'value');
await prefs.flush();
const val = await prefs.get('key', 'default');

ArkTS Language Constraints

ArkTS enforces stricter rules than TypeScript for performance and safety:

ProhibitedUse Instead
any, unknownExplicit types, interfaces
varlet, const
Dynamic property access obj['key']Fixed object structure
for...in, delete, withfor...of, array methods
#privateFieldprivate keyword
Structural typingExplicit implements/extends

See references/migration-guide.md for complete TypeScript → ArkTS migration details.

Command Line Build (hvigorw)

hvigorw is the Hvigor wrapper tool for command-line builds.

# Common build tasks
hvigorw clean                              # Clean build directory
hvigorw assembleHap -p buildMode=debug     # Build Hap (debug)
hvigorw assembleApp -p buildMode=release   # Build App (release)
hvigorw assembleHar                        # Build Har library
hvigorw assembleHsp                        # Build Hsp

# Build specific module
hvigorw assembleHap -p module=entry@default --mode module

# Run tests
hvigorw onDeviceTest -p module=entry -p coverage=true
hvigorw test -p module=entry              # Local test

# CI/CD recommended
hvigorw assembleApp -p buildMode=release --no-daemon

Common parameters:

ParameterDescription
`-p buildMode={debug\release}`Build mode
-p product={name}Target product (default: default)
-p module={name}@{target}Target module (with --mode module)
--no-daemonDisable daemon (recommended for CI)
--analyze=advancedEnable build analysis
--optimization-strategy=memoryMemory-optimized build

See references/hvigor-commandline.md for complete command reference.

Code Linter (codelinter)

codelinter is the code checking and fixing tool for ArkTS/TS files.

# Basic usage
codelinter                           # Check current project
codelinter /path/to/project          # Check specified project
codelinter -c ./code-linter.json5    # Use custom rules

# Check and auto-fix
codelinter --fix
codelinter -c ./code-linter.json5 --fix

# Output formats
codelinter -f json -o ./report.json  # JSON report
codelinter -f html -o ./report.html  # HTML report

# Incremental check (Git changes only)
codelinter -i

# CI/CD with exit codes
codelinter --exit-on error,warn      # Non-zero exit on error/warn
ParameterDescription
-c, --config <file>Specify rules config file
--fixAuto-fix supported issues
-f, --formatOutput format: default/json/xml/html
-o, --output <file>Save result to file
-i, --incrementalCheck only Git changed files
-p, --product <name>Specify product
-e, --exit-on <levels>Exit code levels: error,warn,suggestion

See references/codelinter.md for complete reference.

Stack Trace Parser (hstack)

hstack parses obfuscated crash stacks from Release builds back to source code locations.

# Parse crash files directory
hstack -i crashDir -o outputDir -s sourcemapDir -n nameCacheDir

# Parse with C++ symbols
hstack -i crashDir -o outputDir -s sourcemapDir --so soDir -n nameCacheDir

# Parse single crash stack
hstack -c "at func (entry|entry|1.0.0|src/main/ets/pages/Index.ts:58:58)" -s sourcemapDir
ParameterDescription
-i, --inputCrash files directory
-c, --crashSingle crash stack string
-o, --outputOutput directory (or file with -c)
-s, --sourcemapDirSourcemap files directory
--so, --soDirShared object (.so) files directory
-n, --nameObfuscationNameCache files directory

Requirements:

  • Must provide either -i or -c (not both)
  • Must provide at least -s or --so
  • For method name restoration, provide both -s and -n

See references/hstack.md for complete reference.

Code Obfuscation (ArkGuard)

Enable in build-profile.json5:

"arkOptions": {
  "obfuscation": {
    "ruleOptions": {
      "enable": true,
      "files": ["./obfuscation-rules.txt"]
    }
  }
}

Common rules in obfuscation-rules.txt:

-enable-property-obfuscation      # Property name obfuscation
-enable-toplevel-obfuscation      # Top-level scope obfuscation
-enable-filename-obfuscation      # Filename obfuscation
-keep-property-name apiKey        # Whitelist specific names

See references/arkguard-obfuscation.md for complete guide.

Reference Files

Development Environment

  • IDE: DevEco Studio
  • SDK: HarmonyOS SDK
  • Simulator: Built-in DevEco Studio emulator

Related Skills

  • Build & Deploy: See harmonyos-build-deploy skill for building, packaging, and device installation

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.73%
按下载量换算315

Claude

30.91%
按下载量换算265

Cursor

20.5%
按下载量换算176

Gemini CLI

8.29%
按下载量换算71

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/fadinglight9291117/arkts_skills --skill arkts-development 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills