code-runner

code-runner is a skill for Claude Code, Codex from zhinjs/zhin. It costs 87 tokens per session (436 once invoked), scanned A, original, MIT.

A sandboxed code execution tool that runs short programs without using your computer's files or network. It supports Python, JavaScript, TypeScript, Go, Rust, Java, C, C++, Ruby, and PHP.

In plain words
What is it for?
Use it to run snippets, check algorithm calculations, and see a function's output. It does not support network access, file access, or interactive input.
Why use it?
It lets you check code results without setting up a local environment or affecting local files. The isolated environment also limits access to your system.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to run snippets, check algorithm calculations, and see a function's output. It does not support network access, file access, or interactive input.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhinjs/zhin/code-runner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zhinjs/zhin --skill code-runner
Clone the repo
git clone --depth 1 https://github.com/zhinjs/zhin

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-runner

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhinjs/zhin/code-runner/github.svg)](https://agentmods.dev/skills/zhinjs/zhin/code-runner)
Your own site
<a href="https://agentmods.dev/skills/zhinjs/zhin/code-runner"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/code-runner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-runner

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhinjs/zhin/code-runner"><img src="https://agentmods.dev/badge/skills/zhinjs/zhin/code-runner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 436 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.00436
Opus 5.5 $0.00035 $0.00174
Sonnet 5.5 $0.00017 $0.00087
Haiku 4.5 $0.00009 $0.00044

Measured 26d ago against content hash fe3bd920da87, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-runner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 26d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (tools/run_code/index.ts), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/utils/code-runner/skills/code-runner/SKILL.md · 56 lines

What it actually says

在线代码执行技能

通过 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 等),否则返回为空。
Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 26d ago First seen · 56 lines · 87 tokens per session scan A fe3bd920da87

Subscribe to this mod's changes

code-runner is a skill published in the GitHub repository zhinjs/zhin (136 stars, last pushed today), licensed MIT. It adds 87 tokens to every session and 436 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-21.

Related

Other skills, from other repositories

code-runner

A tool for running Python, JavaScript, and Bash scripts with safety controls, time limits, and captured output.

chainlesschain/chainlesschain · 26 tokens

fixing-flaky-tests

Guides an agent through reproducing, root-causing, fixing, and validating flaky tests in the PostHog monorepo. Use when a test fails intermittently in CI but passes on rerun or locally, when hogli ci:insights or the debugging-ci-failures skill classifies a failure as a flaky test, when given a GitHub Actions URL for a…

PostHog/posthog · 220 tokens

test-electron-app

Drive the real running PostHog Electron app (live tRPC, workspace-server, real data) over CDP with agent-browser. Connect to the running app on port 9222, test desktop changes against a local Django stack, snapshot the accessibility tree, inspect network requests, and screenshot only when explicitly asked. Use when…

PostHog/posthog · 112 tokens

extending-hobby-smoke-tests

Design, extend, review, or debug PostHog Hobby end-to-end smoke tests in bin/hobby-ci.py and .github/workflows/ci-hobby.yml. Use when adding an ingestion round trip, deciding whether a product belongs in Hobby CI, changing the CI Hobby service topology or API-key scopes, or diagnosing a smoke test that captures data…

PostHog/posthog · 83 tokens

extending-personhog-test-harness

When and how to add scenarios, chaos events, and invariants to the personhog e2e test harness (rust/personhog-test-harness). Use after fixing a bug or regression in the personhog leader path (leader, router, writer, replica, coordination protocol) so the fix gets a permanent regression scenario; when adding a new…

PostHog/posthog · 134 tokens

credit-note-fixer

Fix the tiny credit-note formatting bug and rerun the exact targeted test command.

openai/openai-agents-python · 21 tokens