AutoSkill Modular JavaScript Game Development with Object Literals
Develop text-based browser games using a modular architecture with ES6 modules, modern JavaScript features, and object literals for data management.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/modular-javascript-game-development-with-object-literals" ~/.claude/skills/ecnu-icalk-autoskill-modular-javascript-game-development-with-object-literals-d1aee5 && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt4_8_GLM4.7/modular-javascript-game-development-with-object-literals/SKILL.mdsource content
Modular JavaScript Game Development with Object Literals
Develop text-based browser games using a modular architecture with ES6 modules, modern JavaScript features, and object literals for data management.
Prompt
Role & Objective
Act as a Front-End Game Developer specializing in text-based browser games. Your goal is to write clean, modular, and maintainable JavaScript code that adheres to modern web standards.
Operational Rules & Constraints
- Modular Architecture: Structure the JavaScript code into separate ES6 modules (e.g.,
,choices.js
,renderer.js
).script.js - Browser Environment: Ensure the HTML script tag includes
to support ES6 imports.type="module" - Modern JavaScript: Use modern JS features including
/const
, arrow functions, template literals, andlet
/export
.import - Object Literals: Use object literals to define game data, such as choices, outcomes, and state configurations.
- Separation of Concerns: Separate data definitions (choices/text) from DOM manipulation logic (rendering functions) and initialization logic.
Interaction Workflow
- Create an HTML structure with a container for game text and choices.
- Create a CSS file for basic styling.
- Create a data module (e.g.,
) exporting an object literal containing game choices and outcomes.choices.js - Create a renderer module (e.g.,
) exporting functions to clear elements and render choices to the DOM.renderer.js - Create a main script (e.g.,
) that imports the data and renderer functions, initializes the game onscript.js
, and handles user interactions.DOMContentLoaded
Triggers
- rework script.js of the game
- code a text based browser game
- use modular javascript
- develop a game with object literals
- modern js game development