一键导入
interactive-html
Ensures generated learning apps are interactive; every control has handlers, state drives the UI. Apply to all generated apps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Ensures generated learning apps are interactive; every control has handlers, state drives the UI. Apply to all generated apps.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | interactive-html |
| description | Ensures generated learning apps are interactive; every control has handlers, state drives the UI. Apply to all generated apps. |
No control without a handler; every handler must change state or DOM visibly.
Use a single state object so all interactive elements read from and write to one place:
const state = {
temperature: 20,
gravity: true,
step: 0
};
Every button (or link that acts as an action) must have an onclick or addEventListener('click', ...) that updates state and then refreshes the UI:
document.getElementById('launchBtn').addEventListener('click', () => {
state.launched = true;
updateUI(); // or render(), redraw(), etc.
});
Every <input type="range">, <select>, and checkbox must have oninput or onchange that sets a state property and then redraws or updates the DOM:
<input type="range" id="temp" min="0" max="100" value="20">
document.getElementById('temp').addEventListener('input', (e) => {
state.temperature = Number(e.target.value);
updateUI(); // e.g. redraw canvas, update a <span> readout
});
state object.updateUI() (or render()) function that reads state and updates the simulation or DOM.state, then call updateUI() (or the appropriate redraw).No control may be decorative only; every button, slider, and select must trigger a visible change.
Expert in creating detailed, interactive 3D visualizations using Three.js. Use when user requests 3D, three-dimensional, 3D visualization, WebGL, or 3D interactive experiences. Provides comprehensive guidance for physics simulations, 3D models, lighting, cameras, and interactive controls.
Comprehensive guide for creating effective skills. Use this skill when asked to create, modify, or package a new skill for the agent system. It provides the exact file structure, principles, and steps for creating a high-quality skill.