arkts-syntax-assistant — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited arkts-syntax-assistant (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
ArkTS is the default development language for OpenHarmony applications. It builds upon TypeScript with enhanced static typing to improve program stability and performance.
modified at runtime
clearer code semantics
| Scenario | Document |
|---|---|
| Syntax Learning | references/en/introduction-to-arkts.md |
| Quick Overview | references/en/arkts-get-started.md |
| TS Migration | references/en/typescript-to-arkts-migration-guide.md |
| Migration Background | references/en/arkts-migration-background.md |
| Performance | references/en/arkts-high-performance-programming.md |
| More Cases | references/en/arkts-more-cases.md |
User Question -> Identify Question Type -> Consult Documentation -> Provide Code ExampleCommon Syntax Questions:
let/const with explicit type or inferencearrow functions
implementation
chaining ((?.))
Identify TS Code -> Check Incompatible Features -> Consult Migration Rules -> Provide ArkTS AlternativeKey Migration Rules Quick Reference:
| TypeScript | ArkTS Alternative |
|---|---|
var x | let x |
any/unknown | Specific types |
{n: 42} object literal | Define class/interface first |
[index: T]: U index signature | Record<T, U> |
A & B intersection type | interface C extends A, B |
function(){} function expression | () => {} arrow function |
<Type>value type assertion | value as Type |
Destructuring [a, b] = arr | Individual access arr[0], arr[1] |
for..in | for loop or for..of |
| Constructor parameter properties | Explicit field declaration |
Analyze Code -> Identify Performance Issues -> Consult Optimization Guide -> Provide SolutionsHigh-Performance Programming Key Points:
const for invariants; avoid mixing integer and floatparameters
type arrays
Get Error Message -> Search Migration Rules -> Find Related Case -> Provide Fix// Error
let data = JSON.parse(str);
// Correct
let data: Record<string, Object> = JSON.parse(str);// TypeScript syntax (not supported in ArkTS)
type Person = { name: string, age: number }
// ArkTS syntax
interface Person {
name: string;
age: number;
}
// Using object literal
let p: Person = { name: 'John', age: 25 };// Error
globalThis.value = 'xxx';
// Use singleton pattern
export class GlobalContext {
private constructor() {}
private static instance: GlobalContext;
private _objects = new Map<string, Object>();
public static getContext(): GlobalContext {
if (!GlobalContext.instance) {
GlobalContext.instance = new GlobalContext();
}
return GlobalContext.instance;
}
getObject(key: string): Object | undefined {
return this._objects.get(key);
}
setObject(key: string, value: Object): void {
this._objects.set(key, value);
}
}// Error
try {} catch (e: BusinessError) {}
// Correct
try {} catch (error) {
let e: BusinessError = error as BusinessError;
}// TypeScript index signature
function foo(data: { [key: string]: string }) {}
// ArkTS Record
function foo(data: Record<string, string>) {}
// Usage example
let map: Record<string, number> = {
'John': 25,
'Mary': 21,
};// TypeScript constructor signature
type ControllerCtor = {
new (value: string): Controller;
}
// ArkTS factory function
type ControllerFactory = () => Controller;
class Menu {
createController: ControllerFactory = () => {
return new Controller('default');
}
}The following are prohibited in ArkTS:
eval__proto__, defineProperty, freeze, getPrototypeOf, etc.apply, construct, defineProperty, etc.The scripts directory provides quick compilation scripts for ArkTS projects (including dependency installation):
| Platform | Script | Purpose |
|---|---|---|
| macOS/Linux | scripts/run.sh | Execute ohpm install + hvigorw assembleApp |
| Windows | scripts/run.ps1 | Execute ohpm install + hvigorw assembleApp |
Usage:
# macOS/Linux
bash scripts/run.sh
# Windows PowerShell
.\scripts\run.ps1Script execution steps:
ohpm install --all)hvigorw assembleApp)CRITICAL: When this skill generates ArkTS code, the following workflow MUST be followed:
bash scripts/run.sh.\scripts\run.ps1AskUserQuestion: Question: Compilation failed after 3 attempts. How would you like to proceed?
Options:
- Continue retrying (attempt another fix)
- Manual intervention (I'll wait for your guidance)
- Skip compilation (proceed without verification)consult corresponding documents in references/
stability)
alternatives
MIT License - see LICENSE.txt
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.