Set of skills, tools, and guides for AI agents to generate canonical ArkTS code. Or modernize the existing one.
Access rate limit exceeded. Please log in to continue.
ArkTS Agent Kit
ArkTS Agent Kit is a curated enablement layer for humans and AI agents that need to implement, migrate, modernize, optimize, review, diagnose, and repair ArkTS code against the real ArkTS toolkit.
It does not fork the toolkit itself. It packages the current ArkTS docs, compiler-facing signals, repair guidance, and install flows into a portable repo that agents can actually use during execution.
Repository Identity
- Purpose: turn
arkcompiler_*language, linter, LSP, and runtime knowledge into skill-time guidance, normalized artifacts, stable wrappers, and portable/public ArkTS workflows - Primary stack: Markdown, JSON, Python, shell
- Python packaging:
pyproject.toml, editable install into repo-local.venv - Installable product skill bundle:
arkts-skills/ - Repo-local maintainer skill bundle:
.agents/skills/
Upstream Grounding
This repo is grounded in these local upstream trees, tracked in .agents/sources/manifest.yaml:
arkcompiler_runtime_core/static_core/plugins/ets/docarkcompiler_ets_frontend/ets2pandaarkcompiler_runtime_core/static_core/plugins/etsinterface_sdk-js(api/,arkts/,kits/, and API diff/parser tooling)developtools_ace_ets2bundle(ArkUI compiler metadata, component definitions, UI syntax validation, and sample apps)applications_app_samples(maintainer-only HarmonyOS sample app corpus for local reference and future extraction work)
Repository Layout
AGENTS.md: root behavior contractINSTALL.md: setup and verification.agents/sources/manifest.yaml: upstream paths, SHAs, and scopes.agents/curation: maintainer-owned curated-knowledge policy and authoring guidesknowledge/raw: deterministic extracted evidenceknowledge/derived: generated retrieval and routing contractsknowledge/migration-rules: source-language migration rule setsdocs/cards: short skill-time guide cardsdocs/curated: broader curated markdown summaries for source-heavy domainsdocs/diagnostics: error and fix documentationdocs: higher-level human-facing reference docsarkts-skills: public product skills shipped by bootstrap.agents/skills: repo-local refresh, validation, curation, and release workflowssrc/arkts_agent_kit: packaged Python control plane and console entrypointspyproject.toml: package metadata, pytest/coverage, mypy, and ruff configurationscripts: operational control planetools: thin user-facing wrappersinstall: bootstrap entrypoints and runtime templatesinstall/adapters: runtime-specific install docsexamples: illustrative ArkTS and migration demos, not the grounding source of truth
Build, Test, And Run
Portable product setup:
./install/bootstrap.sh --adapter codex
tools/arkts-compile examples/minimal/hello.ets --json
tools/arkts-lint examples/minimal --json
Bootstrap creates <workspace>/.venv, installs the package in editable mode, and makes the repo wrappers in tools/ delegate to the venv console scripts.
Primary product-mode developer loop:
./install/bootstrap.sh --adapter <runtime>tools/arkts-compile examples/minimal/hello.ets --jsontools/arkts-lint examples/minimal --json- ask the agent to use
implement-arkts,fix-arkts-errors, orreview-arkts - use
tools/arkts-check,tools/arkts-compile, ortools/arkts-lintonly when the skill needs narrower tool feedback
Maintainer setup with local upstream sources:
./install/bootstrap.sh \
--adapter codex \
--profile maintainer \
--with-refresh-sources \
--runtime-core /path/to/arkcompiler_runtime_core/static_core \
--ets-frontend /path/to/arkcompiler_ets_frontend/ets2panda \
--interface-sdk-js /path/to/interface_sdk-js \
--ace-ets2bundle /path/to/developtools_ace_ets2bundle \
--app-samples /path/to/applications_app_samples \
--ohos-sdk /path/to/ohos/sdk \
--command-line-tools /path/to/ohos/sdk/command-line-tools
tools/arkts-compile examples/minimal/hello.ets --json
tools/arkts-lint examples/minimal --json
python3 scripts/arkts_agent_kit.py refresh
Core commands:
python3 scripts/arkts_agent_kit.py refreshpython3 scripts/arkts_agent_kit.py curation-auditpython3 scripts/arkts_agent_kit.py curation-plantools/arkts-capabilitiestools/arkts-compile <file.ets> --jsontools/arkts-lint <path> --jsontools/arkts-lint <path> --fix --jsontools/arkts-check <file-or-dir> --jsontools/arkts-migrate --from typescript <path> --json
UI note:
- plain
.etsfiles compile throughes2panda - ArkUI
@Entryand@Componentfiles compile through the upstreamdriver/build-systempath - if that UI path is missing native bindings such as
public.node, the wrapper reports a blocked capability with the missing path instead of raw compiler diagnostics
Repository developer setup
Create venv environment and install pre-commit hooks in this repository:
python3 -m venv .venv
source .venv/bin/activate
pip3 install .[dev]
pre-commit install
After setup is done, all pre-commit checks can be run with the following command:
pre-commit run --all-files
Architecture And Workflows
scripts/arkts_agent_kit.pyis the stable repo entrypoint. The packaged implementation now lives undersrc/arkts_agent_kit/, which reads the source manifest and local install state, discovers tool capabilities, refreshes extracted knowledge, and normalizes compile/lint/check output.src/arkts_agent_kit/is the packaged implementation surface.scripts/arkts_agent_kit.pyandinstall/bootstrap.pyare thin repo shims over the package entrypoints.python3 scripts/arkts_agent_kit.py refreshregenerates:knowledge/raw/sections.jsonlandknowledge/raw/snippets.jsonlfromplugins/ets/doc/*knowledge/raw/sdk-declarations.jsonlfrominterface_sdk-jsdeclaration treesknowledge/raw/stdlib-symbols.jsonlfromplugins/ets/stdlib/*.etsknowledge/raw/ace-ui-components.jsonlandknowledge/raw/ace-ui-samples.jsonlfromdeveloptools_ace_ets2bundleknowledge/derived/*.jsonindexes, routing, diagnostics maps, and source status
python3 scripts/arkts_agent_kit.py curation-auditreads committed raw and derived artifacts plus the current authored cards and summaries, writes.generated/curation/report.json, initializes.generated/curation/draft-manifest.jsonwhen needed, and reports curated coverage, inventory, normalized coverage zones, worklist summary, missing expected domains, and draft-staging issuespython3 scripts/arkts_agent_kit.py curation-planbuilds the exhaustive curation worklist and writes.generated/curation/worklist.jsonplus.generated/curation/worklist.mdapplications_app_samplesis tracked in the source manifest and installer state for maintainer workflows, but it is not extracted into product artifacts by defaulttools/arkts-*stay intentionally thin and delegate to the Python control plane.- public skills do not all map to dedicated shell wrappers; workflows such as
modernize-arkts,optimize-arkts, andreview-arktsorchestratetools/arkts-check,tools/arkts-compile, andtools/arkts-lint knowledge/raw/*is deterministic extraction output from upstream docs.knowledge/derived/*is generated retrieval state for skills and guides. The key runtime contracts areknowledge/derived/guide-index.jsonandknowledge/derived/skill-context.json..generated/*is local maintainer/runtime state and must not be treated as the committed product contract.docs/cards/*is the first-read guide layer for skill execution.docs/curated/*is the second-layer summary surface for SDK, stdlib, ArkUI, runtime, interop, and concurrency context. Long docs indocs/language,docs/migration,docs/cookbook, anddocs/styleare secondary reference material..agents/curation/*is the maintainer-owned contract for expanding or refreshing the authored card and summary layers without changing the public runtime contract.- Product installs consume committed repo artifacts only. Maintainer installs additionally enable live-source refresh and validation.
- The canonical runtime binaries live in
<workspace>/.venv/bin/. - Supported adapters additionally publish managed skill copies into their native homes:
- Codex:
$CODEX_HOME/skillsor~/.codex/skills - Claude Code:
~/.claude/skills - OpenCode global:
$XDG_CONFIG_HOME/opencode/skillsor~/.config/opencode/skills - OpenCode project-local:
.opencode/skillsvia./install/bootstrap.sh --adapter opencode --skill-scope project
- Codex:
User-Facing Script Rule
All user-facing workflows should go through local repo assets only:
- local markdown guidance in
docs/ - local derived contracts in
knowledge/derived/ - local examples
- repo wrappers in
tools/
Public users should not need to read live arkcompiler_* source trees. Only maintainer refresh and validation workflows may do that.
That includes ArkUI framework data from developtools_ace_ets2bundle: product skills should use committed knowledge/derived/ace-ui-index.json, not the live repo.
Current Scripts And How To Use Them
Public commands:
./install/bootstrap.sh --adapter <runtime>python3 install/bootstrap.py --adapter <runtime> --workspace ..venv/bin/arkts-bootstrap --adapter <runtime>.venv/bin/arkts-agent-kit <command>arkts-agent-kit skills install --adapter <runtime> --workspace .arkts-agent-kit skills status --adapter <runtime> --workspace .arkts-agent-kit skills uninstall --adapter <runtime> --workspace .tools/arkts-compile <file.ets> --jsontools/arkts-lint <path> --jsontools/arkts-lint <path> --fix --jsontools/arkts-check <path> --jsontools/arkts-migrate --from typescript <path> --jsontools/arkts-build-library <package-dir> <output-file>tools/arkts-build-app <app-dir>tools/arkts-run-app <app-dir>tools/arkts-migrate --from javascript <path> --json
For the normal developer loop, prefer:
tools/arkts-check <path> --jsonfor the combined compile-and-lint passtools/arkts-compile <file.ets> --jsonwhen a plain static.etsfile fails before lint is usefultools/arkts-lint <path> --jsonwhen compile is already green and only lint/policy feedback is neededtools/arkts-lint <path> --fix --jsononly after the failure family is understood
Manifest-driven runtime flow:
- copied runtime wrappers expect
arktsconfig.jsonin<package>/or<package>/src/ - app wrappers expect
<app>/app.jsonwithoutput,library_abc,library_path, andmain - tool resolution comes from bootstrap install state or
ARKTS_BUILD_ROOT
Advanced direct CLI:
Public skills should keep using tools/. The direct CLI entries below are for maintainer or low-level debugging work, not the normal skill contract.
tools/arkts-capabilitiespython3 scripts/arkts_agent_kit.py check <path> --json
Foreign-repo note:
- full bootstrap is only for this kit checkout or another checkout with the same package/templates layout
- use
arkts-agent-kit skills install --adapter <runtime> --workspace . --skills-dir <path>when you only want to copy/manage the public skills in another repo
Maintainer-only:
./install/bootstrap.sh --adapter <runtime> --profile maintainer --with-refresh-sources ..../install/bootstrap.sh --adapter <runtime> --profile maintainer --with-refresh-sources --interface-sdk-js /path/to/interface_sdk-js ..../install/bootstrap.sh --adapter <runtime> --profile maintainer --with-refresh-sources --ace-ets2bundle /path/to/developtools_ace_ets2bundle ..../install/bootstrap.sh --adapter <runtime> --profile maintainer --with-refresh-sources --app-samples /path/to/applications_app_samples ...python3 scripts/arkts_agent_kit.py refresh --jsonpython3 scripts/arkts_agent_kit.py curation-audit --jsonpython3 scripts/arkts_agent_kit.py curation-plan --jsonpython3 scripts/arkts_agent_kit.py drift-check --jsonpython3 scripts/arkts_agent_kit.py validate-maintainer --json
Maintainer report model:
refresh --jsondoes preflight, extraction, guide validation, and raw-to-derived maintenance analysis in one structured reportcuration-audit --jsonaudits the current curated layer, stages.generated/curation/*runtime files, and reports inventory, normalized coverage zones, worklist status, and draft follow-upcuration-plan --jsonwrites.generated/curation/worklist.jsonand.generated/curation/worklist.mdfor the exhaustive backlogdrift-check --jsonchecks committed contracts for guide, migration-rule, maintainer-skill, and wrapper drift without mutating repo statevalidate-maintainer --jsongroups maintainer readiness into install, refresh, guide validation, curation audit, wrapper smoke checks, and drift
Conventions And Pitfalls
- Prefer committed repo artifacts over scanning upstream trees during normal product skill execution.
- If docs and implementation disagree, prefer implementation and treat the mismatch as drift.
- AI-authored guides must stay citation-backed through the extracted corpus.
- Generated local runtime state belongs in
.generated/and is not part of the authored repo contract. - The repo uses
arkts-skills/for the installable product bundle and.agents/skills/for repo-local maintainer workflows. tools/arkts-checkis the default non-UI developer loop; a green verification expects both compile and lint to work forexamples/minimal/hello.ets- missing optional capabilities still produce structured wrapper output, but they are reduced modes rather than a fully verified developer loop:
- without
node,tools/arkts-lintand combinedcheckare blocked, while plain compile can still work - without an ArkTS build,
tools/arkts-compileand combinedcheckare blocked, while docs and review skills still work - without ArkUI build-system bindings, plain
.etswork can still proceed, but ArkUI UI compile is blocked
- without
Skill Bundles
Installable product skills:
arkts-skills/arkts-skill/SKILL.mdarkts-skills/design-arkts-ui-app/SKILL.mdarkts-skills/implement-arkts/SKILL.mdarkts-skills/migrate-to-arkts/SKILL.mdarkts-skills/fix-arkts-errors/SKILL.mdarkts-skills/explain-arkts-diagnostic/SKILL.mdarkts-skills/modernize-arkts/SKILL.mdarkts-skills/optimize-arkts/SKILL.mdarkts-skills/review-arkts/SKILL.mdarkts-skills/verify-arkts-ui/SKILL.mdarkts-skills/verify-arkts-device/SKILL.mdarkts-skills/verify-arkts-previewer/SKILL.md
Repo-local maintainer skills:
.agents/skills/install-arkts-skills/SKILL.md.agents/skills/refresh-arkts-kit/SKILL.md.agents/skills/rebuild-guide-data/SKILL.md.agents/skills/update-curated-knowledge/SKILL.md.agents/skills/validate-arkts-kit/SKILL.md.agents/skills/publish-agent-kit/SKILL.md
Guide routing is documented in docs/guide-usage.md. Skill taxonomy is documented in docs/cookbook/skill-taxonomy.md.
Script usage is documented in docs/cookbook/scripts-and-wrappers.md.
ArkTS personal-first design-system packs live under arkts-design-systems/ and are validated by scripts/arkts_design_system_check.py. Each pack follows an Open Design-inspired shape: manifest.json for discovery and quality gates, USAGE.md for agent generation rules, DESIGN.md for visual direction, and ArkTS-native tokens.ets / components.ets for implementation patterns.
ArkTS UI app verification workflows are documented in arkts-skills/verify-arkts-device/SKILL.md and arkts-skills/verify-arkts-previewer/SKILL.md; shared UI quality gates live in arkts-skills/verify-arkts-ui/. Generated UI apps should keep the selected design-system manifest quality gates in their evidence report.
modernize-arkts usage is documented in docs/cookbook/using-modernize-arkts.md.
Introduction
Set of skills, tools, and guides for AI agents to generate canonical ArkTS code. Or modernize the existing one.
Customize your domain