[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79PCV2VX6QXTAKZMZPW4RCF":3,"skill-same:01M79PCV2VX6QXTAKZMZPW4RCF":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":29,"updatedAt":30,"install":31,"resources":44},"01M79PCV2VX6QXTAKZMZPW4RCF","love2d-core",null,"Structure and debug a LÖVE (Love2D) game in Lua: the love.load\u002Fupdate\u002Fdraw loop, delta-time movement, input, and screen states. Use when building a LÖVE 11.x game (main.lua, conf.lua, .love).","JunMystery\u002FAgent-Guidance","JunMystery","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F161468934?v=4","01M79MTMV8F0BY8NK1A92RA8A0","Jun","01M79MTMWCFBKPHN5B25E6V20B",0,"MIT","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Flove2d-core\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: love2d-core\ndescription: >\n  Structure and debug a LÖVE (Love2D) game in Lua: the love.load\u002Fupdate\u002Fdraw loop,\n  delta-time movement, input, and screen states. Use when building a LÖVE 11.x game\n  (main.lua, conf.lua, .love).\n---\n\n# LÖVE (Love2D) Core\n\nSet up and debug the foundation of a LÖVE game in Lua: the callback loop, frame-rate-\nindependent movement, input, and screen states. Targets **LÖVE 11.5**.\n\n## When to use\n\n- Use when starting a LÖVE game, wiring up `main.lua`\u002F`conf.lua`, or fixing the core loop,\n  movement that runs at the wrong speed, input handling, or screen switching.\n- Use when the workspace has `main.lua` calling `love.*`, a `conf.lua`, or a `.love` file.\n\n**When *not* to use:** Lua *language* questions unrelated to LÖVE; physics bodies\u002Fjoints\n(LÖVE uses Box2D via `love.physics` — a separate concern); shader code (`love.graphics`\nGLSL is its own topic). For cross-engine save\u002Fload patterns, use `save-systems`.\n\n## Core workflow\n\n1. **Confirm the entry points.** A LÖVE game runs `main.lua`; it should define\n   `love.load()` (one-time setup), `love.update(dt)` (state), and `love.draw()` (rendering).\n   Window\u002Fversion setup goes in `conf.lua` (run *before* modules load).\n2. **Pin the version.** Set `t.version = \"11.5\"` in `conf.lua` so LÖVE warns on mismatch.\n3. **Drive all motion by `dt`** (delta time, in seconds) so speed is frame-rate independent.\n4. **Handle input** two ways: polled (`love.keyboard.isDown` in `update`, for held keys) and\n   event (`love.keypressed` callback, for discrete presses).\n5. **Manage screens** (menu, game, pause) with a small state stack rather than a pile of\n   `if` flags — see Patterns and `references\u002Fstate-stack.md`.\n6. **Run and observe.** Launch with `love .` from the project folder; verify the window,\n   motion speed, and input on screen before assuming it works.\n\n## Patterns\n\n### 1. `main.lua` skeleton (the callback loop + input)\n\n```lua\n-- main.lua — LÖVE calls these callbacks for you. Colors are 0–1 in LÖVE 11.x.\nfunction love.load()\n    -- One-time setup. speed is in PIXELS PER SECOND, not per frame.\n    player = { x = 100, y = 100, size = 40, speed = 220 }\n    love.graphics.setBackgroundColor(0.1, 0.1, 0.12)\nend\n\nfunction love.update(dt)\n    -- Polled input: good for continuous movement while a key is held.\n    if love.keyboard.isDown(\"right\") then player.x = player.x + player.speed * dt end\n    if love.keyboard.isDown(\"left\")  then player.x = player.x - player.speed * dt end\n    if love.keyboard.isDown(\"down\")  then player.y = player.y + player.speed * dt end\n    if love.keyboard.isDown(\"up\")    then player.y = player.y - player.speed * dt end\nend\n\nfunction love.draw()\n    love.graphics.setColor(0.2, 0.8, 1.0)                 -- tint ON\n    love.graphics.rectangle(\"fill\", player.x, player.y, player.size, player.size)\n    love.graphics.setColor(1, 1, 1)                       -- reset tint before text\u002Fimages\n    love.graphics.print(\"Arrow keys to move, Esc to quit\", 10, 10)\nend\n\nfunction love.keypressed(key)\n    -- Event input: fires once per physical press. Use for menus, jumps, toggles.\n    if key == \"escape\" then love.event.quit() end\nend\n```\n\n### 2. Frame-rate independence (the single most common bug)\n\n```lua\n-- RIGHT: scaled by dt → same real-world speed at 30 or 240 FPS.\nplayer.x = player.x + player.speed * dt\n-- WRONG: \"pixels per frame\" → moves twice as fast at double the frame rate.\nplayer.x = player.x + player.speed\n```\n\n### 3. `conf.lua` (window + version; runs before `main.lua`)\n\n```lua\n-- conf.lua — must be its own file; love.conf will NOT run from main.lua.\nfunction love.conf(t)\n    t.version = \"11.5\"             -- the LÖVE version this game targets (string \"X.Y\")\n    t.window.title  = \"My LÖVE Game\"\n    t.window.width  = 800\n    t.window.height = 600\n    t.window.vsync  = 1            -- number since 11.0: 1 = on, 0 = off, -1 = adaptive\n    t.window.resizable = false\n    t.modules.physics = false      -- disable modules you don't use to trim startup\u002Fmemory\nend\n```\n\n### 4. Color is 0–1 in LÖVE 11.x (not 0–255)\n\n```lua\n-- LÖVE 11.x uses normalized floats. (Pre-11.0 code used 0–255 and will look wrong.)\nlove.graphics.setColor(1, 0, 0)                          -- opaque red\nlove.graphics.setColor(0.2, 0.8, 1.0, 0.5)               -- translucent cyan (alpha 0.5)\n-- Need to convert old byte values? Use the helper instead of dividing by hand:\nlove.graphics.setColor(love.math.colorFromBytes(128, 234, 255))\n```\n\n### 5. Screen states (brief — full manager in references)\n\n```lua\n-- A screen is a table with optional :update(dt), :draw(), :keypressed(key).\n-- Keep the active screen on a stack so pause\u002Fmenu overlays are trivial to pop.\nlocal Stack = require(\"state_stack\")   -- see references\u002Fstate-stack.md for the module\n\n-- Call a method on the top screen only if it defines it (a menu may have no update).\nlocal function forward(name, ...)\n    local screen = Stack.current()\n    if screen and screen[name] then screen[name](screen, ...) end\nend\n\nfunction love.load()          Stack.push(require(\"screens.menu\")) end\nfunction love.update(dt)      forward(\"update\", dt) end\nfunction love.draw()          forward(\"draw\") end\nfunction love.keypressed(key) forward(\"keypressed\", key) end\n```\n\n## Pitfalls\n\n- **Speed varies with FPS** → you forgot `* dt`. Every per-frame change to position, timers,\n  or animation must be scaled by `dt`.\n- **`love.conf` placed in `main.lua`** → it silently does nothing. It must live in `conf.lua`,\n  which LÖVE runs *before* loading modules.\n- **Colors washed out or invisible** → you used 0–255 values. 11.x does not rescale them;\n  every channel above 1 draws at full intensity, so `setColor(128, 234, 255)` comes out\n  plain white and an alpha of `128` is fully opaque. Use 0–1 floats or\n  `love.math.colorFromBytes` (11.3+).\n- **Everything tinted after one `setColor`** → color is global and persists across draws.\n  Reset with `love.graphics.setColor(1, 1, 1)` before drawing text\u002Fimages you want untinted.\n- **Holding a key fires `love.keypressed` only once** → key repeat is off by default.\n  Call `love.keyboard.setKeyRepeat(true)` (e.g. for text fields or menu scrolling); the\n  repeats then arrive with the third argument `isrepeat` set, so a jump handler can\n  ignore them. Releases go to `love.keyreleased(key)`.\n\n## References\n\n- For a complete push\u002Fpop screen-state manager (menu → game → pause, with delegated\n  callbacks), read `references\u002Fstate-stack.md`.\n\n## Related skills\n\n- `save-systems` — saving\u002Floading game state (engine-agnostic).\n- `input-systems` — rebindable, multi-device input architecture.\n- `pygame-core` \u002F `phaser-core` — the same loop concepts in other lightweight engines.\n","# LÖVE (Love2D) Core\n\nSet up and debug the foundation of a LÖVE game in Lua: the callback loop, frame-rate-\nindependent movement, input, and screen states. Targets **LÖVE 11.5**.\n\n## When to use\n\n- Use when starting a LÖVE game, wiring up `main.lua`\u002F`conf.lua`, or fixing the core loop,\n  movement that runs at the wrong speed, input handling, or screen switching.\n- Use when the workspace has `main.lua` calling `love.*`, a `conf.lua`, or a `.love` file.\n\n**When *not* to use:** Lua *language* questions unrelated to LÖVE; physics bodies\u002Fjoints\n(LÖVE uses Box2D via `love.physics` — a separate concern); shader code (`love.graphics`\nGLSL is its own topic). For cross-engine save\u002Fload patterns, use `save-systems`.\n\n## Core workflow\n\n1. **Confirm the entry points.** A LÖVE game runs `main.lua`; it should define\n   `love.load()` (one-time setup), `love.update(dt)` (state), and `love.draw()` (rendering).\n   Window\u002Fversion setup goes in `conf.lua` (run *before* modules load).\n2. **Pin the version.** Set `t.version = \"11.5\"` in `conf.lua` so LÖVE warns on mismatch.\n3. **Drive all motion by `dt`** (delta time, in seconds) so speed is frame-rate independent.\n4. **Handle input** two ways: polled (`love.keyboard.isDown` in `update`, for held keys) and\n   event (`love.keypressed` callback, for discrete presses).\n5. **Manage screens** (menu, game, pause) with a small state stack rather than a pile of\n   `if` flags — see Patterns and `references\u002Fstate-stack.md`.\n6. **Run and observe.** Launch with `love .` from the project folder; verify the window,\n   motion speed, and input on screen before assuming it works.\n\n## Patterns\n\n### 1. `main.lua` skeleton (the callback loop + input)\n\n```lua\n-- main.lua — LÖVE calls these callbacks for you. Colors are 0–1 in LÖVE 11.x.\nfunction love.load()\n    -- One-time setup. speed is in PIXELS PER SECOND, not per frame.\n    player = { x = 100, y = 100, size = 40, speed = 220 }\n    love.graphics.setBackgroundColor(0.1, 0.1, 0.12)\nend\n\nfunction love.update(dt)\n    -- Polled input: good for continuous movement while a key is held.\n    if love.keyboard.isDown(\"right\") then player.x = player.x + player.speed * dt end\n    if love.keyboard.isDown(\"left\")  then player.x = player.x - player.speed * dt end\n    if love.keyboard.isDown(\"down\")  then player.y = player.y + player.speed * dt end\n    if love.keyboard.isDown(\"up\")    then player.y = player.y - player.speed * dt end\nend\n\nfunction love.draw()\n    love.graphics.setColor(0.2, 0.8, 1.0)                 -- tint ON\n    love.graphics.rectangle(\"fill\", player.x, player.y, player.size, player.size)\n    love.graphics.setColor(1, 1, 1)                       -- reset tint before text\u002Fimages\n    love.graphics.print(\"Arrow keys to move, Esc to quit\", 10, 10)\nend\n\nfunction love.keypressed(key)\n    -- Event input: fires once per physical press. Use for menus, jumps, toggles.\n    if key == \"escape\" then love.event.quit() end\nend\n```\n\n### 2. Frame-rate independence (the single most common bug)\n\n```lua\n-- RIGHT: scaled by dt → same real-world speed at 30 or 240 FPS.\nplayer.x = player.x + player.speed * dt\n-- WRONG: \"pixels per frame\" → moves twice as fast at double the frame rate.\nplayer.x = player.x + player.speed\n```\n\n### 3. `conf.lua` (window + version; runs before `main.lua`)\n\n```lua\n-- conf.lua — must be its own file; love.conf will NOT run from main.lua.\nfunction love.conf(t)\n    t.version = \"11.5\"             -- the LÖVE version this game targets (string \"X.Y\")\n    t.window.title  = \"My LÖVE Game\"\n    t.window.width  = 800\n    t.window.height = 600\n    t.window.vsync  = 1            -- number since 11.0: 1 = on, 0 = off, -1 = adaptive\n    t.window.resizable = false\n    t.modules.physics = false      -- disable modules you don't use to trim startup\u002Fmemory\nend\n```\n\n### 4. Color is 0–1 in LÖVE 11.x (not 0–255)\n\n```lua\n-- LÖVE 11.x uses normalized floats. (Pre-11.0 code used 0–255 and will look wrong.)\nlove.graphics.setColor(1, 0, 0)                          -- opaque red\nlove.graphics.setColor(0.2, 0.8, 1.0, 0.5)               -- translucent cyan (alpha 0.5)\n-- Need to convert old byte values? Use the helper instead of dividing by hand:\nlove.graphics.setColor(love.math.colorFromBytes(128, 234, 255))\n```\n\n### 5. Screen states (brief — full manager in references)\n\n```lua\n-- A screen is a table with optional :update(dt), :draw(), :keypressed(key).\n-- Keep the active screen on a stack so pause\u002Fmenu overlays are trivial to pop.\nlocal Stack = require(\"state_stack\")   -- see references\u002Fstate-stack.md for the module\n\n-- Call a method on the top screen only if it defines it (a menu may have no update).\nlocal function forward(name, ...)\n    local screen = Stack.current()\n    if screen and screen[name] then screen[name](screen, ...) end\nend\n\nfunction love.load()          Stack.push(require(\"screens.menu\")) end\nfunction love.update(dt)      forward(\"update\", dt) end\nfunction love.draw()          forward(\"draw\") end\nfunction love.keypressed(key) forward(\"keypressed\", key) end\n```\n\n## Pitfalls\n\n- **Speed varies with FPS** → you forgot `* dt`. Every per-frame change to position, timers,\n  or animation must be scaled by `dt`.\n- **`love.conf` placed in `main.lua`** → it silently does nothing. It must live in `conf.lua`,\n  which LÖVE runs *before* loading modules.\n- **Colors washed out or invisible** → you used 0–255 values. 11.x does not rescale them;\n  every channel above 1 draws at full intensity, so `setColor(128, 234, 255)` comes out\n  plain white and an alpha of `128` is fully opaque. Use 0–1 floats or\n  `love.math.colorFromBytes` (11.3+).\n- **Everything tinted after one `setColor`** → color is global and persists across draws.\n  Reset with `love.graphics.setColor(1, 1, 1)` before drawing text\u002Fimages you want untinted.\n- **Holding a key fires `love.keypressed` only once** → key repeat is off by default.\n  Call `love.keyboard.setKeyRepeat(true)` (e.g. for text fields or menu scrolling); the\n  repeats then arrive with the third argument `isrepeat` set, so a jump handler can\n  ignore them. Releases go to `love.keyreleased(key)`.\n\n## References\n\n- For a complete push\u002Fpop screen-state manager (menu → game → pause, with delegated\n  callbacks), read `references\u002Fstate-stack.md`.\n\n## Related skills\n\n- `save-systems` — saving\u002Floading game state (engine-agnostic).\n- `input-systems` — rebindable, multi-device input architecture.\n- `pygame-core` \u002F `phaser-core` — the same loop concepts in other lightweight engines.\n",{"name":5,"description":7},"main","5d0a87185c0e172c3901e2a6e5916b6d544b8b94","skills\u002Flove2d-core","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance","https:\u002F\u002Fgithub.com\u002FJunMystery","AI is the typist, I am the architect. Building efficient, secure, and user-centric products through disciplined AI prompt engineering.","2026-11-13 17:41:25",{"source":8,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add JunMystery\u002FAgent-Guidance --skill love2d-core",{"tool":37,"command":38},"bunx","bunx skills add JunMystery\u002FAgent-Guidance --skill love2d-core",{"tool":40,"command":41},"pnpm","pnpm dlx skills add JunMystery\u002FAgent-Guidance --skill love2d-core","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Flove2d-core\u002FSKILL.md",true,[45],{"path":46,"resourceType":47,"resourceTypeDesc":48,"sizeBytes":49,"sourceHtmlUrl":50},"references\u002Fstate-stack.md","REFERENCE","参考文档",4640,"https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Flove2d-core\u002Freferences\u002Fstate-stack.md",[52,58,64,70,76,82],{"skillNo":53,"name":54,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":55,"categories":56,"keywords":57,"publishedAt":19},"01M79QR1E309VJ6CTQKB32AWWA","zero-trust-architecture-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-architecture-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":59,"name":60,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79QQV7GHYR02DYGN41S23WN","xss-filter-evasion-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxss-filter-evasion-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79QQNSN7YB8XB61FFSCS3WH","xs-leaks-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxs-leaks-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79QQHZZJKFDY9132G5A65C2","xpath-injection-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxpath-injection-prevention-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M79QQB9ZSD3DJG8658EHQXR1","xml-security-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-security-cheat-sheet\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M79QQ60WKV7PFMXWT9CW8PM6","xml-external-entity-prevention-cheat-sheet","https:\u002F\u002Fgithub.com\u002FJunMystery\u002FAgent-Guidance\u002Fblob\u002Fmain\u002Fskills\u002Fxml-external-entity-prevention-cheat-sheet\u002FSKILL.md",[],[]]