Arkts Sta Playgroundのロゴ

Arkts Sta Playground

組織
openharmonyinsight
arkts-sta-playground

Execute ArkTS-Sta code snippets and files via the Playground HTTP API. Use this for testing ArkTS syntax, learning ArkTS features, verifying code logic, or demonstrating code execution results.

概要

公開者openharmonyinsight
リポジトリopenharmony-skills
スキル名arkts-sta-playground
スター
36
フォーク
7
同梱ファイル
3
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    openharmonyinsightがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Arkts Sta Playground」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/arkts-sta-playground
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openharmonyinsight/openharmony-skills.git /tmp/openharmony-skills
mkdir -p .claude/skills
cp -r /tmp/openharmony-skills/skills/arkts-sta-playground .claude/skills/arkts-sta-playground
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでArkts Sta Playgroundを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にArkts Sta Playgroundを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Arkts Sta Playgroundは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込む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:

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

Run code directly as a string:

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

Get JSON output for programmatic parsing:

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

Setup Requirements

Install Python dependencies:

bash
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:

bash
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:

bash
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:

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

Response:

json
{
  "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
bash
# 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:

bash
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:

bash
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:

bash
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:

bash
# 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):

json
{
  "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:

bash
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

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Arkts Sta Playground」では何ができますか?

Execute ArkTS-Sta code snippets and files via the Playground HTTP API. Use this for testing ArkTS syntax, learning ArkTS features, verifying code logic, or demonstrating code execution results.

TypingMindでArkts Sta Playgroundを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Arkts Sta Playgroundはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにArkts Sta Playgroundをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/arkts-sta-playgroundを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Arkts Sta Playgroundを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Arkts Sta Playgroundで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもArkts Sta Playgroundを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Arkts Sta Playground」は無料ですか?

openharmonyinsightがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇