据 AlphaMoat 统计,截至 2026-10,Code Runner 累计下载 6,241 次、获 3 个星标,按累计下载量在本次参与排名的 5,109 个 AI 技能中排名第 2,163 位,在「开发编程」分类(560 个)中排名第 232 位。
列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。
| 平台 | 累计下载 | 星标 | 评论 |
|---|---|---|---|
| ClawHub ↗ | 3,547 | - | - |
| SkillHub ↗ | 6,241 | 3 | — |
各平台的计数口径不同,统计时间不一致。
支持 30 余种编程语言(JavaScript、Python、TypeScript、Java、C、C++、Go、Rust、Ruby、PHP 等)的代码片段运行。适用于用户需要...
2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。
| 月份 | 累计下载 | 环比 | 星标 |
|---|---|---|---|
| 2026-10 | 6,241 | — | 3 |
| 2026-09 | 4,638 | — | 3 |
| 2026-08 | 3,754 | +18.9% | 3 |
| 2026-07 | 3,156 | +15.0% | 3 |
| 2026-06 | 2,744 | +10.0% | 2 |
| 2026-05 | 2,494 | — | 2 |
| 2026-03 | 1,265 | — | - |
以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。
--- name: code-runner description: Run code snippets in 30+ programming languages including JavaScript, Python, TypeScript, Java, C, C++, Go, Rust, Ruby, PHP, and more. Use when the user wants to execute code, test algorithms, verify output, run scripts, or check code behavior. Supports both interpreted and compiled languages. --- # Code Runner Skill This skill enables you to run code snippets in multiple programming languages directly from the command line. ## When to Use This Skill
Use this skill when:
- The user wants to run or execute a code snippet
- Testing algorithm implementations or logic
- Verifying expected output of code
- Running quick scripts or one-liners
- Checking syntax or runtime behavior
- Demonstrating code functionality
## Supported Languages
The following languages are supported (requires the interpreter/compiler to be installed):
| Language | Command | File Extension |
|----------|---------|----------------|
| JavaScript | `node` | `.js` |
| TypeScript | `ts-node` | `.ts` |
| Python | `python` | `.py` |
| Java | `java` (compile & run) | `.java` |
| C | `gcc` (compile & run) | `.c` |
| C++ | `g++` (compile & run) | `.cpp` |
| Go | `go run` | `.go` |
| Rust | `rustc` (compile & run) | `.rs` |
| Ruby | `ruby` | `.rb` |
| PHP | `php` | `.php` |
| Perl | `perl` | `.pl` |
| Lua | `lua` | `.lua` |
| R | `Rscript` | `.r` |
| Swift | `swift` | `.swift` |
| Kotlin | `kotlin` | `.kts` |
| Scala | `scala` | `.scala` |
| Groovy | `groovy` | `.groovy` |
| Dart | `dart` | `.dart` |
| Julia | `julia` | `.jl` |
| Haskell | `runhaskell` | `.hs` |
| Clojure | `clojure` | `.clj` |
| F# | `dotnet fsi` | `.fsx` |
| C# | `dotnet script` | `.csx` |
| PowerShell | `pwsh` | `.ps1` |
| Bash | `bash` | `.sh` |
| Batch | `cmd /c` | `.bat` |
| CoffeeScript | `coffee` | `.coffee` |
| Crystal | `crystal` | `.cr` |
| Elixir | `elixir` | `.exs` |
| Nim | `nim compile --run` | `.nim` |
| OCaml | `ocaml` | `.ml` |
| Racket | `racket` | `.rkt` |
| Scheme | `scheme` | `.scm` |
| Lisp | `sbcl --script` | `.lisp` |
See [references/LANGUAGES.md](references/LANGUAGES.md) for detailed language configuration.
## How to Run Code
### Step 1: Identify the Language
Determine the programming language from:
- User's explicit request (e.g., "run this Python code")
- File extension if provided
- Code syntax patterns
### Step 2: Execute Using the Runner Script
**⚠️ Important for AI Agents**: Use stdin to avoid escaping issues with quotes, backslashes, and special characters.
**Recommended Method (stdin):**
```bash
echo "<code>" | node scripts/run-code.cjs <languageId>
```
**Alternative Method (CLI argument - for simple code only):**
```bash
node scripts/run-code.cjs <languageId> "<code>"
```
**Example - JavaScript:**
```bash
echo "console.log('Hello, World!')" | node scripts/run-code.cjs javascript
```
**Example - Python:**
```bash
echo "print('Hello, World!')" | node scripts/run-code.cjs python
```
**Example - Java (multi-line):**
```bash
echo "public class Test {
public static void main(String[] args) {
System.out.println(\"Hello from Java!\");
}
}" | node scripts/run-code.cjs java
```
**Example - Multi-line code from variable:**
```bash
# In bash
CODE='import math
print("Pi:", math.pi)
print("Result:", math.factorial(5))'
echo "$CODE" | node scripts/run-code.cjs python
# In PowerShell (inline here-string)
@"
import math
print("Pi:", math.pi)
print("Result:", math.factorial(5))
"@ | node scripts/run-code.cjs python
```
### Step 3: Return Results
- Show the output (stdout) to the user
- If there are errors (stderr), explain what went wrong
- Suggest fixes for common errors
## Platform Notes
### Windows
- Use `cmd /c` for batch scripts
- PowerShell scripts require `pwsh` or `powershell`
- Path separators use backslash `\`
### macOS / Linux
- Bash scripts work natively
- Swift available on macOS
- Use `#!/usr/bin/env` shebang for portable scripts
## Error Handling
Common issues and solutions:
1. **Command not found**: The language interpreter is not installed or not in PATH
- Suggest installing the required runtime
- Provide installation instructions
2. **Syntax errors**: Code has syntax issues
- Show the error message
- Point to the line number if available
3. **Runtime errors**: Code runs but fails during execution
- Display the stack trace
- Explain the error type
4. **Timeout**: Code takes too long (default: 30 seconds)
- Warn about infinite loops
- Suggest optimizations
## Security Considerations
⚠️ **Important**: Running arbitrary code can be dangerous. Always:
1. Review the code before execution
2. Be cautious with code that:
- Accesses the file system
- Makes network requests
- Executes system commands
- Modifies environment variables
3. Consider running in a sandboxed environment for untrusted code
## Examples
### Example 1: Run a JavaScript calculation
```bash
echo "console.log(Array.from({length: 10}, (_, i) => i * i))" | node scripts/run-code.cjs javascript
```
Output: `[0, 1, 4, 9, 16, 25, 36, 49, 64, 81]`
### Example 2: Run Python with imports
```bash
echo "import math; print(math.factorial(10))" | node scripts/run-code.cjs python
```
Output: `3628800`
### Example 3: Test a Go function
```bash
echo 'package main; import "fmt"; func main() { fmt.Println("Hello from Go!") }' | node scripts/run-code.cjs go
```
Output: `Hello from Go!`
用 gh 命令行工具查看 GitHub 上的 PR 检查、工作流运行与 API 查询的技能。
根据文字描述生成 Mermaid 图表代码。
聚合 16 个搜索引擎、无需 API Key 的检索技能。
ProcessOn Diagram Generator 说明从自然语言生成可编辑在线图表的流程。
用命令行直接列出、配置、授权并调用 MCP 服务与工具。
用受管 OAuth 访问 YouTube Data API,检索视频并管理频道内容。
xdrop 通过 Xdrop 服务器在终端上传本地文件或目录、下载加密分享链接。
通过受管的 OAuth 连接访问 GitHub REST API。
数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。