Agent Skills
› aresbit/MateBot
› arkts-skill
arkts-skill
GitHub基于ArkTS规范提供语法、类型系统及迁移适配指导,支持编译器错误诊断与代码现代化建议。
Trigger Scenarios
ArkTS语法查询
TypeScript转ArkTS迁移
编译器类型错误排查
HarmonyOS代码合规检查
Install
npx skills add aresbit/MateBot --skill arkts-skill -g -y
SKILL.md
Frontmatter
{
"name": "arkts-skill",
"description": "ArkTS language specification guidance for syntax, types, semantics, and diagnostics based on ArkTS Specification 1.2.0. Use when handling ArkTS grammar questions, compiler\/type errors, feature compliance checks, TypeScript-to-ArkTS adaptation, or HarmonyOS ArkTS code modernization."
}
ArkTS Skill
Use this skill to answer ArkTS language and type-system questions with spec-backed guidance.
Workflow
- Read the user problem and classify it as one of: syntax, type system, declarations, expressions/statements, classes/interfaces, or migration/compatibility.
- If the question is TypeScript-to-ArkTS migration related (especially "why not supported", including destructuring-assignment concerns), read
references/huawei-migration-priority.mdfirst. - For migration questions, use local files in
references/huawei-migration/*.mdfirst (local-first). - If local migration files are stale or insufficient, refresh them via
bash scripts/fetch_huawei_migration_refs.sh. - Search chapter files, then open only the matched files.
- Cite the exact section/topic names in your answer.
- Prefer minimal, directly compilable ArkTS examples.
- Keep recommendations simple and deterministic. If multiple options exist, present the simplest compliant one first.
Fast Search Patterns
Use targeted search on the chapter directory:
bash scripts/search_chapters.sh "union|narrow|keyof"rg -n "type|union|interface|class|function|async|decorator|generic" references/chaptersrg -n "assignment|narrow|overload|extends|implements|readonly|tuple|array|literal" references/chaptersrg -n "error|diagnostic|restriction|forbidden|not allowed|shall|must" references/chapters
Maintenance
- Rebuild chapter split from full OCR markdown:
python3 scripts/rebuild_chapters.py
- Refresh migration local references:
bash scripts/fetch_huawei_migration_refs.sh
- Keep
references/CHAPTER_INDEX.mdin sync with chapter files after rebuild.
Output Rules
- Prefer short explanations with one concrete fix.
- For compiler/type errors, include:
- Root cause in one sentence.
- Smallest valid code change.
- Why this matches spec behavior.
- For migration questions, produce a before/after snippet and list breaking points.
Reference
- Full OCR markdown:
arktsspecification_ocr_full.md - Chapter index:
references/CHAPTER_INDEX.md - OCR chapter files:
references/chapters/*.md - Migration-first references:
references/huawei-migration-priority.md - Migration local files:
references/huawei-migration/*.md
Version History
- 2328a17 Current 2026-08-20 10:30


