{"id":6039,"date":"2026-04-27T22:02:48","date_gmt":"2026-04-27T22:02:48","guid":{"rendered":"https:\/\/dalelane.co.uk\/blog\/?p=6039"},"modified":"2026-04-27T22:02:48","modified_gmt":"2026-04-27T22:02:48","slug":"how-to-create-a-scratch-extension","status":"publish","type":"post","link":"https:\/\/dalelane.co.uk\/blog\/?p=6039","title":{"rendered":"How to create a Scratch extension"},"content":{"rendered":"<p>A few years ago, I <a href=\"https:\/\/www.raspberrypi.org\/clubs-conference-2023\/\">ran a workshop<\/a> about how to create custom <a href=\"https:\/\/scratch.mit.edu\/\">Scratch<\/a> blocks.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/images.dalelane.co.uk\/2026-04-27-scratch\/scratch-extension.jpg\" style=\"border: thin black solid; width: 100%; max-width: 600px;\"\/><\/p>\n<p>I made <a href=\"https:\/\/github.com\/dalelane\/scratch-extension-development\">a template repository<\/a>, based on the <a href=\"https:\/\/github.com\/scratchfoundation\">Scratch Team repos<\/a>, but with <a href=\"https:\/\/github.com\/dalelane\/scratch-extension-development\/blob\/master\/your-scratch-extension\/index.js\">a skeleton extension<\/a> and some extra scripts and automation to handle building and publishing it. I included <a href=\"https:\/\/github.com\/dalelane\/scratch-extension-development\/blob\/master\/INSTRUCTIONS.md\">step-by-step instructions<\/a> for building different types of Scratch extensions, including Scratch blocks based on web APIs, and Scratch blocks based on JavaScript modules from <a href=\"https:\/\/www.npmjs.com\">npm<\/a>.<\/p>\n<p><!--more-->I created it for educators and coding group volunteers, who would like to customize Scratch for their students by giving them new and unique blocks to make things with. I wanted to make this idea accessible to people who perhaps don&#8217;t necessarily think of themselves as developers and wouldn&#8217;t otherwise know what it means to clone the Scratch Team repo and start hacking it.<\/p>\n<p>Scratch has changed a lot in the few years since I first made that, most notably moving from being split across a large number of packages in different repos <a href=\"https:\/\/github.com\/scratchfoundation\/scratch-editor#monorepo-migration\">to a monorepo<\/a>. So this week I gave my setup <a href=\"https:\/\/github.com\/dalelane\/scratch-extension-development\/commit\/27fb5338217a141663e6a2e6f5e48e741c38f2ec\">a bit of a spring-clean to get it up to date<\/a>. <\/p>\n<p>If you&#8217;d like to give it a go, please go to <a href=\"https:\/\/github.com\/dalelane\/scratch-extension-development\/blob\/master\/INSTRUCTIONS.md\">the instructions<\/a> and follow along! (<em>I haven&#8217;t updated the screenshots&#8230; sorry &#8211; github does look a little different since 2023, but I <strike>felt that it was close enough to still be understandable<\/strike> was too lazy to re-take all the screenshots. Hopefully that isn&#8217;t a blocker.<\/em>) <\/p>\n<p><iframe loading=\"lazy\" width=\"450\" height=\"260\" src=\"https:\/\/www.youtube-nocookie.com\/embed\/bX9ZqhuxtnI?si=6TgKuXc2z5iF7HWS\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><br \/>\n<small><a href=\"https:\/\/youtu.be\/bX9ZqhuxtnI\">workshop video on YouTube<\/a><\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few years ago, I ran a workshop about how to create custom Scratch blocks. I made a template repository, based on the Scratch Team repos, but with a skeleton extension and some extra scripts and automation to handle building and publishing it. I included step-by-step instructions for building different types of Scratch extensions, including [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6042,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[536],"class_list":["post-6039","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","tag-scratch"],"_links":{"self":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6039"}],"version-history":[{"count":3,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6039\/revisions"}],"predecessor-version":[{"id":6043,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6039\/revisions\/6043"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=\/wp\/v2\/media\/6042"}],"wp:attachment":[{"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dalelane.co.uk\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}