Agent skill

Code Runner

by zhinjs in zhinjs/zhin

在线代码执行能力。当用户要求运行代码片段、验证算法、测试函数输出、 或想看某段代码的执行结果时使用。支持 Python、JavaScript、TypeScript、 Go、Rust、Java、C/C++、Ruby、PHP 等语言。即使用户只是说「帮我跑一下这段代码」 或贴了一段代码想看结果,也应触发。

MITAuto-check passed

Install Code Runner

skills CLI
$ npx skills add zhinjs/zhin --skill code-runner -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zhinjs/zhin code-runner --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zhinjs/zhin.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/utils/code-runner/skills/code-runner .claude/skills/code-runner && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
code-runner
GitHub stars
137
Token cost
~235 tokens
SKILL.md length
51 words
Files
2
Skills in repo
11
Repo updated
First seen
Licence
MIT

At a glance

在线代码执行能力。当用户要求运行代码片段、验证算法、测试函数输出、 或想看某段代码的执行结果时使用。支持 Python、JavaScript、TypeScript、 Go、Rust、Java、C/C++、Ruby、PHP 等语言。即使用户只是说「帮我跑一下这段代码」 或贴了一段代码想看结果,也应触发。

  • Works in 3 steps: language 参数必须是上面列出的标识符,不接受中文或全名(如用… → C 和 C++ 是不同的 language 值:c 和 cpp。 → 代码需要有输出语句(print/console.log/fmt.Println…
  • SKILL.md covers 使用方式, 限制 and 易错点
  • Runs TypeScript scripts from its folder

What it does

Code Runner is an agent skill from zhinjs/zhin. 在线代码执行能力。当用户要求运行代码片段、验证算法、测试函数输出、 或想看某段代码的执行结果时使用。支持 Python、JavaScript、TypeScript、 Go、Rust、Java、C/C++、Ruby、PHP 等语言。即使用户只是说「帮我跑一下这段代码」 或贴了一段代码想看结果,也应触发。

Its SKILL.md is about 240 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files (for example `tools/run_code/index.ts`).

It works with C++, Python, TypeScript and Java. The repository describes itself as: AI-native TypeScript bot framework — one codebase for 20+ chat platforms (QQ, Discord, Telegram, Slack, WeChat…). Opt-in AI agent with MCP, tools & security policies. <10MB core. The licence is MIT.

Example prompts

  • “/code-runner”

Requirements

  • Python 3
  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. language 参数必须是上面列出的标识符,不接受中文或全名(如用 python 不用 Python3)。
  2. C 和 C++ 是不同的 language 值:c 和 cpp。
  3. 代码需要有输出语句(print/console.log/fmt.Println 等),否则返回为空。

What it can do on your machine

Read from SKILL.md and the folder at commit fd5029a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (TypeScript), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Runner loads about 235 tokens when it runs. Until then it costs about 41 tokens; SKILL.md has 51 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~235

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zhinjs/zhin at commit fd5029a, republished under its MIT licence (© zhinjs). 51 words, ~235 tokens.

Download SKILL.mdSave it as .claude/skills/code-runner/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
code-runner
description
在线代码执行能力。当用户要求运行代码片段、验证算法、测试函数输出、 或想看某段代码的执行结果时使用。支持 Python、JavaScript、TypeScript、 Go、Rust、Java、C/C++、Ruby、PHP 等语言。即使用户只是说「帮我跑一下这段代码」 或贴了一段代码想看结果,也应触发。
keywords
code, run, 运行, 代码, execute, sandbox, python, javascript, 编程, 执行, 测试
tags
code-runner, development, sandbox
tools
run_code

在线代码执行技能

通过 glot.io API 在隔离沙箱中执行代码,不影响本地环境。

使用方式

调用 run_code 工具,传入 language(语言标识)和 code(代码内容)。

支持语言: python, javascript, typescript, go, rust, java, c, cpp, ruby, php

Example:

用户: 帮我算一下 1 到 100 的和
→ run_code(language="python", code="print(sum(range(1, 101)))")

限制

  • 代码长度上限 10000 字符
  • 执行超时 30 秒
  • 无法访问网络和文件系统(沙箱隔离)
  • 不支持交互式输入(stdin)

易错点

  1. language 参数必须是上面列出的标识符,不接受中文或全名(如用 python 不用 Python3)。
  2. C 和 C++ 是不同的 language 值:c 和 cpp。
  3. 代码需要有输出语句(print/console.log/fmt.Println 等),否则返回为空。

© zhinjs, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in plugins/utils/code-runner/skills/code-runner of zhinjs/zhin.

  • SKILL.md
  • tools/run_code/index.ts

Open the folder on GitHubat commit fd5029a

Compare with similar skills

Code Runner next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Runner compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Runner this skillzhinjs/zhin137—~235Automated safety check: PassMIT
CodeQL Security Scantrailofbits/skills7.4k—~4.6kAutomated safety check: NotesCC-BY-SA-4.0
Code TranslationArabelaTso/Skills-4-SE253—~3.1kAutomated safety check: PassApache-2.0
Failure Oriented InstrumentationArabelaTso/Skills-4-SE253—~2.1kAutomated safety check: PassApache-2.0
Fory Releaseapache/fory4.6k—~2.9kAutomated safety check: PassApache-2.0
Code Audit3stoneBrother/code-audit8931 repos~2.7kAutomated safety check: PassNone

Similar skills

  • CodeQL Security Scan

    trailofbits/skills

    Official

    Scans a codebase for vulnerabilities with CodeQL's data flow and taint tracking in run-all or important-only modes, including data extensions for project-specific sources and sinks.

    7.4k GitHub stars~4.6k tokensUpdated yesterday
    SecurityAuto-check: notes
  • Code Translation

    ArabelaTso/Skills-4-SE

    Convert code between programming languages while preserving functionality and semantics.

    253 GitHub stars~3.1k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed
  • Failure Oriented Instrumentation

    ArabelaTso/Skills-4-SE

    Selectively instruments code to capture runtime data for debugging failures and bugs.

    253 GitHub stars~2.1k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Fory Release

    apache/fory

    Prepare an Apache Fory release candidate from a clean release branch, including the version bump, RC tag, JVM staging, ASF source artifacts, SVN upload, and vote email.

    4.6k GitHub stars~2.9k tokensUpdated yesterday
    Auto-check passed
  • Code Audit

    3stoneBrother/code-audit

    Professional code security audit skill covering 55+ vulnerability types.

    893 GitHub starsUsed in 1 repo~2.7k tokens
    SecurityAuto-check passed
  • Bump Apache Fory release or post-release development versions across Java, Kotlin, Scala, Python, Rust, Go, C++, C, Dart, JavaScript, Swift, integration tests, examples, and source docs.

    4.6k GitHub stars~1.1k tokensUpdated yesterday
    MobileAuto-check passed

More from zhinjs/zhin

All 11 skills in this repo
  • Refactor existing Zhin.js plugins into a cleaner standard structure.

    137 GitHub stars~1.1k tokensUpdated 15 days ago
    Auto-check passed
  • Migrate legacy Zhin.js plugins and projects to the convention-based Plugin Runtime — from usePlugin/getPlugin/addCommand/addMiddleware/addComponent/addTool/addCron/declareConfig/useContext and…

    137 GitHub stars~1.6k tokensUpdated 15 days ago
    Auto-check passed
  • Zhin Audit

    zhinjs/zhin

    Audit Zhin.js changes for security, performance, lifecycle, and architecture regressions.

    137 GitHub stars~596 tokensUpdated 15 days ago
    Auto-check: notes
  • Implement Zhin.js plugins with Plugin Runtime. An agent skill from zhinjs/zhin.

    137 GitHub stars~1.6k tokensUpdated 15 days ago
    Auto-check passed
  • GitHub CLI

    zhinjs/zhin

    使用 gh CLI 处理内置 GitHub Tool 未覆盖的 Issue、PR、Release、Workflow、搜索和 API 操作。

    137 GitHub stars~366 tokensUpdated 15 days ago
    Auto-check passed
  • Wecom

    zhinjs/zhin

    企业微信平台管理能力。当用户在企业微信中请求用户信息查询、部门架构查询、 发送文本消息时使用。即使用户没有提到企业微信,只要上下文是企业微信/WeCom 场景且涉及用户查询、部门管理或消息发送,就应触发。

    137 GitHub stars~297 tokensUpdated 15 days ago
    Auto-check passed

Questions about Code Runner

What does Code Runner do?

在线代码执行能力。当用户要求运行代码片段、验证算法、测试函数输出、 或想看某段代码的执行结果时使用。支持 Python、JavaScript、TypeScript、 Go、Rust、Java、C/C++、Ruby、PHP 等语言。即使用户只是说「帮我跑一下这段代码」 或贴了一段代码想看结果,也应触发。. Code Runner is an agent skill from zhinjs/zhin.

How do I install Code Runner in Claude Code?

Run `npx skills add zhinjs/zhin --skill code-runner -a claude-code`. Or copy the skill folder (plugins/utils/code-runner/skills/code-runner in zhinjs/zhin) into .claude/skills/code-runner in your project. Claude Code loads it when a task matches its description.

How do I install Code Runner in Codex?

Run `npx skills add zhinjs/zhin --skill code-runner -a codex`. Or copy the skill folder (plugins/utils/code-runner/skills/code-runner in zhinjs/zhin) into .agents/skills/code-runner in your project. Codex loads it when a task matches its description.

Can I use Code Runner in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhinjs/zhin --skill code-runner -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-runner, .gemini/skills/code-runner, .github/skills/code-runner and .opencode/skills/code-runner in your project.

What does Code Runner need to run?

Going by SKILL.md and its folder, Code Runner needs TypeScript for the scripts in its folder. Our summary lists: Python 3; Node.js.

Does Code Runner access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Code Runner safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Runner use?

Code Runner is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Runner use?

About 235 tokens (SKILL.md is roughly 940 characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Code Runner?

Skills that share tags, products or a category with Code Runner: CodeQL Security Scan (trailofbits/skills, 7.4k stars), Code Translation (ArabelaTso/Skills-4-SE, 253 stars), Failure Oriented Instrumentation (ArabelaTso/Skills-4-SE, 253 stars) and Fory Release (apache/fory, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Runner?

zhinjs (a GitHub organization) maintains it in zhinjs/zhin, which has 137 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 23, 2026.

Source: zhinjs/zhin on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.