@playcraft/skills 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +333 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +2 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/skills.loader.d.ts +31 -0
- package/dist/src/skills.loader.d.ts.map +1 -0
- package/dist/src/skills.loader.js +200 -0
- package/dist/src/skills.loader.js.map +1 -0
- package/dist/src/skills.types.d.ts +44 -0
- package/dist/src/skills.types.d.ts.map +1 -0
- package/dist/src/skills.types.js +9 -0
- package/dist/src/skills.types.js.map +1 -0
- package/package.json +35 -0
- package/skills/2048_core.aigameplay/SKILL.md +123 -0
- package/skills/2048_core.aigameplay/manifest.json +159 -0
- package/skills/2048_core.aigameplay/ref/pgs-schema.json +194 -0
- package/skills/2048_core.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/SKILL.md +46 -0
- package/skills/ad_compliance_rules.aiconfig/SKILL.md +85 -0
- package/skills/ad_compliance_rules.aiconfig/manifest.json +60 -0
- package/skills/agent_remix_orchestrator.aicomponent/SKILL.md +257 -0
- package/skills/agent_remix_orchestrator.aicomponent/manifest.json +12 -0
- package/skills/app_metadata.aiconfig/SKILL.md +53 -0
- package/skills/app_metadata.aiconfig/manifest.json +32 -0
- package/skills/appear_sfx.aiaudio/SKILL.md +59 -0
- package/skills/appear_sfx.aiaudio/manifest.json +45 -0
- package/skills/appear_sfx.aiaudio/ref/appear.mp3 +0 -0
- package/skills/arrow_move_error_sfx.aiaudio/SKILL.md +59 -0
- package/skills/arrow_move_error_sfx.aiaudio/manifest.json +45 -0
- package/skills/arrow_move_error_sfx.aiaudio/ref/arrow_move_error.mp3 +0 -0
- package/skills/arrow_path_data_format.aicomponent/SKILL.md +152 -0
- package/skills/arrow_path_data_format.aicomponent/manifest.json +57 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelParser.ts +188 -0
- package/skills/arrow_path_data_format.aicomponent/ref/LevelTypes.ts +131 -0
- package/skills/arrow_pick_match_rules.aigameplay/SKILL.md +117 -0
- package/skills/arrow_pick_match_rules.aigameplay/manifest.json +105 -0
- package/skills/arrow_pick_match_rules.aigameplay/ref/pgs-schema.json +180 -0
- package/skills/asset_pipeline_scripts.aicomponent/SKILL.md +117 -0
- package/skills/asset_pipeline_scripts.aicomponent/manifest.json +17 -0
- package/skills/asset_pipeline_scripts.aicomponent/ref/gen-sprite.sh +105 -0
- package/skills/ball_sort.aigameplay/SKILL.md +109 -0
- package/skills/ball_sort.aigameplay/manifest.json +155 -0
- package/skills/ball_sort.aigameplay/ref/pgs-schema.json +192 -0
- package/skills/ball_sort.aigameplay/ref/reducer.template.ts +156 -0
- package/skills/basketball_shot.aigameplay/SKILL.md +94 -0
- package/skills/basketball_shot.aigameplay/manifest.json +150 -0
- package/skills/basketball_shot.aigameplay/ref/pgs-schema.json +229 -0
- package/skills/basketball_shot.aigameplay/ref/reducer.template.ts +189 -0
- package/skills/bg_music.aiaudio/SKILL.md +61 -0
- package/skills/bg_music.aiaudio/manifest.json +48 -0
- package/skills/bg_music.aiaudio/ref/bg.mp3 +0 -0
- package/skills/big_watermelon.aigameplay/SKILL.md +94 -0
- package/skills/big_watermelon.aigameplay/manifest.json +155 -0
- package/skills/big_watermelon.aigameplay/ref/pgs-schema.json +191 -0
- package/skills/big_watermelon.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/block_puzzle.aigameplay/SKILL.md +121 -0
- package/skills/block_puzzle.aigameplay/manifest.json +154 -0
- package/skills/block_puzzle.aigameplay/ref/pgs-schema.json +170 -0
- package/skills/block_puzzle.aigameplay/ref/reducer.template.ts +182 -0
- package/skills/board_entity_sprite.aiimage/SKILL.md +255 -0
- package/skills/board_entity_sprite.aiimage/manifest.json +153 -0
- package/skills/board_entity_sprite.aiimage/ref/ProceduralCar.ts +357 -0
- package/skills/board_entity_sprite.aiimage/ref/car.png +0 -0
- package/skills/board_entity_sprite.aiimage/ref/car.webp +0 -0
- package/skills/bottom_ui_bar.aicomponent/SKILL.md +50 -0
- package/skills/bottom_ui_bar.aicomponent/manifest.json +31 -0
- package/skills/bottom_ui_bar.aicomponent/ref/GameBottomUI.ts +27 -0
- package/skills/bubble_shooter.aigameplay/SKILL.md +129 -0
- package/skills/bubble_shooter.aigameplay/manifest.json +181 -0
- package/skills/bubble_shooter.aigameplay/ref/pgs-schema.json +226 -0
- package/skills/bubble_shooter.aigameplay/ref/reducer.template.ts +228 -0
- package/skills/button_click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/button_click_sfx.aiaudio/manifest.json +45 -0
- package/skills/button_click_sfx.aiaudio/ref/button_click.mp3 +0 -0
- package/skills/calm_piano.aiaudio/SKILL.md +68 -0
- package/skills/calm_piano.aiaudio/manifest.json +50 -0
- package/skills/camera_controller_3d.aicomponent/SKILL.md +100 -0
- package/skills/camera_controller_3d.aicomponent/manifest.json +52 -0
- package/skills/camera_controller_3d.aicomponent/ref/CameraController.ts +199 -0
- package/skills/camera_controller_3d.aicomponent/ref/OrbitControlsAdapter.ts +152 -0
- package/skills/candy_tile.aiimage/SKILL.md +62 -0
- package/skills/candy_tile.aiimage/manifest.json +49 -0
- package/skills/car_parking.aigameplay/SKILL.md +105 -0
- package/skills/car_parking.aigameplay/manifest.json +164 -0
- package/skills/car_parking.aigameplay/ref/pgs-schema.json +163 -0
- package/skills/car_parking.aigameplay/ref/reducer.template.ts +166 -0
- package/skills/castle.aiimage/SKILL.md +64 -0
- package/skills/castle.aiimage/manifest.json +48 -0
- package/skills/cheerful_ukulele.aiaudio/SKILL.md +72 -0
- package/skills/cheerful_ukulele.aiaudio/manifest.json +50 -0
- package/skills/click_sfx.aiaudio/SKILL.md +59 -0
- package/skills/click_sfx.aiaudio/manifest.json +45 -0
- package/skills/click_sfx.aiaudio/ref/click.mp3 +0 -0
- package/skills/combo_display.aicomponent/SKILL.md +45 -0
- package/skills/combo_display.aicomponent/manifest.json +31 -0
- package/skills/combo_display.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/combo_display.aicomponent/ref/ComboSmallUI.ts +232 -0
- package/skills/combo_praise_text.aicomponent/SKILL.md +56 -0
- package/skills/combo_praise_text.aicomponent/manifest.json +34 -0
- package/skills/combo_praise_text.aicomponent/ref/ComboManager.ts +362 -0
- package/skills/countdown_timer.aicomponent/SKILL.md +44 -0
- package/skills/countdown_timer.aicomponent/manifest.json +35 -0
- package/skills/countdown_timer.aicomponent/ref/CountdownDisplay.ts +213 -0
- package/skills/cta_platform_config.aiconfig/SKILL.md +72 -0
- package/skills/cta_platform_config.aiconfig/manifest.json +56 -0
- package/skills/debug_overlay.aicomponent/SKILL.md +75 -0
- package/skills/debug_overlay.aicomponent/manifest.json +17 -0
- package/skills/debug_overlay.aicomponent/ref/DebugOverlay.ts +144 -0
- package/skills/desert.aiimage/SKILL.md +63 -0
- package/skills/desert.aiimage/manifest.json +49 -0
- package/skills/difficulty_curve_designer.aiconfig/SKILL.md +68 -0
- package/skills/difficulty_curve_designer.aiconfig/manifest.json +36 -0
- package/skills/digit_renderer.aicomponent/SKILL.md +43 -0
- package/skills/digit_renderer.aicomponent/manifest.json +25 -0
- package/skills/digit_renderer.aicomponent/ref/DigitRenderer.ts +237 -0
- package/skills/download_button.aicomponent/SKILL.md +44 -0
- package/skills/download_button.aicomponent/manifest.json +25 -0
- package/skills/download_button.aicomponent/ref/DownloadButton.ts +137 -0
- package/skills/draw_line_puzzle.aigameplay/SKILL.md +84 -0
- package/skills/draw_line_puzzle.aigameplay/manifest.json +152 -0
- package/skills/draw_line_puzzle.aigameplay/ref/pgs-schema.json +189 -0
- package/skills/draw_line_puzzle.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/easy_to_hard.aiconfig/SKILL.md +52 -0
- package/skills/easy_to_hard.aiconfig/manifest.json +33 -0
- package/skills/eight_ball_pool.aigameplay/SKILL.md +104 -0
- package/skills/eight_ball_pool.aigameplay/manifest.json +152 -0
- package/skills/eight_ball_pool.aigameplay/ref/pgs-schema.json +205 -0
- package/skills/eight_ball_pool.aigameplay/ref/reducer.template.ts +198 -0
- package/skills/energetic_electronic.aiaudio/SKILL.md +69 -0
- package/skills/energetic_electronic.aiaudio/manifest.json +51 -0
- package/skills/fail_sfx.aiaudio/SKILL.md +59 -0
- package/skills/fail_sfx.aiaudio/manifest.json +44 -0
- package/skills/fail_sfx.aiaudio/ref/fail.mp3 +0 -0
- package/skills/figer_icon.aiimage/SKILL.md +58 -0
- package/skills/figer_icon.aiimage/manifest.json +48 -0
- package/skills/figer_icon.aiimage/ref/figer.png +0 -0
- package/skills/figer_icon.aiimage/ref/figer.webp +0 -0
- package/skills/forest.aiimage/SKILL.md +74 -0
- package/skills/forest.aiimage/manifest.json +48 -0
- package/skills/fruit_tile.aiimage/SKILL.md +68 -0
- package/skills/fruit_tile.aiimage/manifest.json +48 -0
- package/skills/game_over_panel.aicomponent/SKILL.md +47 -0
- package/skills/game_over_panel.aicomponent/manifest.json +61 -0
- package/skills/game_over_panel.aicomponent/ref/GameOverPanel.ts +74 -0
- package/skills/game_scene.aicomponent/SKILL.md +57 -0
- package/skills/game_scene.aicomponent/manifest.json +36 -0
- package/skills/game_scene.aicomponent/ref/Game.ts +748 -0
- package/skills/gameplay_balance_check.aivalidator/SKILL.md +69 -0
- package/skills/gameplay_balance_check.aivalidator/manifest.json +21 -0
- package/skills/gameplay_unit_test.aivalidator/SKILL.md +89 -0
- package/skills/gameplay_unit_test.aivalidator/manifest.json +17 -0
- package/skills/gameplay_unit_test.aivalidator/ref/gameplay.test.ts +202 -0
- package/skills/gameplay_unit_test.aivalidator/ref/vitest.config.ts +13 -0
- package/skills/grid_board_layout.aicomponent/SKILL.md +85 -0
- package/skills/grid_board_layout.aicomponent/manifest.json +69 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout.ts +416 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayout3D.ts +125 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardLayoutMath.ts +85 -0
- package/skills/grid_board_layout.aicomponent/ref/BoardRenderer3D.ts +298 -0
- package/skills/heart_lives.aicomponent/SKILL.md +42 -0
- package/skills/heart_lives.aicomponent/manifest.json +25 -0
- package/skills/heart_lives.aicomponent/ref/HeartDisplay.ts +96 -0
- package/skills/idle-breathe.aicomponent/SKILL.md +27 -0
- package/skills/idle-breathe.aicomponent/manifest.json +20 -0
- package/skills/idle-breathe.aicomponent/ref/phaser.js +25 -0
- package/skills/idle-breathe.aicomponent/ref/playcanvas.js +29 -0
- package/skills/jewel_tile.aiimage/SKILL.md +63 -0
- package/skills/jewel_tile.aiimage/manifest.json +49 -0
- package/skills/knife_hit.aigameplay/SKILL.md +103 -0
- package/skills/knife_hit.aigameplay/manifest.json +151 -0
- package/skills/knife_hit.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/knife_hit.aigameplay/ref/reducer.template.ts +196 -0
- package/skills/left_right_parkour.aigameplay/SKILL.md +120 -0
- package/skills/left_right_parkour.aigameplay/manifest.json +165 -0
- package/skills/left_right_parkour.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/left_right_parkour.aigameplay/ref/reducer.template.ts +194 -0
- package/skills/level_data_pack.aiconfig/SKILL.md +64 -0
- package/skills/level_data_pack.aiconfig/manifest.json +37 -0
- package/skills/level_data_validator.aivalidator/SKILL.md +85 -0
- package/skills/level_data_validator.aivalidator/manifest.json +17 -0
- package/skills/level_data_validator.aivalidator/ref/LevelValidator.ts +113 -0
- package/skills/level_lifecycle.aicomponent/SKILL.md +81 -0
- package/skills/level_lifecycle.aicomponent/manifest.json +87 -0
- package/skills/level_lifecycle.aicomponent/ref/LevelLifecycle.ts +235 -0
- package/skills/level_solvability_validator.aivalidator/SKILL.md +74 -0
- package/skills/level_solvability_validator.aivalidator/manifest.json +23 -0
- package/skills/level_solvability_validator.aivalidator/ref/LevelValidator.ts +186 -0
- package/skills/level_state.aicomponent/SKILL.md +55 -0
- package/skills/level_state.aicomponent/manifest.json +34 -0
- package/skills/level_state.aicomponent/ref/LevelDataManager.ts +26 -0
- package/skills/level_state.aicomponent/ref/LevelManager.ts +26 -0
- package/skills/loading_screen.aicomponent/SKILL.md +57 -0
- package/skills/loading_screen.aicomponent/manifest.json +43 -0
- package/skills/loading_screen.aicomponent/ref/LoadingUI.ts +339 -0
- package/skills/lose_result_panel.aiimage/SKILL.md +58 -0
- package/skills/lose_result_panel.aiimage/manifest.json +47 -0
- package/skills/lose_result_panel.aiimage/ref/lose.png +0 -0
- package/skills/lose_result_panel.aiimage/ref/lose.webp +0 -0
- package/skills/lose_sfx.aiaudio/SKILL.md +59 -0
- package/skills/lose_sfx.aiaudio/manifest.json +45 -0
- package/skills/lose_sfx.aiaudio/ref/lose.mp3 +0 -0
- package/skills/match-pop.aicomponent/SKILL.md +29 -0
- package/skills/match-pop.aicomponent/manifest.json +19 -0
- package/skills/match-pop.aicomponent/ref/phaser.js +30 -0
- package/skills/match-pop.aicomponent/ref/playcanvas.js +22 -0
- package/skills/match3_core.aigameplay/SKILL.md +125 -0
- package/skills/match3_core.aigameplay/manifest.json +107 -0
- package/skills/match3_core.aigameplay/ref/pgs-schema.json +154 -0
- package/skills/match3_core.aigameplay/ref/reducer.template.ts +191 -0
- package/skills/match_engine.aicomponent/SKILL.md +84 -0
- package/skills/match_engine.aicomponent/manifest.json +23 -0
- package/skills/match_engine.aicomponent/ref/MatchEngine.ts +75 -0
- package/skills/memory_match.aigameplay/SKILL.md +111 -0
- package/skills/memory_match.aigameplay/manifest.json +164 -0
- package/skills/memory_match.aigameplay/ref/pgs-schema.json +190 -0
- package/skills/memory_match.aigameplay/ref/reducer.template.ts +162 -0
- package/skills/merge_core.aigameplay/SKILL.md +112 -0
- package/skills/merge_core.aigameplay/manifest.json +154 -0
- package/skills/merge_core.aigameplay/ref/pgs-schema.json +202 -0
- package/skills/merge_core.aigameplay/ref/reducer.template.ts +179 -0
- package/skills/mistake_sfx.aiaudio/SKILL.md +59 -0
- package/skills/mistake_sfx.aiaudio/manifest.json +45 -0
- package/skills/mistake_sfx.aiaudio/ref/mistake.mp3 +0 -0
- package/skills/nomove_hint_overlay.aiimage/SKILL.md +58 -0
- package/skills/nomove_hint_overlay.aiimage/manifest.json +48 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.png +0 -0
- package/skills/nomove_hint_overlay.aiimage/ref/nomove_hint.webp +0 -0
- package/skills/normal_dot.aiimage/SKILL.md +58 -0
- package/skills/normal_dot.aiimage/manifest.json +46 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.png +0 -0
- package/skills/normal_dot.aiimage/ref/normal_dot.webp +0 -0
- package/skills/ocean.aiimage/SKILL.md +71 -0
- package/skills/ocean.aiimage/manifest.json +49 -0
- package/skills/particle-confetti.aicomponent/SKILL.md +32 -0
- package/skills/particle-confetti.aicomponent/manifest.json +21 -0
- package/skills/particle-confetti.aicomponent/ref/html5-spritesheet.js +17 -0
- package/skills/particle-confetti.aicomponent/ref/phaser.js +38 -0
- package/skills/particle-explosion.aicomponent/SKILL.md +37 -0
- package/skills/particle-explosion.aicomponent/manifest.json +24 -0
- package/skills/particle-explosion.aicomponent/ref/html5-spritesheet.js +40 -0
- package/skills/particle-explosion.aicomponent/ref/phaser.js +46 -0
- package/skills/particle-explosion.aicomponent/ref/playcanvas.js +33 -0
- package/skills/particle-trail.aicomponent/SKILL.md +25 -0
- package/skills/particle-trail.aicomponent/manifest.json +22 -0
- package/skills/particle-trail.aicomponent/ref/phaser.js +31 -0
- package/skills/path_animation.aicomponent/SKILL.md +82 -0
- package/skills/path_animation.aicomponent/manifest.json +77 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager.ts +694 -0
- package/skills/path_animation.aicomponent/ref/AnimationManager3D.ts +317 -0
- package/skills/path_elimination_rules.aigameplay/SKILL.md +88 -0
- package/skills/path_elimination_rules.aigameplay/manifest.json +119 -0
- package/skills/path_elimination_rules.aigameplay/ref/pgs-schema.json +227 -0
- package/skills/path_input_handler.aicomponent/SKILL.md +87 -0
- package/skills/path_input_handler.aicomponent/manifest.json +97 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler.ts +714 -0
- package/skills/path_input_handler.aicomponent/ref/InputHandler3D.ts +204 -0
- package/skills/path_renderer.aicomponent/SKILL.md +101 -0
- package/skills/path_renderer.aicomponent/manifest.json +69 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer.ts +509 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderer3D.ts +176 -0
- package/skills/path_renderer.aicomponent/ref/PathRenderers.ts +640 -0
- package/skills/phaser.aicomponent/SKILL.md +315 -0
- package/skills/phaser.aicomponent/manifest.json +156 -0
- package/skills/phaser.aicomponent/ref/BootScene.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameConfig.ts +29 -0
- package/skills/phaser.aicomponent/ref/GameScene.ts +88 -0
- package/skills/phaser.aicomponent/ref/PreloaderScene.ts +78 -0
- package/skills/phaser.aicomponent/ref/SceneKeys.ts +7 -0
- package/skills/phaser.aicomponent/ref/SoundUtils.ts +21 -0
- package/skills/phaser.aicomponent/ref/UiLayout.ts +74 -0
- package/skills/phaser.aicomponent/ref/globals.d.ts +52 -0
- package/skills/phaser.aicomponent/ref/index.css +40 -0
- package/skills/phaser.aicomponent/ref/index.html +14 -0
- package/skills/phaser.aicomponent/ref/index.ts +48 -0
- package/skills/phaser.aicomponent/ref/main.ts +16 -0
- package/skills/phaser.aicomponent/ref/package.json +22 -0
- package/skills/phaser.aicomponent/ref/tsconfig.json +25 -0
- package/skills/phaser.aicomponent/ref/webpack.config.js +57 -0
- package/skills/phaser_scene_lifecycle.aicomponent/SKILL.md +63 -0
- package/skills/phaser_scene_lifecycle.aicomponent/manifest.json +33 -0
- package/skills/pick_and_match_rules.aigameplay/SKILL.md +113 -0
- package/skills/pick_and_match_rules.aigameplay/manifest.json +121 -0
- package/skills/pick_and_match_rules.aigameplay/ref/pgs-schema.json +354 -0
- package/skills/pin_pull.aigameplay/SKILL.md +110 -0
- package/skills/pin_pull.aigameplay/manifest.json +164 -0
- package/skills/pin_pull.aigameplay/ref/pgs-schema.json +201 -0
- package/skills/pin_pull.aigameplay/ref/reducer.template.ts +216 -0
- package/skills/playable_app_logo.aiimage/SKILL.md +58 -0
- package/skills/playable_app_logo.aiimage/manifest.json +47 -0
- package/skills/playable_app_logo.aiimage/ref/logo.png +0 -0
- package/skills/playable_app_logo.aiimage/ref/logo.webp +0 -0
- package/skills/playable_end_screen_layout.aicomponent/SKILL.md +75 -0
- package/skills/playable_end_screen_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_guidance_layer.aicomponent/SKILL.md +89 -0
- package/skills/playable_guidance_layer.aicomponent/manifest.json +24 -0
- package/skills/playable_hud_layout.aicomponent/SKILL.md +96 -0
- package/skills/playable_hud_layout.aicomponent/manifest.json +24 -0
- package/skills/playable_scripts_build.aicomponent/SKILL.md +69 -0
- package/skills/playable_scripts_build.aicomponent/manifest.json +53 -0
- package/skills/playable_scripts_build.aicomponent/ref/builds.config.js +257 -0
- package/skills/playcraft-3d-flip-sprite/SKILL.md +336 -0
- package/skills/playcraft-3d-flip-sprite/renderer/flatten_glb.mjs +62 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render.mjs +325 -0
- package/skills/playcraft-3d-flip-sprite/renderer/render_single.mjs +138 -0
- package/skills/playcraft-asset-management/SKILL.md +73 -0
- package/skills/playcraft-audio-generation/SKILL.md +126 -0
- package/skills/playcraft-build/SKILL.md +44 -0
- package/skills/playcraft-code-editor/SKILL.md +71 -0
- package/skills/playcraft-create-remix/SKILL.md +62 -0
- package/skills/playcraft-deploy/SKILL.md +59 -0
- package/skills/playcraft-image-generation/SKILL.md +148 -0
- package/skills/playcraft-image-processing/SKILL.md +216 -0
- package/skills/playcraft-platform-intro/SKILL.md +41 -0
- package/skills/playcraft-prefab/SKILL.md +98 -0
- package/skills/playcraft-project-management/SKILL.md +57 -0
- package/skills/playcraft-remix-workflow/SKILL.md +119 -0
- package/skills/playcraft-remix-workflow/references/xplatform.schema.json5 +31 -0
- package/skills/playcraft-save/SKILL.md +46 -0
- package/skills/playcraft-skill-recommender/SKILL.md +152 -0
- package/skills/playcraft-sprite-generation/SKILL.md +534 -0
- package/skills/playcraft-sprite-remix/SKILL.md +155 -0
- package/skills/playcraft-sprite-sheet/SKILL.md +97 -0
- package/skills/playtest_report.aivalidator/SKILL.md +103 -0
- package/skills/playtest_report.aivalidator/manifest.json +21 -0
- package/skills/preloader_scene.aicomponent/SKILL.md +58 -0
- package/skills/preloader_scene.aicomponent/manifest.json +43 -0
- package/skills/preloader_scene.aicomponent/ref/Preloader.ts +339 -0
- package/skills/progress_bar.aicomponent/SKILL.md +38 -0
- package/skills/progress_bar.aicomponent/manifest.json +25 -0
- package/skills/progress_bar.aicomponent/ref/ProgressDisplay.ts +140 -0
- package/skills/references/xplatform.schema.json5 +31 -0
- package/skills/responsive_2d_layout.aicomponent/SKILL.md +161 -0
- package/skills/responsive_2d_layout.aicomponent/manifest.json +43 -0
- package/skills/responsive_2d_layout.aicomponent/ref/UiLayout.ts +56 -0
- package/skills/run_context_state.aicomponent/SKILL.md +54 -0
- package/skills/run_context_state.aicomponent/manifest.json +40 -0
- package/skills/run_context_state.aicomponent/ref/RunContextRuntime.ts +30 -0
- package/skills/score-fly.aicomponent/SKILL.md +31 -0
- package/skills/score-fly.aicomponent/manifest.json +21 -0
- package/skills/score-fly.aicomponent/ref/phaser.js +26 -0
- package/skills/score-fly.aicomponent/ref/playcanvas.js +28 -0
- package/skills/score_goal.aiconfig/SKILL.md +46 -0
- package/skills/score_goal.aiconfig/manifest.json +33 -0
- package/skills/screen-flash.aicomponent/SKILL.md +30 -0
- package/skills/screen-flash.aicomponent/manifest.json +20 -0
- package/skills/screen-flash.aicomponent/ref/phaser.js +48 -0
- package/skills/screen-shake.aicomponent/SKILL.md +30 -0
- package/skills/screen-shake.aicomponent/manifest.json +19 -0
- package/skills/screen-shake.aicomponent/ref/phaser.js +23 -0
- package/skills/screen-shake.aicomponent/ref/playcanvas.js +44 -0
- package/skills/screw_puzzle.aigameplay/SKILL.md +116 -0
- package/skills/screw_puzzle.aigameplay/manifest.json +164 -0
- package/skills/screw_puzzle.aigameplay/ref/pgs-schema.json +235 -0
- package/skills/screw_puzzle.aigameplay/ref/reducer.template.ts +213 -0
- package/skills/settings_state.aicomponent/SKILL.md +61 -0
- package/skills/settings_state.aicomponent/manifest.json +33 -0
- package/skills/settings_state.aicomponent/ref/SettingsManager.ts +130 -0
- package/skills/slide_out_to_tray_animation.aicomponent/SKILL.md +64 -0
- package/skills/slide_out_to_tray_animation.aicomponent/manifest.json +58 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager.ts +164 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/AnimationManager3D.ts +198 -0
- package/skills/slide_out_to_tray_animation.aicomponent/ref/BezierUtils.ts +59 -0
- package/skills/slot_machine.aigameplay/SKILL.md +119 -0
- package/skills/slot_machine.aigameplay/manifest.json +166 -0
- package/skills/slot_machine.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/slot_machine.aigameplay/ref/reducer.template.ts +212 -0
- package/skills/sniper_shot.aigameplay/SKILL.md +84 -0
- package/skills/sniper_shot.aigameplay/manifest.json +153 -0
- package/skills/sniper_shot.aigameplay/ref/pgs-schema.json +211 -0
- package/skills/sniper_shot.aigameplay/ref/reducer.template.ts +211 -0
- package/skills/solitaire.aigameplay/SKILL.md +101 -0
- package/skills/solitaire.aigameplay/manifest.json +151 -0
- package/skills/solitaire.aigameplay/ref/pgs-schema.json +200 -0
- package/skills/solitaire.aigameplay/ref/reducer.template.ts +176 -0
- package/skills/sound-effects/SKILL.md +46 -0
- package/skills/sound_utils.aicomponent/SKILL.md +52 -0
- package/skills/sound_utils.aicomponent/manifest.json +30 -0
- package/skills/sound_utils.aicomponent/ref/SoundUtils.ts +29 -0
- package/skills/sprite-animation-2d.aicomponent/SKILL.md +45 -0
- package/skills/sprite-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/sprite-animation-2d.aicomponent/ref/html5.js +83 -0
- package/skills/sprite-animation-2d.aicomponent/ref/phaser.js +38 -0
- package/skills/sprite-animation-2d.aicomponent/ref/playcanvas.js +67 -0
- package/skills/sprite_entity_renderer.aicomponent/SKILL.md +148 -0
- package/skills/sprite_entity_renderer.aicomponent/manifest.json +17 -0
- package/skills/sprite_entity_renderer.aicomponent/ref/SpriteEntityRenderer.ts +126 -0
- package/skills/success_sfx.aiaudio/SKILL.md +59 -0
- package/skills/success_sfx.aiaudio/manifest.json +45 -0
- package/skills/success_sfx.aiaudio/ref/success.mp3 +0 -0
- package/skills/tap_blast.aigameplay/SKILL.md +116 -0
- package/skills/tap_blast.aigameplay/manifest.json +153 -0
- package/skills/tap_blast.aigameplay/ref/pgs-schema.json +208 -0
- package/skills/tap_blast.aigameplay/ref/reducer.template.ts +202 -0
- package/skills/theme_state.aicomponent/SKILL.md +53 -0
- package/skills/theme_state.aicomponent/manifest.json +33 -0
- package/skills/theme_state.aicomponent/ref/ThemeManager.ts +174 -0
- package/skills/theme_switcher_build.aicomponent/SKILL.md +62 -0
- package/skills/theme_switcher_build.aicomponent/manifest.json +38 -0
- package/skills/theme_switcher_build.aicomponent/ref/theme-index.ts +8 -0
- package/skills/theme_variant.aiconfig/SKILL.md +78 -0
- package/skills/theme_variant.aiconfig/manifest.json +39 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/index.ts +16 -0
- package/skills/theme_variant.aiconfig/ref/ExampleTheme/levelEasy.json +141 -0
- package/skills/threejs.aicomponent/SKILL.md +422 -0
- package/skills/threejs.aicomponent/manifest.json +166 -0
- package/skills/threejs.aicomponent/ref/AssetLoader.ts +158 -0
- package/skills/threejs.aicomponent/ref/BaseScene.ts +88 -0
- package/skills/threejs.aicomponent/ref/GameConfig.ts +47 -0
- package/skills/threejs.aicomponent/ref/MainScene.ts +170 -0
- package/skills/threejs.aicomponent/ref/PreloaderScene.ts +93 -0
- package/skills/threejs.aicomponent/ref/SceneKeys.ts +6 -0
- package/skills/threejs.aicomponent/ref/SceneManager.ts +69 -0
- package/skills/threejs.aicomponent/ref/ViewportManager.ts +62 -0
- package/skills/threejs.aicomponent/ref/globals.d.ts +74 -0
- package/skills/threejs.aicomponent/ref/index.css +80 -0
- package/skills/threejs.aicomponent/ref/index.html +20 -0
- package/skills/threejs.aicomponent/ref/index.ts +117 -0
- package/skills/threejs.aicomponent/ref/main.ts +10 -0
- package/skills/threejs.aicomponent/ref/package.json +23 -0
- package/skills/threejs.aicomponent/ref/tsconfig.json +24 -0
- package/skills/threejs.aicomponent/ref/webpack.config.js +61 -0
- package/skills/time_clear_goal.aiconfig/SKILL.md +46 -0
- package/skills/time_clear_goal.aiconfig/manifest.json +32 -0
- package/skills/time_icon.aiimage/SKILL.md +58 -0
- package/skills/time_icon.aiimage/manifest.json +47 -0
- package/skills/time_icon.aiimage/ref/time.png +0 -0
- package/skills/time_icon.aiimage/ref/time.webp +0 -0
- package/skills/top_ui_bar.aicomponent/SKILL.md +45 -0
- package/skills/top_ui_bar.aicomponent/manifest.json +27 -0
- package/skills/top_ui_bar.aicomponent/ref/GameTopUI.ts +229 -0
- package/skills/tower_defence.aigameplay/SKILL.md +117 -0
- package/skills/tower_defence.aigameplay/manifest.json +175 -0
- package/skills/tower_defence.aigameplay/ref/pgs-schema.json +247 -0
- package/skills/tower_defence.aigameplay/ref/reducer.template.ts +239 -0
- package/skills/tray_container.aicomponent/SKILL.md +143 -0
- package/skills/tray_container.aicomponent/manifest.json +58 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer.ts +155 -0
- package/skills/tray_container.aicomponent/ref/TrayRenderer3D.ts +281 -0
- package/skills/tray_container.aicomponent/ref/TrayRendererHtmlOverlay.ts +228 -0
- package/skills/tutorial_overlay.aicomponent/SKILL.md +46 -0
- package/skills/tutorial_overlay.aicomponent/manifest.json +34 -0
- package/skills/tutorial_overlay.aicomponent/ref/TutorialManager.ts +367 -0
- package/skills/tween-animation-2d.aicomponent/SKILL.md +35 -0
- package/skills/tween-animation-2d.aicomponent/manifest.json +28 -0
- package/skills/tween-animation-2d.aicomponent/ref/phaser.js +49 -0
- package/skills/tween-animation-2d.aicomponent/ref/playcanvas.js +36 -0
- package/skills/typescript_module_patterns.aicomponent/SKILL.md +209 -0
- package/skills/typescript_module_patterns.aicomponent/manifest.json +28 -0
- package/skills/typescript_module_patterns.aicomponent/ref/globals.d.ts +31 -0
- package/skills/ui-transition.aicomponent/SKILL.md +33 -0
- package/skills/ui-transition.aicomponent/manifest.json +19 -0
- package/skills/ui-transition.aicomponent/ref/phaser.js +45 -0
- package/skills/ux_flow_spec.aiconfig/SKILL.md +82 -0
- package/skills/ux_flow_spec.aiconfig/manifest.json +39 -0
- package/skills/wave_difficulty.aiconfig/SKILL.md +46 -0
- package/skills/wave_difficulty.aiconfig/manifest.json +33 -0
- package/skills/webpack_build.aicomponent/SKILL.md +204 -0
- package/skills/webpack_build.aicomponent/manifest.json +29 -0
- package/skills/webpack_build.aicomponent/ref/package.json +16 -0
- package/skills/webpack_build.aicomponent/ref/webpack.config.js +53 -0
- package/skills/win_anim_sfx.aiaudio/SKILL.md +59 -0
- package/skills/win_anim_sfx.aiaudio/manifest.json +46 -0
- package/skills/win_anim_sfx.aiaudio/ref/win_anim.mp3 +0 -0
- package/skills/win_dot.aiimage/SKILL.md +58 -0
- package/skills/win_dot.aiimage/manifest.json +47 -0
- package/skills/win_dot.aiimage/ref/win_dot.png +0 -0
- package/skills/win_dot.aiimage/ref/win_dot.webp +0 -0
- package/skills/win_result_panel.aiimage/SKILL.md +58 -0
- package/skills/win_result_panel.aiimage/manifest.json +47 -0
- package/skills/win_result_panel.aiimage/ref/win.png +0 -0
- package/skills/win_result_panel.aiimage/ref/win.webp +0 -0
- package/skills/word_connect.aigameplay/SKILL.md +86 -0
- package/skills/word_connect.aigameplay/manifest.json +154 -0
- package/skills/word_connect.aigameplay/ref/pgs-schema.json +212 -0
- package/skills/word_connect.aigameplay/ref/reducer.template.ts +186 -0
- package/src/index.ts +10 -0
- package/src/skills.loader.ts +225 -0
- package/src/skills.types.ts +42 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playcraft-prefab
|
|
3
|
+
description: playcraft prefab CLI 全量用法(须带 playcraft 前缀)。与 playcraft-remix-workflow 共用同一 CLI;该技能的「CLI 与 Remix 步骤对照表」与本技能 S1–S4 一致。选主题/schema/metadata 见 remix技能。
|
|
4
|
+
compatibility: agent
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Skill Definition
|
|
8
|
+
tools:
|
|
9
|
+
- bash
|
|
10
|
+
- read
|
|
11
|
+
prompt_extension: |
|
|
12
|
+
你在项目根(或 `--project-dir`)执行命令时**必须写全**:**`playcraft prefab …`**(不要省略 `playcraft`)。
|
|
13
|
+
|
|
14
|
+
**与 playcraft-remix-workflow**:Remix 流程里「何时跑 CLI」见该技能中的 **CLI 与 Remix 步骤对照表**;**子命令、分页、过滤、JSON 字段** 以本技能为准。对方负责 **index.ts / theme.schema.json5 / theme.metadata.md / 源码**;你负责 **协议已有后的 list/describe/set/switch/…**。
|
|
15
|
+
|
|
16
|
+
**修改原则**:**优先 CLI**(校验、路径、`--json` 的 `summary`/`page`/`guide`);环境不便或批量编辑更合适时,**允许直接编辑** 当前主题的 `theme.data.json5`(须 JSON5 合法且符合 schema)。PlayCanvas 项目同理:优先 CLI,必要时手改 GameConfig。
|
|
17
|
+
|
|
18
|
+
**变体一行话**:External 里 variant = 主题目录名,数据在 `src/theme/<id>/theme.data.json5`;PlayCanvas 里 variant = 场景 id,见 `prefab scenes`。存在 `theme.schema.json5` 即按 External 检测;存在 `assets/DefaultGame.json` 即 PlayCanvas。
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
### S1:首次摸清「能改什么」(控制上下文)
|
|
23
|
+
|
|
24
|
+
1. `playcraft prefab variants`(或 `themes` / `scenes`)确认变体。
|
|
25
|
+
2. `playcraft prefab list --json` → 读 **`summary`**(`total` / `enabled` / `disabled` / `changed`)和 **`page`**;有 **`page.hasMore`** 就继续 `--offset` 翻页,**不要假定一页即全集**。
|
|
26
|
+
3. 缩小范围:`--match <regex>`(默认忽略大小写;`--match-case` 区分)、`--used-only` / `--unused-only` / `--changed-only`。
|
|
27
|
+
4. 找字段名或说明:`playcraft prefab search <regex> --json`。
|
|
28
|
+
5. 看约束与示例:`playcraft prefab describe <key> --json`(含 **`guide`**);多 key 时用 `describe --all --json --limit N --offset M`(可加 `--match`)。
|
|
29
|
+
|
|
30
|
+
### S2:只改已有字段(数值 / 开关 / dotpath)
|
|
31
|
+
|
|
32
|
+
1. `playcraft prefab describe <key> --json` 确认类型与范围。
|
|
33
|
+
2. 可选:`playcraft prefab diff --json` 看当前与默认值差异。
|
|
34
|
+
3. 单字段:`playcraft prefab set <key> <field> <value>`;多字段:`set-batch`(`--file` 或 stdin,JSON:`{ "prefabKey": { "field": value } }`)。
|
|
35
|
+
4. 验证:`get` 或再跑 `diff`。
|
|
36
|
+
|
|
37
|
+
### S3:启用/禁用整块 prefab
|
|
38
|
+
|
|
39
|
+
1. `playcraft prefab list --json` 确认 key。
|
|
40
|
+
2. `playcraft prefab enable <key>` 或 `disable <key>`。
|
|
41
|
+
3. 再 `describe` / `set` 填子字段(若需要)。
|
|
42
|
+
|
|
43
|
+
### S4:操作非当前活跃主题
|
|
44
|
+
|
|
45
|
+
- 要么:`playcraft prefab switch <themeId>`(External 会写 `src/theme/index.ts`);
|
|
46
|
+
- 要么:命令统一加 `--variant <themeId>`(或 PlayCanvas 的 scene id)。
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
### 命令速查(项目根执行)
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
playcraft prefab variants | themes | scenes
|
|
54
|
+
playcraft prefab list [--json] [--variant <id>] [--limit N] [--offset M] \
|
|
55
|
+
[--match <regex>] [--match-case] [--used-only] [--unused-only] [--changed-only] [--with-values]
|
|
56
|
+
playcraft prefab diff [--json] [同上过滤分页]
|
|
57
|
+
playcraft prefab describe [key] [--all] [--json] [同上]
|
|
58
|
+
playcraft prefab search <regex> [--json] [--limit N] [--offset M] [--match-case]
|
|
59
|
+
playcraft prefab get <key> [field] [--variant <id>]
|
|
60
|
+
playcraft prefab set <key> <field> <value> [--variant <id>]
|
|
61
|
+
playcraft prefab set-batch [--file path] [--variant <id>]
|
|
62
|
+
playcraft prefab enable|disable <key> [--variant <id>]
|
|
63
|
+
playcraft prefab switch <variant>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
playcraft prefab list --json | jq '.summary'
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
| 常用选项 | 说明 |
|
|
71
|
+
|----------|------|
|
|
72
|
+
| `--variant <id>` | 不指定时:External 用 index.ts 活跃主题;PlayCanvas 用默认 GameConfig |
|
|
73
|
+
| `--project-dir <path>` | 项目根,默认 cwd |
|
|
74
|
+
|
|
75
|
+
### 失败时
|
|
76
|
+
|
|
77
|
+
- 无法识别项目类型:确认 cwd 是否为工程根。
|
|
78
|
+
- key 不存在:`list --json`。
|
|
79
|
+
- 校验失败:`describe <key> --json`。
|
|
80
|
+
- 无效正则:检查 pattern。
|
|
81
|
+
- 变体不存在:`prefab variants`。
|
|
82
|
+
|
|
83
|
+
## 我做什么
|
|
84
|
+
|
|
85
|
+
- 用 CLI(优先)读写已有 prefab 配置;必要时允许手改 data 文件(自担 schema 与语法)
|
|
86
|
+
- 分页检索、diff、批量 `set-batch`
|
|
87
|
+
|
|
88
|
+
## 何时用我
|
|
89
|
+
|
|
90
|
+
- 「当前主题改了哪些配置项」「把 layout.baseWidth 改成 800」
|
|
91
|
+
- 「有哪些 prefab key」「启用某块玩法」「切到另一个主题做配置」
|
|
92
|
+
- Agent 已处于 **Remix 工程根**且协议已在 schema 中
|
|
93
|
+
|
|
94
|
+
## 工作流
|
|
95
|
+
|
|
96
|
+
1. **bash** — 按 **S1→S2/S3/S4** 选用命令序列(尽量带 `--json` 便于解析)
|
|
97
|
+
2. **read** — 仅当 CLI 无法覆盖时读/写 `theme.data.json5`(须符合 playcraft-remix-workflow 目录约定)
|
|
98
|
+
3. **terminate** — `{ summary: "已修改:…" }`
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playcraft-project-management
|
|
3
|
+
description: PlayCraft 项目管理。查看已有变体、浏览推荐 Remix、从推荐 Remix 创建新变体。
|
|
4
|
+
compatibility: agent
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Skill Definition
|
|
8
|
+
tools:
|
|
9
|
+
- bash
|
|
10
|
+
- read
|
|
11
|
+
prompt_extension: |
|
|
12
|
+
你负责 PlayCraft 项目的查询与创建。
|
|
13
|
+
|
|
14
|
+
## 能力清单
|
|
15
|
+
|
|
16
|
+
### 查询已有变体
|
|
17
|
+
运行 `playcraft tools list-remixes` 列出用户拥有的变体(Remix)。可加 `--search "<关键词>"` 按名称搜索,支持分页。
|
|
18
|
+
命令输出摘要到 stdout,详细数据写入文件,用 `read` 工具查看完整结果。
|
|
19
|
+
返回字段:projectId、branchName、name、templateName、updatedAt、visibility、previewUrl。
|
|
20
|
+
|
|
21
|
+
### 查看推荐 Remix
|
|
22
|
+
运行 `playcraft tools list-templates` 获取平台推荐 Remix 列表,了解其 ID、名称、类型。
|
|
23
|
+
命令输出摘要到 stdout,详细数据写入文件,用 `read` 工具查看完整结果。
|
|
24
|
+
|
|
25
|
+
### 创建新变体
|
|
26
|
+
1. 运行 `playcraft tools list-templates` 获取模板列表
|
|
27
|
+
2. 根据用户描述选择最匹配的模板
|
|
28
|
+
3. 运行 `playcraft tools create-remix --project-id <ID> --name "<名称>"` 创建新变体
|
|
29
|
+
4. 调用 terminate 汇报:项目 ID、名称、模板
|
|
30
|
+
|
|
31
|
+
## 注意事项
|
|
32
|
+
- Remix(变体)基于推荐 Remix 创建,用户只能创建 Remix
|
|
33
|
+
- 项目名称应简洁且能反映用户诉求(如"打砖块广告-清明节版")
|
|
34
|
+
- 如果用户只是查询项目,直接运行 `playcraft tools list-remixes` 即可,无需创建
|
|
35
|
+
|
|
36
|
+
## 我做什么
|
|
37
|
+
|
|
38
|
+
- 查询用户已有的 Remix 变体列表(按名称、日期筛选)
|
|
39
|
+
- 浏览平台推荐 Remix,了解类型和适用场景
|
|
40
|
+
- 根据用户需求选择最合适的 Remix,创建新变体
|
|
41
|
+
|
|
42
|
+
## 何时用我
|
|
43
|
+
|
|
44
|
+
- 用户想了解自己有哪些项目时,例如:"我的项目有哪些?"、"找一下名字包含'打砖块'的变体"
|
|
45
|
+
- 用户需要创建新项目时,例如:"帮我做一个打砖块风格的可玩广告"
|
|
46
|
+
|
|
47
|
+
## 工作流
|
|
48
|
+
|
|
49
|
+
### 查询已有变体
|
|
50
|
+
1. **`playcraft tools list-remixes`** — 获取变体列表,可加 `--search` 搜索
|
|
51
|
+
2. **terminate** — 汇报列表结果
|
|
52
|
+
|
|
53
|
+
### 创建新变体
|
|
54
|
+
1. **`playcraft tools list-templates`** — 获取推荐 Remix 列表
|
|
55
|
+
2. **选择 Remix** — 根据用户描述匹配最合适的
|
|
56
|
+
3. **`playcraft tools create-remix --project-id <ID> --name "<名称>"`** — 用选定 Remix 创建新变体
|
|
57
|
+
4. **terminate** — 汇报 `{ summary: "变体已创建:ID=..., 名称=..., 模板=..." }`
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playcraft-remix-workflow
|
|
3
|
+
description: Remix 工程流程(主题/metadata/schema/新功能)。配置读写须落实在可执行命令:在项目根运行 playcraft prefab(list/describe/set/switch/…);详见文内「CLI 对照表」。可手改 theme.data.json5 作备选。与 playcraft-prefab 同一套 CLI。
|
|
4
|
+
disable: false
|
|
5
|
+
compatibility: agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Skill Definition
|
|
9
|
+
tools:
|
|
10
|
+
- bash
|
|
11
|
+
- read
|
|
12
|
+
prompt_extension: |
|
|
13
|
+
你指导在 **Remix 工程**里做玩法变体:主题与协议在仓库中的位置、如何向用户提问、何时扩展 schema、何时改源码。
|
|
14
|
+
|
|
15
|
+
**与 playcraft-prefab**:二者共用同一套 **`playcraft prefab` CLI**(命令清单以 **playcraft-prefab** 技能为准)。本技能补充 **何时、为何** 在 Remix 里执行这些命令;**不要**只写「用 list」而不写 **`playcraft prefab list`**。
|
|
16
|
+
|
|
17
|
+
- **本技能负责**:选/复制主题、改 `src/theme/index.ts`、读/写 `theme.metadata.md`、**编辑 `theme.schema.json5`**、新功能设计协议、改游戏源码。
|
|
18
|
+
- **配置值读写(已有协议)**:在项目根执行 **`playcraft prefab …`**(优先);CLI 不便时可手改 `src/theme/<主题>/theme.data.json5`(须符合 schema)。PlayCanvas 工程用 `playcraft prefab scenes` 与 `--variant <sceneId>`。
|
|
19
|
+
|
|
20
|
+
### CLI 与 Remix 步骤对照(均在仓库根目录执行)
|
|
21
|
+
|
|
22
|
+
| Remix 步骤 | 建议命令(External 主题工程) |
|
|
23
|
+
|------------|-------------------------------|
|
|
24
|
+
| 确认有哪些主题 / 当前活跃 | `playcraft prefab themes --json` |
|
|
25
|
+
| 用户选定主题后对齐 CLI 上下文 | `playcraft prefab switch <themeId>` **或** 所有后续命令加 `--variant <themeId>` |
|
|
26
|
+
| 全局摸清 prefab 与启用情况 | `playcraft prefab list --json`(读 `.summary`、`.page`,注意 `.page.hasMore`) |
|
|
27
|
+
| 按关键词找字段 | `playcraft prefab search '<regex>' --json` |
|
|
28
|
+
| 看某 key 约束与 `guide` | `playcraft prefab describe <key> --json` |
|
|
29
|
+
| 看相对默认值改动了什么 | `playcraft prefab diff --json` |
|
|
30
|
+
| 改一个字段 | `playcraft prefab set <key> <field> <value>` |
|
|
31
|
+
| 一次改多字段 | `playcraft prefab set-batch --file batch.json`(或 stdin) |
|
|
32
|
+
| 整块启用/关闭 | `playcraft prefab enable <key>` / `disable <key>` |
|
|
33
|
+
| PlayCanvas:有哪些场景 | `playcraft prefab scenes --json` |
|
|
34
|
+
|
|
35
|
+
`theme.data.json5` 即 CLI 对当前主题写入的配置落盘文件;手改该文件与 CLI 写入应二选一或谨慎合并,避免冲突。
|
|
36
|
+
|
|
37
|
+
## 介绍
|
|
38
|
+
|
|
39
|
+
指导修改当前可玩广告工程;产物是基于某一 **theme** 配置呈现的游戏。
|
|
40
|
+
|
|
41
|
+
## 变体原则
|
|
42
|
+
|
|
43
|
+
玩法由配置项组合而成,尽量配置化以实现复用与组装。目录见下;**所有 prefab 子命令的完整列表、分页与过滤选项以 playcraft-prefab 技能为准**,本处只固定 **Remix 与 CLI 的衔接**。
|
|
44
|
+
|
|
45
|
+
## 目录结构
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
├── assets ← 公共资源
|
|
49
|
+
├── SKILL
|
|
50
|
+
│ ├── SKILL.md ← 若存在则读取,了解当前游戏专用技能
|
|
51
|
+
├── src
|
|
52
|
+
│ ├── theme
|
|
53
|
+
│ │ ├── theme.schema.json5 ← 全局唯一协议:所有 prefab 键与字段定义
|
|
54
|
+
│ │ ├── theme.metadata.md ← 各主题玩法摘要(# 主题名 / 玩法要点)
|
|
55
|
+
│ │ ├── index.ts ← 仅引用一个主题目录,如 export { default } from "./draft"
|
|
56
|
+
│ │ ├── draft/
|
|
57
|
+
│ │ │ ├── theme.data.json5 ← 当前主题最终配置(CLI 优先写入;亦可手改)
|
|
58
|
+
│ │ │ ├── assets/
|
|
59
|
+
│ │ └── <其他主题目录>/
|
|
60
|
+
│ │ └── theme.data.json5
|
|
61
|
+
...
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## 初始化流程
|
|
65
|
+
|
|
66
|
+
### 问题 1:选择主题
|
|
67
|
+
|
|
68
|
+
- 读取 `src/theme/theme.metadata.md`,向用户展示可选主题与玩法描述。
|
|
69
|
+
- 选项:① 使用 draft;② 切换到已有主题名;③ 复制某主题为新目录并命名。
|
|
70
|
+
- 用户确认后:修改 `src/theme/index.ts` 指向选定主题。
|
|
71
|
+
- **之后改配置值(必绑 CLI)**:先执行 `playcraft prefab switch <themeId>`(会改 `index.ts` 与 CLI 默认主题一致),**或** 不改 index、仅对每条命令加 `--variant <themeId>`。再跑 `playcraft prefab list --json` 确认上下文。
|
|
72
|
+
|
|
73
|
+
### 问题 2:修改需求
|
|
74
|
+
|
|
75
|
+
- **摸清能力(先 CLI)**:`playcraft prefab list --json` → `jq '.summary'`;按需 `playcraft prefab search '<关键词>' --json`、`playcraft prefab describe <key> --json`。仍可读 `theme.schema.json5` 补细节,但**不要**只靠通读大文件代替上述命令。
|
|
76
|
+
- 询问用户今日目标:已有协议内变体 → **场景 1**;新协议 → **场景 2**。
|
|
77
|
+
|
|
78
|
+
## 变体流程(用户提出具体需求后)
|
|
79
|
+
|
|
80
|
+
下文以 `src/theme/draft` 为例说明路径;其他主题将 `draft` 换成对应目录名,或对每条命令使用 `playcraft prefab … --variant <themeId>`。
|
|
81
|
+
|
|
82
|
+
### 已有配置项:优先 CLI,可选手改
|
|
83
|
+
|
|
84
|
+
- **首选**:上表所列 **`playcraft prefab …`** 全名;机器解析时**加 `--json`**。
|
|
85
|
+
- **亦可**:直接编辑 `theme.data.json5`(须符合 `theme.schema.json5`、JSON5 合法)。
|
|
86
|
+
- 协议要求其他工具/技能(生图、路径资源等)时,按协议执行。
|
|
87
|
+
|
|
88
|
+
### 场景 1:需求落在已有协议内
|
|
89
|
+
|
|
90
|
+
**默认命令序列**:`playcraft prefab describe <key> --json` → `playcraft prefab set <key> <field> <value>`(或多字段 `set-batch`)→ `playcraft prefab get <key> --json` 或 `diff --json` 复核。CLI 不便时再手改 `theme.data.json5`。
|
|
91
|
+
|
|
92
|
+
### 场景 2:新增功能(协议中尚不存在)
|
|
93
|
+
|
|
94
|
+
先结合源码与 schema 注释判断是否允许实现(部分能力可能以库形式封闭并在 schema 中注明)。
|
|
95
|
+
|
|
96
|
+
若可实现,以配置优先,典型步骤:
|
|
97
|
+
|
|
98
|
+
1. **设计协议项**:与用户澄清细节;将新块写入 **唯一** 的 `src/theme/theme.schema.json5`(JSON Schema + 必要时 `xplatform`,参考 `references/xplatform.schema.json5`)。新 object 建议含 **`enable`,且默认 `false`**,避免旧主题被默认打开。
|
|
99
|
+
2. **写入配置值**:协议落地后执行 **`playcraft prefab enable <key>`**,再 **`playcraft prefab describe <key> --json`**,然后 **`playcraft prefab set …`** / **`playcraft prefab set-batch …`** 填默认值;亦可手改 `theme.data.json5`。更新 `theme.metadata.md`,未实现前可标【实现中】。
|
|
100
|
+
3. **实现源码**:按新协议接入游戏逻辑;验收通过后更新 `theme.metadata.md`,去掉【实现中】。
|
|
101
|
+
|
|
102
|
+
## 我做什么
|
|
103
|
+
|
|
104
|
+
- Remix 流程:主题选择、metadata、目录与 schema 扩展、新功能实现节奏
|
|
105
|
+
- 在流程中嵌入 **完整 `playcraft prefab …` 命令**;细节与选项见 **playcraft-prefab** 技能
|
|
106
|
+
|
|
107
|
+
## 何时用我
|
|
108
|
+
|
|
109
|
+
- 用户要「换主题 / 复制主题 / 理解这个游戏能改什么」
|
|
110
|
+
- 需要改 **theme.schema.json5** 或更新 **theme.metadata.md**
|
|
111
|
+
- 新玩法从零设计协议并实现代码
|
|
112
|
+
|
|
113
|
+
## 工作流
|
|
114
|
+
|
|
115
|
+
1. **read** — `theme.metadata.md`;必要时 `theme.schema.json5`
|
|
116
|
+
2. **bash / 用户** — 确认主题;**bash** — `playcraft prefab switch …` 或统一 `--variant`
|
|
117
|
+
3. **bash** — `playcraft prefab list|search|describe|set|…`(完整命令见上表与 playcraft-prefab)
|
|
118
|
+
4. **read / bash** — 场景 2:改 `theme.schema.json5`、`theme.metadata.md`、源码
|
|
119
|
+
5. **terminate** — 简要汇报变更与待验收点
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "平台私有metadata字段协议",
|
|
5
|
+
"description": "描述PlayCraft平台渲染各字段表单时的辅助数据结构",
|
|
6
|
+
"required": [
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"value_type": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "path",
|
|
12
|
+
"description": "可选字段,值类型标识。例如 所描述的目标字段若表示文件路径,例如 value: ./assets/xxx.png,则可以添加 value_type: path 用于平台识别后使用文件解析器处理该目标字段",
|
|
13
|
+
"examples": [
|
|
14
|
+
"path"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
"mime_type": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "可选字段,所描述的目标字段若表示文件/文件路径时可以使用。用于指定文件格式,遵循 MIME 规范",
|
|
20
|
+
"examples": [
|
|
21
|
+
"image/png",
|
|
22
|
+
"image/jpeg",
|
|
23
|
+
"image/gif",
|
|
24
|
+
"image/webp",
|
|
25
|
+
"audio/mpeg",
|
|
26
|
+
"application/json"
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"additionalProperties": false
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playcraft-save
|
|
3
|
+
description: 原子操作:将 sandbox 中的当前代码(含 dist/ 如已构建)sync 到本地 repo,commit 并 push 到 Git。不触发构建,不上传 COS。
|
|
4
|
+
compatibility: agent
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Skill Definition
|
|
8
|
+
tools:
|
|
9
|
+
- bash
|
|
10
|
+
- read
|
|
11
|
+
prompt_extension: |
|
|
12
|
+
你负责将项目 sandbox 中的当前状态保存到 Git(sync → commit → push)。
|
|
13
|
+
|
|
14
|
+
## 职责边界
|
|
15
|
+
- **只负责 Git 保存**,不执行构建,不上传 COS
|
|
16
|
+
- 若 sandbox 内已有 dist/(之前执行过 build),dist/ 也会随源码一起提交
|
|
17
|
+
- 保存成功 → terminate 汇报 commitHash
|
|
18
|
+
|
|
19
|
+
## CLI 命令说明
|
|
20
|
+
- **`playcraft tools save-to-git --project-id <ID> --message "<提交信息>"`**:sync sandbox → commit → push,返回 success + commitHash
|
|
21
|
+
- **`playcraft tools list-remixes`**:当 projectId 未知时,先查询获取;结果写入文件,stdout 打印摘要,用 `read` 工具查看详细数据
|
|
22
|
+
- **read**:读取 context.md 获取项目信息和 commit 信息建议
|
|
23
|
+
|
|
24
|
+
## 工作流
|
|
25
|
+
1. 从 context.md 或 `playcraft tools list-remixes` 获取 projectId 和 branch
|
|
26
|
+
2. 确定 commitMessage(简洁描述本次变更)
|
|
27
|
+
3. 运行 **`playcraft tools save-to-git --project-id <ID> --message "<提交信息>"`**
|
|
28
|
+
4. 成功 → terminate `{ summary: "已保存,commit: <hash>" }`
|
|
29
|
+
5. 冲突/失败 → terminate `{ summary: "保存失败:<原因>" }`
|
|
30
|
+
|
|
31
|
+
## commitMessage 规范
|
|
32
|
+
- 简洁描述本次改动,如 "feat: 替换背景图为节日版"、"fix: 修复碰撞检测逻辑"
|
|
33
|
+
- 若 Manager 在 context.md 中指定了 commitMessage 则直接使用
|
|
34
|
+
|
|
35
|
+
## 我做什么
|
|
36
|
+
- 将 sandbox 中的最新代码 sync 到本地 repo
|
|
37
|
+
- 创建 Git commit 并推送到远端
|
|
38
|
+
|
|
39
|
+
## 何时用我
|
|
40
|
+
- 代码修改完成后,只想保存代码(不需要构建或发布预览)
|
|
41
|
+
- 作为 deploy 流程中的中间步骤(build → **save** → publish)
|
|
42
|
+
|
|
43
|
+
## 工作流
|
|
44
|
+
1. **`playcraft tools save-to-git --project-id <ID> --message "<提交信息>"`**
|
|
45
|
+
2. 成功 → **terminate** `{ summary: "保存成功,commit: <commitHash>" }`
|
|
46
|
+
3. 失败 → **terminate** `{ summary: "保存失败:<error>" }`
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: playcraft-skill-recommender
|
|
3
|
+
description: 构建项目前的 Skill 推荐与脚手架工具。在开始任何新游戏项目前必须先调用,根据引擎(threejs/phaser)和意图关键词,自动推荐完整的代码 skill 集合(含引擎层/布局层/输入层/渲染层/动画层/玩法层)和媒体资产(背景图/BGM/SFX/UI 面板),并生成可直接执行的 scaffold 命令。
|
|
4
|
+
triggers: 构建新游戏项目, 选择 skill, 查找可用组件, 3D项目搭建, Three.js项目, Phaser项目
|
|
5
|
+
compatibility: agent,opencode
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# playcraft-skill-recommender
|
|
9
|
+
|
|
10
|
+
## 作用
|
|
11
|
+
|
|
12
|
+
解决 Agent 遗漏已有 skill 的根本问题:**在构建任何项目之前,先运行此命令,获取完整推荐清单,再动手写代码。**
|
|
13
|
+
|
|
14
|
+
## Skill Definition
|
|
15
|
+
|
|
16
|
+
tools:
|
|
17
|
+
|
|
18
|
+
- bash
|
|
19
|
+
|
|
20
|
+
prompt_extension: |
|
|
21
|
+
在开始任何新游戏项目之前,你必须先运行 playcraft skills match 获取完整推荐清单。
|
|
22
|
+
在推荐列表中找到对应 skill 后,先读取其 SKILL.md 了解用法,再用 scaffold 命令将 ref 文件复制到项目。
|
|
23
|
+
禁止在未查看推荐列表的情况下手写引擎/布局/输入/渲染/动画代码。
|
|
24
|
+
|
|
25
|
+
## 三条命令
|
|
26
|
+
|
|
27
|
+
### 1. `match` — 推荐完整 skill 集合(最常用)
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
playcraft skills match --intent "<关键词,逗号分隔>" [--json]
|
|
31
|
+
# 省略 --engine 时会自动推断引擎(JSON 字段 engineSource=inferred)并输出依赖图 + scaffold
|
|
32
|
+
|
|
33
|
+
playcraft skills match --engine <threejs|phaser> --intent "<关键词>" [--json]
|
|
34
|
+
# 引擎已定,用 --engine 覆盖自动推断
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**示例:**
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# 三消(自动选定 phaser,一轮即可粘贴到 atom-plan)
|
|
41
|
+
playcraft skills match --intent "match3,grid,tile" --json
|
|
42
|
+
|
|
43
|
+
# Three.js 3D 棋盘
|
|
44
|
+
playcraft skills match --intent "board,3d,path,animation" --json
|
|
45
|
+
# 或显式:playcraft skills match --engine threejs --intent "board,3d,path,animation" --json
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**输出结构:**
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
10 个代码 skill(按层排序)
|
|
52
|
+
引擎层 → 布局层 → 场景层 → 输入层 → 渲染层 → 动画层 → 玩法层 → 实体层 → UI层
|
|
53
|
+
|
|
54
|
+
N 类媒体资产(M 个候选)
|
|
55
|
+
背景图层:多个背景任选其一
|
|
56
|
+
音频层:多个 BGM + 各类 SFX
|
|
57
|
+
视觉资产层:结果面板、粒子、Logo、图标…
|
|
58
|
+
|
|
59
|
+
💡 代码 Scaffold 快捷命令(可直接复制执行)
|
|
60
|
+
🎨 媒体生成提示(参数见各 skill 目录下 manifest.json 的 generation)
|
|
61
|
+
- 图片:playcraft tools generate-image(--prompt / --aspect-ratio / --image-model / --reference-image 等)
|
|
62
|
+
- 音效:playcraft tools generate-sfx;BGM:playcraft tools generate-bgm
|
|
63
|
+
- 本地后处理:playcraft image <子命令>(如 remove-background、convert),见 playcraft-image-processing
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### 2. `list` — 列出可用 skill(快速浏览)
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
playcraft skills list [--engine threejs] [--category layout] [--tag 3d] [--json]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### 3. `scaffold` — 将 ref 文件复制到项目(执行脚手架)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
playcraft skills scaffold \
|
|
76
|
+
--engine threejs \
|
|
77
|
+
--atoms grid_board_layout.aicomponent,path_input_handler.aicomponent \
|
|
78
|
+
--out ./src \
|
|
79
|
+
[--dry-run] \
|
|
80
|
+
[--force]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## 推荐算法说明
|
|
84
|
+
|
|
85
|
+
### 代码 skill 匹配(第一遍)
|
|
86
|
+
|
|
87
|
+
打分规则(满足任意条件累加,阈值 ≥ 8 进入推荐):
|
|
88
|
+
|
|
89
|
+
| 信号 | 分值 | 说明 |
|
|
90
|
+
| ----------------------------- | ----- | ---------------------- |
|
|
91
|
+
| `engineVariants[engine]` 存在 | +15 | 有该引擎的专属变体文件 |
|
|
92
|
+
| `renderBackend` 包含该引擎 | +15 | 声明支持该引擎 |
|
|
93
|
+
| `tags` 包含引擎名 | +8 | 标签匹配 |
|
|
94
|
+
| 每个 intent 标签命中 `tags` | +3/个 | 意图相关 |
|
|
95
|
+
| `imports` 中依赖该引擎 skill | +5 | 直接依赖链 |
|
|
96
|
+
|
|
97
|
+
依赖图遍历时,优先使用 `engineVariants[engine].imports`(引擎-aware),避免把其他引擎的依赖拉进来。
|
|
98
|
+
|
|
99
|
+
### 媒体资产匹配(第二遍,引擎无关)
|
|
100
|
+
|
|
101
|
+
媒体 skill(`.aiimage` / `.aiaudio` / `.aiconfig`)通过 `bindingRoles` 分组:
|
|
102
|
+
|
|
103
|
+
- 有 `bindingRoles` 的 skill → 按 role 分组,同 role 多个 = 候选项(任选其一)
|
|
104
|
+
- 无 `bindingRoles` 但有 `background` tag → 归入"背景图"候选组
|
|
105
|
+
- 无 `bindingRoles` 但有 `bgm` tag → 归入"背景音乐"备选
|
|
106
|
+
|
|
107
|
+
## Skill 目录发现优先级
|
|
108
|
+
|
|
109
|
+
1. `--skills-dir <path>` 参数
|
|
110
|
+
2. `AGENT_SKILLS_PATHS` 环境变量(逗号分隔)
|
|
111
|
+
3. `<cwd>/node_modules/@playcraft/skills/skills`(项目安装的 skills 包)
|
|
112
|
+
4. `<CLI包>/../../../skills/skills`(monorepo 开发时自动发现)
|
|
113
|
+
|
|
114
|
+
## Agent 工作流(必须遵守)
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
开始构建新项目
|
|
118
|
+
↓
|
|
119
|
+
① 运行 playcraft skills match --engine <引擎> --intent "<意图关键词>"
|
|
120
|
+
↓
|
|
121
|
+
② 阅读推荐清单,确认代码 skill 层级和媒体资产列表
|
|
122
|
+
↓
|
|
123
|
+
③ 对每个推荐的代码 skill,读取其 SKILL.md 了解用法
|
|
124
|
+
↓
|
|
125
|
+
④ 执行 scaffold 快捷命令,将 ref 文件复制到项目
|
|
126
|
+
↓
|
|
127
|
+
⑤ 按各媒体 skill 的 manifest.json(generation)调用 playcraft tools generate-image / generate-sfx / generate-bgm,必要时再跑 playcraft image 后处理
|
|
128
|
+
↓
|
|
129
|
+
⑥ 在已有 ref 文件基础上编写项目代码(不要重复造轮子)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
**禁止事项:**
|
|
133
|
+
|
|
134
|
+
- ❌ 未运行 `skills match` 就开始写引擎/布局/输入/渲染代码
|
|
135
|
+
- ❌ 手动猜测 skill 名称(如只搜到 `threejs.aicomponent` 就开始,忽略 `grid_board_layout`)
|
|
136
|
+
- ❌ 对已有 ref 文件重新实现相同功能(如自行写 `BoardLayout3D.ts`)
|
|
137
|
+
|
|
138
|
+
## 典型案例
|
|
139
|
+
|
|
140
|
+
**问题**:构建 Three.js 3D 棋盘消除游戏时,未发现 `grid_board_layout.aicomponent`(含现成 `BoardLayout3D.ts`),导致自行实现了一遍棋盘布局逻辑。
|
|
141
|
+
|
|
142
|
+
**正确做法**:
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
playcraft skills match --engine threejs --intent "board,3d,path,animation"
|
|
146
|
+
# 输出中会明确显示:
|
|
147
|
+
# ── 布局层 ──────────────────────
|
|
148
|
+
# • grid_board_layout.aicomponent [threejs 变体]
|
|
149
|
+
# Scaffold 文件:
|
|
150
|
+
# ref/BoardLayout3D.ts → src/game/utils/BoardLayout3D.ts
|
|
151
|
+
# ref/BoardRenderer3D.ts → src/game/rendering/BoardRenderer3D.ts
|
|
152
|
+
```
|