scratch-operation

Automate Scratch programming via Playwright with VM injection and block dragging.

2|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/yokobond/scratch-skills --skill scratch-operation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: scratch-operation
Source: https://github.com/yokobond/scratch-skills/tree/main/plugins/scratch-operation
Command: npx skills add https://github.com/yokobond/scratch-skills --skill scratch-operation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive toolkit for interacting with the Scratch programming environment, enabling both visual block-dragging and programmatic VM injection for creating Scratch projects.

Core Features & Use Cases

  • Programmatic Block Injection: Directly manipulate Scratch VM code by serializing/deserializing project JSON for rapid program creation.
  • Visual Block Dragging: Simulate user interactions by dragging and dropping blocks from the palette to the script area.
  • Costume & Sprite Management: Add custom costumes (SVG/PNG) and manage sprites and backdrops from the Scratch library.
  • Project File Handling: Save and load .sb3 project files.
  • Use Case: Automatically generate a Scratch project that makes a sprite dance by programmatically injecting motion and looks blocks, then save the project as an .sb3 file.

Quick Start

Use the scratch-operation skill to add the 'Hare' sprite to the current project.

Frequently Asked Questions about scratch-operation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Scratch programming with Playwright?

Automate Scratch programming with Playwright by simulating visual block dragging from the palette to the script area, or by using direct VM injection to programmatically manipulate serialized project JSON for rapid block creation.

Can I programmatically inject blocks into a Scratch project?

Programmatically inject blocks into a Scratch project through direct VM injection, which serializes and deserializes the project JSON to rapidly create and manipulate Scratch code blocks without manual dragging.

How do I add custom SVG or PNG costumes to a Scratch sprite?

Add custom SVG or PNG costumes to a Scratch sprite by using the costume and sprite management features to import custom image files, alongside managing sprites and backdrops from the Scratch library.

How do I save and load .sb3 Scratch project files?

Save and load .sb3 Scratch project files by using the project file handling features to export your automated Scratch creations or import existing project files for further modification.

What is the difference between visual block dragging and VM injection in Scratch automation?

Visual block dragging mimics user UI interactions by dragging blocks from the palette, while VM injection directly manipulates Scratch VM code through JSON serialization for faster, programmatic block generation without UI simulation.

Does this Scratch automation tool require any external dependencies?

Scratch automation operates independently without external dependencies, using Playwright to control the Scratch environment and offering both visual UI simulation and direct VM code injection for project creation.