원클릭으로
cocos-mobile-optimizer
Use when working on mobile-specific performance issues, battery optimization, or platform-specific features.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Use when working on mobile-specific performance issues, battery optimization, or platform-specific features.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
| name | cocos-mobile-optimizer |
| description | Use when working on mobile-specific performance issues, battery optimization, or platform-specific features. |
This Codex skill adapts the upstream Cocos Creator Claude agent guidance for use in Codex.
Specialist in optimizing Cocos Creator games specifically for mobile platforms (iOS/Android). Use this skill for mobile-specific performance issues, battery optimization, or platform-specific features.
Context: Game drains battery quickly
User: "Optimize battery consumption on mobile devices"
Assistant: "I will use $cocos-mobile-optimizer"
Commentary: Implements frame rate limiting and GPU optimization
Context: Touch input feels laggy
User: "Improve touch response time for mobile"
Assistant: "I will use $cocos-mobile-optimizer"
Commentary: Optimizes touch handling and reduces input latency
Context: App exceeds store limits
User: "Reduce APK/IPA size below 150MB"
Assistant: "I will use $cocos-mobile-optimizer"
Commentary: Compresses assets and removes unused code
@ccclass('MobilePowerManager')
export class MobilePowerManager extends Component {
@property
lowPowerMode: boolean = false;
private _originalFPS: number = 60;
onLoad() {
this.detectDeviceCapabilities();
this.setupPowerManagement();
}
detectDeviceCapabilities() {
// Check device performance tier
const canvas = find('Canvas');
const device = sys.platform;
if (device === sys.Platform.IOS || device === sys.Platform.ANDROID) {
// Adjust quality based on device
this.adjustQualitySettings();
}
}
enterLowPowerMode() {
game.frameRate = 30;
// Reduce particle effects
// Lower texture resolution
// Disable non-essential animations
}
}
// iOS specific optimizations
if (sys.platform === sys.Platform.IOS) {
// Metal renderer optimizations
// Haptic feedback
// Safe area handling
}
// Android specific optimizations
if (sys.platform === sys.Platform.ANDROID) {
// Vulkan renderer support
// Back button handling
// Multi-window support
}
@ccclass('OptimizedTouch')
export class OptimizedTouch extends Component {
private _touchPool: Touch[] = [];
onEnable() {
this.node.on(Node.EventType.TOUCH_START, this.onTouchStart, this);
this.node.on(Node.EventType.TOUCH_MOVE, this.onTouchMove, this);
this.node.on(Node.EventType.TOUCH_END, this.onTouchEnd, this);
}
onTouchStart(event: EventTouch) {
// Use object pooling for touch events
const touch = this.getTouchFromPool();
// Process with minimal allocation
}
}
{
"orientation": "portrait",
"deviceOrientation": "portrait",
"renderMode": "metal",
"exactFitScreen": false,
"optimization": {
"codeStripping": true,
"compressTexture": true,
"useMetal": true
}
}
{
"packageName": "com.company.game",
"orientation": "portrait",
"renderBackend": "gfx-vulkan",
"optimization": {
"instantApp": false,
"appBundle": true,
"compressTexture": true
}
}
Trigger: General optimization needed Handoff: "Mobile-specific optimization done. General optimization for: [areas]"
Trigger: Build configuration Handoff: "Mobile optimization ready. Build setup needed for: [platform]"
Trigger: Native features Handoff: "Mobile optimization complete. Native integration for: [features]"
Read references/mobile-game-development.md when the task needs the full workflow.
Use this skill when the user asks to release the iOS app, upload a build, submit to App Store Connect review, or "在 App Store 上架/提交审核" for WordMagicGame.
Seed a lesson-import draft on a deployed Happyword API (Preview or prod) and optionally run the extract-pending cron so it reaches `pending` (待复核). Uses tools starting with `hw_`. Invoke when the user wants to upload a textbook photo for review against a specific Vercel URL, mirror E2E `test_lesson_import_cron_e2e`, or smoke-test lesson import + cron on a branch deployment.
Investigate why a Vercel preview / production deployment of the FastAPI server is broken (404 on every path, 500 on every path, e2e CI red, etc.). Pulls the right log surface for the symptom and maps HTTP error headers to root causes. Use whenever the deployed server returns wrong responses, the server-ci e2e job fails, or autofix loops keep retrying without converging.
Health-check every active Vercel Preview deployment listed in the live manifest at `https://happyword.cool/api/v1/public/preview-urls.json`. Probes `GET /api/v1/public/health` through Vercel Deployment Protection (`x-vercel-protection-bypass` header), prints a one-line status per preview, and exits non-zero if any are sick. Use when the user asks to "test preview health", "check previews", "are PR previews alive?", before merging anything that touches `server/`, after a fleet-wide redeploy or env-var rotation, or after rotating `VERCEL_AUTOMATION_BYPASS_SECRET` — do NOT loop ad-hoc `curl` calls or use `tools/vercel/smoke-prod.sh` (production-only) for this.
Drives a per-feature visual + spec-anchored gap scout across HarmonyOS / iOS / Android using tools/parity_scout/. Use when asked to "find iOS / Android gaps vs HarmonyOS main", "check parity for <feature>", or "screenshot the three platforms and tell me what's different".
Drives a per-feature visual + spec-anchored gap scout across HarmonyOS / iOS / Android using tools/parity_scout/. Use when asked to "find iOS / Android gaps vs HarmonyOS main", "check parity for <feature>", or "screenshot the three platforms and tell me what's different".