Hikkaku skill
A library and skill for Scratch in TypeScript: the agent writes blocks as code and the build outputs JSON for the editor
- 66 ★ on the repository
- Last commit
- MIT
Minimal access
Why this level
- The skill holds instructions and rules, while install commands download packages from npm
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/hikkakuDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewMinimal accessThe tool runs nothing and makes no network calls.
- The skill holds instructions and rules, while install commands download packages from npm
This is third-party code. Review the repository files before installing.
What it does
Hikkaku describes a Scratch project in TypeScript. Sprites, costumes and blocks are created with calls to `Project`, `createSprite`, `whenFlagClicked`, `gotoXY` and `forever`, and `project.toScratch()` returns JSON that opens in the Scratch editor. The `hikkaku/vite` plugin adds hot reload: after `bun vite` the project is visible on `localhost:5173`. For agents the project ships a skill in `packages/skill`, installed with `npx skills add pnsk-lab/hikkaku/packages/skill` (variants for Bun, Deno, pnpm and Yarn exist). Inside is a `rules/` folder with rules by block category: motion, looks, sound, music, events, control, sensing, operators, variables, procedures and pen. Separate notes cover clones, physics, custom blocks, calculation and initialization. A new project is scaffolded with `npx create-hikkaku@latest my-hikkaku-app`. The `--agents` and `--link-claude` options add `AGENTS.md` and a `CLAUDE.md` link, and `--skills` installs the skill right away. Codex, Claude Code or OpenCode then get a project with ready instructions.
Who it is for. Developers and teachers who build Scratch projects in code and want to hand blocks over to an AI agent.
Good fit when
- A Scratch game is made of dozens of sprites and is easier to keep in Git and a code editor
- An agent must generate block chains for events, loops and procedures from a description
- Hot reload of a Scratch project through Vite is wanted
- A new project starts with `AGENTS.md`, a `CLAUDE.md` link and the skill installed
Not a fit when
- The project is built entirely with the mouse in the Scratch editor and code is not wanted
- Other visual programming languages are needed: the library works with Scratch only
- The environment supports none of Node, Bun or Deno
Example request
Create a catcher sprite in Hikkaku that follows the mouse on the X axis and run the project with `bun vite`Limitations
The library output remains a Scratch JSON project opened in the editor by hand, and capabilities are limited to the block set described in the skill rules. Hot reload works through the Vite Environment API and needs a configured `vite.config.ts` with the `hikkaku/vite` plugin. The skill lives in the `packages/skill` subfolder of a monorepo, so installation names the full path. Documentation and rules are in English. `create-hikkaku` takes the package manager through the `--pm` flag and fetches its template by Git tag.
How to disable. Delete the `.agents/skills/hikkaku/` and `.agent/skills/hikkaku/` folders from the project and the `hikkaku` package from dependencies.
FAQ
How do I install the Hikkaku skill?
Run `npx skills add pnsk-lab/hikkaku/packages/skill`. The README lists variants for Bun, Deno, pnpm and Yarn. The skill suits Codex, Claude Code and OpenCode.
How do I scaffold a project from scratch?
Run `npx create-hikkaku@latest my-hikkaku-app`, then `bun install` and `bun dev`. The `-y` flag skips prompts and `--pm` sets the package manager.
How do I open the result in Scratch?
Calling `project.toScratch()` returns the project JSON, which is loaded in the Scratch editor. With the Vite plugin the project is visible on `localhost:5173`.
Where do hat events such as whenFlagClicked go?
Event (hat) blocks are called directly inside `sprite.run()`. Nested control blocks such as `forever` accept other blocks inside their function.
Which agents work with the project?
The skill targets Codex, Claude Code and OpenCode. The `--link-claude` flag creates `CLAUDE.md` pointing to `AGENTS.md` so instructions are shared.
Discussion
No questions or reviews yet.
Related
SkillsA set of skills from real work: npm supply-chain audit, CLI building, Obsidian plugin release and an AGENTS.md hierarchy
skill-kit builds agent skills as typed TypeScript state machines with schema-checked answers and a build into a SKILL.md directory
17 ready skills for tests, Git, READMEs and multi-agent work plus a kernel that checks skill execution in Claude Code and Codex.
A set of 116 skills, 44 agents and safety hooks for Claude Code, Cursor, Codex, Gemini CLI and nine more editors
The author's personal set: shared agent rules and dozens of skills for GitHub, the browser, macOS, messaging and releases, plus a sync script
Four skills take an idea to an approved spec and reviewed code, with state kept in the project .kiko folder
README in short
The README presents Hikkaku briefly as Scratch in TypeScript: package installation, the `create-hikkaku` template, a basic example, the Vite plugin, the agent skill and building the project.
README badge
Original SKILL.md
---
name: hikkaku
description: Create Scratch project with TypeScript using Hikkaku; use when the user asks how to build or structure a Scratch project in this repo.
license: MIT
metadata:
author: Shotaro Nakamura
---
# Hikkaku Best Practices
This document provides best practices for using Hikkaku to create Scratch projects with TypeScript. Follow these guidelines to ensure your projects are well-structured and maintainable.
## SKILL Structure
* `rules/`: Contains individual rules or guidelines for using Hikkaku effectively.
* `initialization.md`: Guidelines for initializing Hikkaku projects.
* `blocks/*.md`: Guidelines for using specific blocks in Hikkaku.
* e.g., `control.md`, `data.md`, `motion.md`, etc.
* `clone.md`: Guidelines for using clones in Hikkaku.
* `custom-blocks.md`: Guidelines for creating and using custom blocks.
* `pen-100.md`: Performance rules for 100% pen-rendered projects.
* `physics.md`: Guidelines for implementing 2d physics in Scratch projects.
* `positioning.md`: Rules for positioning systems in Scratch projects.
* `usage.md`: General usage guidelines for Hikkaku.
* `variable.md`: Rules for using variables and lists in Hikkaku.