一键导入
scratch-coder
Create Scratch 3.0 projects using Python and ScratchGen. Use when the user wants to generate a .sb3 file with sprites, scripts, and assets.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create Scratch 3.0 projects using Python and ScratchGen. Use when the user wants to generate a .sb3 file with sprites, scripts, and assets.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create a new skill or improve an existing one. Use when the user wants to capture a workflow as a reusable skill, edit a skill, or optimize its triggering.
Search across multiple web providers with automatic failover. Use when the user needs quota-aware, multi-provider web search.
Create an audio interview with a selected agent using OpenAI TTS. Generates a single MP3 file with a Q&A podcast session.
Write technical blog posts about real engineering challenges. Use when the user wants technical content, blog posts, tutorials, or explanations for mixed audiences including non-technical readers.
Automate browser interactions for scraping, testing, and workflows. Use when the user wants to navigate pages, fill forms, extract data, or take screenshots with Puppeteer or Playwright.
Build a composable command-line tool from API docs, OpenAPI specs, SDKs, curl examples, or existing scripts. Use when the user wants a durable CLI that future agents can run from any directory.
| name | scratch-coder |
| description | Create Scratch 3.0 projects using Python and ScratchGen. Use when the user wants to generate a .sb3 file with sprites, scripts, and assets. |
| license | MIT |
| compatibility | claude-code opencode github-copilot devin pi cursor |
Create Scratch 3.0 projects with Python and ScratchGen.
pip install "ScratchGen~=1.1"
from ScratchGen import *
project = Project()
sprite = project.createSprite('Cat')
sprite.createScript(
WhenFlagClicked(),
Show(),
Say('Hello!')
)
project.save('hello.sb3')
Show() in WhenFlagClicked().addCostume() or inject them after saving.Broadcast() / WhenBroadcastReceived() use null IDs in ScratchGen. Use ChangeVariable on global stage variables for cross-sprite state instead.GetAttribute requires ScratchGen constants, not strings: GetAttribute(Y_POSITION, ball).Stop(ALL) clears speech bubbles before rendering. Use a game_over state variable plus a dedicated message sprite.y = -180 to 180. Keep detection thresholds inside the bounds.MoveSteps(N) <= half the target sprite's width to avoid tunneling.dx/dy stage variables and move with ChangeX(Multiply(dx, speed)).project.save() -> add_costumes() -> add_monitors()
python -c "import zipfile; print(zipfile.ZipFile('project.sb3').namelist())"
Open the file in TurboWarp to verify.
references/block-reference.md — complete block reference