cocos-playable-typescript

Write TypeScript gameplay components for Cocos Creator 3.8.x playables.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/dyCuong03/cocos-agent-team --skill cocos-playable-typescript
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cocos-playable-typescript
Source: https://github.com/dyCuong03/cocos-agent-team/tree/main/skills/typescript-dev
Command: npx skills add https://github.com/dyCuong03/cocos-agent-team --skill cocos-playable-typescript

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill eliminates the guesswork and inconsistencies of writing TypeScript gameplay logic for Cocos Creator 3.8.x playables, ensuring components follow engine best practices, coding standards, and performance budgets out of the box.

Core Features & Use Cases

  • Production-Ready Component Authoring: Write Component-derived TypeScript scripts for input handling, state machines, tween animations, audio integration, and CTA flows that comply with TheOne Studio development standards.
  • Battle-Tested Templates & Snippets: Access pre-built patterns for common mechanics like swipe detection, juicy button interactions, and end-card reveals to speed up development.
  • Cross-Session Logic Consistency: Integrate with agentmemory to persist state machine diagrams and component contracts across development sessions, avoiding redundant work and misalignment with the cocos-engineer.
  • Use Case: When the design team delivers a wireframe for a new hook gameplay screen, use this Skill to write the SwipeHook component with correct @property decorators, input event handling, and state logic, then hand it off to the cocos-engineer with clear mount instructions.

Quick Start

Use this skill to write a SwipeDetector component for the main playfield that tracks touch swipes, emits direction events, and includes proper event cleanup in onDestroy.

Frequently Asked Questions about cocos-playable-typescript

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write TypeScript gameplay components for Cocos Creator 3.8.x playables?

Author production-ready TypeScript gameplay components for Cocos Creator 3.8.x playables by using correct component structures, property decorators, and engine-specific patterns. This ensures scripts meet strict performance budgets and development standards.

Why does my Cocos Creator component script fail due to incorrect property decorators?

Incorrect property decorators in Cocos Creator component scripts cause runtime failures because the engine cannot properly serialize or expose variables. Using correct @property decorators ensures proper input handling and component mounting.

What's the best way to handle input events and state machines in Cocos Creator?

Handle input events and state machines in Cocos Creator by implementing pre-built TypeScript templates for swipe detection and state logic. This enforces proper event cleanup in onDestroy to prevent memory leaks.

Can I use TypeScript for tween animations and CTA flows in Cocos playables?

Yes, you can use TypeScript for tween animations and CTA flows in Cocos playables. Write component-derived scripts that integrate audio and call-to-action mechanisms while adhering to playable performance budgets.

Do I need to manually enforce event cleanup discipline for Cocos 3.x lifecycle patterns?

You do not need to manually enforce event cleanup discipline for Cocos 3.x lifecycle patterns if your TypeScript components follow established templates. The patterns automatically enforce strict hygiene and onDestroy cleanup.