Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问许可证需确认审计异常

arkts-sta-playgroundarkts sta 游乐场

Agent Skill

arkts-sta-playground 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

939

周安装

38

GitHub Stars

18

下载量

295
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill arkts-sta-playground

简介

arkts-sta-playground 通过 HTTP API 快速执行 ArkTS-Sta 代码,无需浏览器自动化即可验证语法逻辑。

  • 适合在集成测试或教育场景中运行轻量级脚本,获取结构化输出用于程序化处理。
  • 支持命令行参数传入文件路径或直接执行字符串代码,返回 JSON 格式结果便于解析。
  • 使用前需安装 Python 依赖并配置 playground 服务端地址,注意并发请求的速率限制。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

ArkTS-Sta Playground Runner

Overview

This skill runs ArkTS-Sta code using the ArkTS-Sta Playground HTTP API, providing fast and reliable code execution without browser automation.

Quick Start

Basic Usage

Run an ArkTS-Sta file:

python3 scripts/run_playground.py path/to/code.ets

Run code directly as a string:

python3 scripts/run_playground.py --code "let x: number = 42; console.log(x);"

Get JSON output for programmatic parsing:

python3 scripts/run_playground.py --json --code "console.log('Hello');"

Setup Requirements

Install Python dependencies:

pip install -r scripts/requirements.txt

Required package: requests>=2.31.0

Usage Patterns

Pattern 1: Quick Code Testing

When testing ArkTS-Sta syntax or verifying code logic:

python3 scripts/run_playground.py --code "
enum Numbers {
  A = 10,
  B = 2.57,
  C = 0x2B7F,
  D = -1.5,
  E = 12
}
"

Pattern 2: Batch Testing

For testing multiple files:

for file in test/*.ets; do
    python3 scripts/run_playground.py --json "$file" > "results/$(basename $file .ets).json"
done

How It Works

The script uses the HTTP API endpoint:

  1. Sends your ArkTS-Sta code to https://arkts-play.cn.bz-openlab.ru:10443/compile
  2. Receives compilation results and output
  3. Returns formatted results (success status, output, errors)

API Endpoint

Base URL: https://arkts-play.cn.bz-openlab.ru:10443/compile

Method: POST

Request:

{
  "code": "your ArkTS-Sta code here"
}

Response:

{
  "output": "execution output or empty",
  "error": "error message if compilation failed, null otherwise"
}

Troubleshooting

Connection issues

If you get connection errors:

  1. Check internet connectivity
  2. Verify the API endpoint is accessible
  3. Check firewall settings
# Test connectivity
curl -X POST https://arkts-play.cn.bz-openlab.ru:10443/compile \
  -H "Content-Type: application/json" \
  -d '{"code":"let x: number = 42;"}'

Timeout issues

Increase timeout if the API is slow:

python3 scripts/run_playground.py --timeout 60 path/to/code.ets

SSL certificate errors

If you encounter SSL certificate issues, you may need to:

  • Ensure your system's CA certificates are up to date
  • Or modify the script to disable SSL verification (not recommended for production)

Common Use Cases

Learn ArkTS Syntax

Test and explore ArkTS language features:

python3 scripts/run_playground.py --code "
// Test union types
let value: string | number = 'hello';
value = 42;
console.log(value);
"

Quick Prototype Verification

Verify code logic before integrating into your project:

python3 scripts/run_playground.py --code "
function calculateSum(a: number, b: number): number {
    return a + b;
}
console.log('Sum:', calculateSum(10, 20));
"

Debug Code Snippets

Find compilation errors in your code:

# Run with JSON output for programmatic checking
python3 scripts/run_playground.py --json problem.ets

# Check exit status
if python3 scripts/run_playground.py code.ets; then
    echo "Compilation successful"
else
    echo "Compilation failed"
fi

Script Output

The script returns a JSON structure (with --json flag):

{
  "success": true,
  "output": "Execution result here...",
  "error": null,
  "has_error": false
}

Fields:

  • success: Boolean indicating if the API request succeeded
  • output: Code output or compilation output
  • error: Error message if compilation failed, null otherwise
  • has_error: Boolean indicating if the code has compilation errors

Example: Testing Enum with Floating Point

Test if enum with non-integer values causes errors:

python3 scripts/run_playground.py --code "
enum Numbers {
  A = 10,
  B = 2.57,
  C = 0x2B7F,
  D = -1.5,
  E = 12
}
"

Expected result: Should fail with an error about enum values needing to be integers.

Limitations

  • Requires internet access to the API endpoint
  • API rate limiting may apply
  • Compilation output format depends on the API response

Tips for Efficient Usage

  1. Use JSON output for programmatic processing (--json)
  2. Batch test multiple files using shell loops
  3. Check exit codes in scripts for success/failure

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.83%
按下载量换算112

Claude

27.16%
按下载量换算80

Cursor

18.32%
按下载量换算54

Gemini CLI

8.89%
按下载量换算26

安全审计

Gen Agent Trust Hub

未通过

Socket

未通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

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

来源信息

继续浏览同类 Skills