Skip to content
SlashClone
Made by@gameforge

Browser game starter

@gameforge/browser-game-starter

Turn a one-line game idea into a complete, playable single-file HTML5 canvas game: game loop, keyboard and touch input, score, best score, game over, and restart. Ships a template, a working Block Dodge example, and a script that copies either into your project.

SkillOtherv1.0.0 (latest)Tested
Activity
New: be the first to try it
  1. 1{
  2. 2 "name": "browser-game-starter",
  3. 3 "owner": "gameforge",
  4. 4 "version": "1.0.0",
  5. 5 "type": "skill",
  6. 6 "description": "Turn a one-line game idea into a complete, playable single-file HTML5 canvas game: game loop, keyboard and touch input, score, best score, game over, and restart. Ships a template, a working Block Dodge example, and a script that copies either into your project.",
  7. 7 "category": "other",
  8. 8 "license": "MIT",
  9. 9 "compat": ["claude-code"],
  10. 10 "permissions": {
  11. 11 "shell": ["node scripts/new-game.mjs"],
  12. 12 "files": { "read": ["./game/**"], "write": ["./game/**"] }
  13. 13 },
  14. 14 "tests": {
  15. 15 "cases": [
  16. 16 {
  17. 17 "name": "scaffolds a titled game from the template",
  18. 18 "inputs": {},
  19. 19 "checks": [
  20. 20 {
  21. 21 "type": "command_exits_zero",
  22. 22 "command": "node scripts/new-game.mjs --title \"Star Catcher\" --idea \"catch stars, dodge meteors\" --out game/index.html"
  23. 23 },
  24. 24 { "type": "file_exists", "path": "game/index.html" },
  25. 25 { "type": "file_contains", "path": "game/index.html", "text": "<title>Star Catcher</title>" },
  26. 26 { "type": "file_contains", "path": "game/index.html", "text": "requestAnimationFrame(frame)" },
  27. 27 { "type": "file_contains", "path": "game/index.html", "text": "pointerdown" },
  28. 28 { "type": "file_not_contains", "path": "game/index.html", "text": "{{TITLE}}" }
  29. 29 ]
  30. 30 },
  31. 31 {
  32. 32 "name": "copies the Block Dodge example",
  33. 33 "inputs": {},
  34. 34 "checks": [
  35. 35 {
  36. 36 "type": "command_exits_zero",
  37. 37 "command": "node scripts/new-game.mjs --from example --out game/dodge.html"
  38. 38 },
  39. 39 { "type": "file_contains", "path": "game/dodge.html", "text": "<title>Block Dodge</title>" }
  40. 40 ]
  41. 41 },
  42. 42 {
  43. 43 "name": "replaces an existing game only with --force",
  44. 44 "inputs": { "game/index.html": "<p>old</p>\n" },
  45. 45 "checks": [
  46. 46 {
  47. 47 "type": "command_exits_zero",
  48. 48 "command": "node scripts/new-game.mjs --title \"Moon Hop\" --out game/index.html --force"
  49. 49 },
  50. 50 { "type": "file_contains", "path": "game/index.html", "text": "<title>Moon Hop</title>" },
  51. 51 { "type": "file_not_contains", "path": "game/index.html", "text": "<p>old</p>" }
  52. 52 ]
  53. 53 }
  54. 54 ]
  55. 55 }