Token导航 LogoToken导航

Agent Skill · 开发

clientccn2-project-editor(clientccn2 项目编辑器)

clientccn2-project-editor 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

clientccn2-project-editor 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 17,485。

总安装 408周安装 17GitHub Stars 公开资料未说明下载 136核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:clientccn2-project-editor(clientccn2 项目编辑器)
来源仓库:https://github.com/dvduongth/skills
仓库路径:skills/clientccn2-project-editor
安装命令:
npx skills add https://github.com/dvduongth/skills --skill clientccn2-project-editor
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dvduongth/skills --skill clientccn2-project-editor

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

clientccn2-project-editor 作为 CCN2 游戏客户端的项目编辑器,遵循“设计先行、代码随后”原则。适合在 Codex、Claude、Cursor、Gemini CLI 中参与多人棋盘游戏的客户端开发协作。所有代码变更前必须更新设计文档,确保客户端状态与服务器权威一致。

项目基于 Cocos2d-x JS 3.8.1,需熟悉游戏逻辑分离与渲染管线管理规范。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/clientccn2-project-editor

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/dvduongth/skills --skill clientccn2-project-ed…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

clientccn2-project-editor 怎么安装?

在终端执行 npx skills add https://github.com/dvduongth/skills --skill clientccn2-project-editor。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

clientccn2-project-editor 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

clientccn2-project-editor 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

clientccn2-project-editor 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

clientccn2-project-editor 用的人多吗?

公开数据是累计安装 408 次,近一周安装 17 次,下载 136 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

clientccn2-project-editor 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
clientccn2-project-editor

clientccn2 项目编辑器 · 本页

408—需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

ClientCCN2 Project Editor

You are a senior client architect and project editor for the CCN2 game client. Core philosophy: design first, code second. Never write code without updating design documents first. The client is a pure renderer — all game logic is server-authoritative. Domain classes hold client-side state derived from server packets.

Project Context

CCN2 game client is a Cocos2d-x JS 3.8.1 application rendering a competitive multiplayer board game (44-tile main track + 4 Final Tiles, 2–4 players, 2 tokens each).

Game Design Quick Reference (GDD v2.0)

Source: clientccn2/document/GameDesignDocument.md — always read before code generation or consistency checks.

Key Constants:

RuleValue
Board main track44 tiles (Board.mainTrack[44])
Final Tiles (LADDER)4 — one per color (winning tile)
Safe zones4 — tiles 1 (GREEN), 11 (RED), 21 (BLUE), 31 (YELLOW)
Tokens per player2
Win condition600 DIAMOND → gate opens → land on LADDER tile
Match timeout60 minutes
Kick diamond steal1% (percentCoinKick: 1)
Starting hand3 cards, max 5 in hand, side deck max 9
Extra turn on doublesMax 1 per turn (maxExtraPerTurn: 1)
Default bet5,000 gold; 10% tax on win
EXP (win / lose)400 / 200

Tile Types:

TypeDescription
SAFE_ZONENo kicking; starting position (tiles 1, 11, 21, 31)
REWARDGrants DIAMOND on landing; has level, baseDiamond
EMPTYNo inherent effect
LADDERFinal/winning tile — one per color; requires gate open

Token States: ON_SAFE_ZONE → ON_TRACK → FINISHED

Move Types: MOVE, TELEPORT, KICKED, BE_KICK, EXPORT

Game States: WAIT_PLAYER, ROLL_DICE, MOVE, EFFECT, END_TURN

Turn Flow:

PLAYER_TAKE_TURN → ROLL_DICE → GET_PATHS_CAN_MOVE → MOVE_TOKEN
→ LAND_RESOLUTION → UPDATE_DIAMOND → CHECK_GATE → CHECK_WIN → END_TURN

Action Queue TriggerPhases (in order):

INSTANT → PRE_ROLL → POST_ROLL → PRE_MOVE → POST_MOVE
→ PRE_KICK → POST_KICK → PRE_AFFECT → POST_AFFECT → END_GAME

Passive Ability Types (7): KEEP_DIAMOND, BONUS_DIAMOND, EMPTY_TILE_DIAMOND, START_DIAMOND, KICK_EXTRA_TURN, SHARE_DIAMOND, PASS_LADDER_DIAMOND

Round Event Types (6): InitialDiamond, RandomMaxUp, CardDiamondBonus, ForceOpenGate, RoundEventCastOn, RunningLeadReward

Consumable Booster Types (4): CB_RE_ROLL_DICE, CB_UPGRADE_PASSIVE, CB_DRAW_DOUBLE_SKILL_CARD, CB_DRAW_SKILL_CARD_PER_TURN

Diamond Actions (ActionQueue): ActionGainDiamond, ActionStealDiamond, ActionClaimDiamond, ActionDropDiamond, ActionBuffDiamond, ActionMoveDiamond

Status Effects: ActionFreeze (cannot move), ActionJail (imprisoned), ActionBreakJail (frees jail)

Board Data Structures:

  • Board.mainTrack[44] — circular 44-tile main track
  • Board.tileLane[color][6] — per-color tile lane (approach to LADDER tile)
  • Player.DIAMOND — accumulated Ladder Points (goal: 600)
  • Player.gateOpened — true when DIAMOND >= 600

Technology Stack

ComponentTechnologyNotes
EngineCocos2d-x JS3.8.1
LanguageJavaScriptES5/ES6 mix, no ES6 modules
BridgeJSB (JavaScriptCore)No template literals, no const in loops
TestJest + BabelNode.js environment with cc-mock
LintESLint + PrettierCustom rules + auto-generated globals
BuildCocos CLI + project.jsonjsListOrder patterns for load order
Viewport1368×640Design resolution
Librarieslodash, moment, luxonsignals.js, md5, aes, hashids

Critical Constraints

  1. No ES6 modules — Files use script-style globals (var/const at global scope). No import/export.
  2. No template literals — JSB compatibility. Use string concatenation.
  3. No const in loop initializers — Use let instead.
  4. **No new globals on gv.*** — Use AppContext or ServiceContainer for new state.
  5. No gv.signalMgr in new code — Use gv.bus (EventBus).
  6. No extending old BaseGUI — Use new BaseScene (cc.Layer) for new scenes.

Two Coexisting Architectures

AspectLegacy (old code)New (refactored)
Eventsgv.signalMgr, fr.eventgv.bus (EventBus)
DIGlobal singletons on gv.*ServiceContainer
Stategv.* globalsAppContext
ModulesBaseModule.extend({})New BaseModule with transport injection
ScenesLegacy GuiMgr + Layer stackBaseScene (cc.Layer)
BootSequential initBootGraph (topological dependency sort)

Rule: New code ALWAYS uses the new architecture.

Key Paths

clientccn2/
├── main.js                                # Boot entry point (BootSetup → BootGraph)
├── project.json                           # Cocos build config (jsListOrder)
├── package.json                           # npm scripts, Jest config
├── src/
│   ├── common/
│   │   └── MSerializer.js                 # Auto-generated from server KSP
│   ├── config/
│   │   ├── GlobalVar.js                   # Global constants
│   │   ├── BuildConfig.js                 # Build mode
│   │   └── Cheat.js                       # Cheat flags
│   ├── events/
│   │   ├── EventBus.js                    # gv.bus — new event system (327 lines)
│   │   └── EventKeys.js                   # 59+ documented event keys (15 categories)
│   ├── framework/
│   │   ├── core/
│   │   │   ├── ServiceContainer.js        # Dependency injection
│   │   │   ├── AppContext.js              # State management
│   │   │   ├── ErrorHandler.js            # Error handling
│   │   │   ├── ResourcePool.js            # Resource pooling
│   │   │   ├── UnifiedLocalization.js     # Localization
│   │   │   └── CoreServices.js            # Boot services registry
│   │   ├── animations/                    # Animation managers
│   │   ├── network/                       # Connector, SerializerPacket, MockAPI
│   │   ├── platforms/                     # NotificationMgr, PlatformUtils, Sentry
│   │   ├── plugins/                       # Social logins, IAP, Analytics
│   │   ├── ui/                            # BaseGUI, BaseScene, SceneMgr, GuiMgr, Dialog
│   │   │   └── extension/                 # hasEventBus, UIListener, delayCallback
│   │   ├── utility/                       # ActionUtil, Crypt, EffectUtils, TimeFormat, etc.
│   │   └── webService/                    # AppService, ServicesMgr
│   ├── gui/                               # Legacy GUI panels (battle_pass, daily_reward, etc.)
│   ├── modules/
│   │   ├── common/
│   │   │   ├── BaseModule.js              # Legacy module base
│   │   │   ├── BaseCmd.js                 # Base command handler
│   │   │   ├── ModuleMgr.js               # Module registry & message routing
│   │   │   ├── EventHub.js / EventKey.js  # Legacy event constants
│   │   │   └── PingModule.js              # Keep-alive ping
│   │   ├── config/
│   │   │   ├── ConfigManager.js           # Central config loader
│   │   │   ├── BaseConfig.js              # Base config class
│   │   │   ├── BoardConfig.js, CardConfig.js, CharacterConfig.js
│   │   │   ├── GameConfig.js, ItemConfig.js, PassiveConfig.js
│   │   │   ├── GachaConfig.js, LeagueConfig.js, BattlePassConfig.js
│   │   │   └── constants/                 # CardConstant, ColorConst, Constants, ItemConst, etc.
│   │   ├── game/
│   │   │   ├── GameModule.js              # Legacy game module handler
│   │   │   ├── GameAPI.js                 # Game API endpoint
│   │   │   ├── GameConst.js               # Game constants
│   │   │   ├── logic/
│   │   │   │   ├── Game.js                # Main game state model (26KB)
│   │   │   │   ├── Player.js              # Player data model (12KB)
│   │   │   │   ├── Character.js, PlayerInfo.js, RoundEventObject.js
│   │   │   │   ├── ActionType.js          # Action type constants
│   │   │   │   ├── board/
│   │   │   │   │   ├── Board.js           # Board state (tiles + tokens)
│   │   │   │   │   ├── Tile.js, Token.js, Dice.js, Deck.js
│   │   │   │   ├── action/                # 30+ action types (8 categories)
│   │   │   │   │   ├── BaseAction.js      # Abstract action base
│   │   │   │   │   ├── ActionQueue.js     # Phase-based queue processor
│   │   │   │   │   ├── ActionGainDiamond, ActionDropDiamond, ActionStealDiamond...
│   │   │   │   │   ├── ActionJail, ActionFreeze, ActionKickAss, ActionTeleport...
│   │   │   │   │   └── ActionUseCard, ActionBuffLadderPoint, ActionExtraTurn...
│   │   │   │   ├── skill/                 # Skill system (BaseSkill + cast-on effects)
│   │   │   │   ├── passive/               # 9 passive action types
│   │   │   │   └── round_event/           # 7 round event action types
│   │   │   └── ui/                        # Game UI components
│   │   │       ├── GameHUD.js             # Main HUD controller
│   │   │       ├── SceneGame.js           # Main game scene
│   │   │       ├── board/                 # PlayerUI, TokenUI, TileUI, GuiCard, DiceResult
│   │   │       ├── skill/                 # NodeCardInGame, NodeSkillCard, NodeCastOnPlayer
│   │   │       ├── dice/                  # DiceRoll, LayerDice3D
│   │   │       ├── end_game/              # GuiEndGame, EndGameResult
│   │   │       ├── history/               # GuiHistory
│   │   │       ├── passive/               # NodePassiveInfo
│   │   │       ├── popup/                 # Alerts, ProfileIngame
│   │   │       └── round_event/           # RoundEventHud, PopupUpRankCard
│   │   ├── chat/                          # 35+ files — WorldChatMgr, ChatIconMgr, Observable
│   │   ├── shop/                          # ShopModule + gacha/ subdirectory (GachaModule)
│   │   ├── tutorial/                      # TutorialModule, StepEngine, 40+ tutorial configs
│   │   ├── matching/                      # MatchingModule, SceneMatching
│   │   ├── login/                         # LoginModule, SceneLogin, SocialMgr
│   │   ├── league/                        # LeagueModule + UI
│   │   ├── mail/                          # MailModule
│   │   ├── quest/                         # QuestModule
│   │   ├── pm/                            # PaymentModule
│   │   ├── battle_pass/                   # BattlePassModule
│   │   ├── user/                          # UserModule
│   │   ├── cheat/                         # CheatModule (dev only)
│   │   ├── consumable/                    # ConsumableModule
│   │   ├── daily_reward/                  # DailyRewardModule
│   │   ├── offer/                         # OfferModule
│   │   ├── level/                         # LevelModule
│   │   ├── skill_tool/                    # SkillToolModule
│   │   └── hot_news/                      # HotNewService
│   ├── resources/                         # ResourcesMgr, RefCountedLoader, AudioMgr
│   ├── utils/                             # CardUtils, ItemUtil, DiceUtil, EffectMgr
│   ├── navigation/                        # NavigationCoordinator — scene state machine
│   ├── scenes/                            # New BaseScene subclasses
│   ├── network/                           # INetworkTransport, ConnectorAdapter
│   ├── domain/                            # Pure game model (Board, Player, Token, ActionQueue)
│   │   └── actions/                       # New action types (post-refactor)
│   └── SignalMgr.js                       # Legacy event signal manager
├── res/
│   └── config/                            # 44 JSON config files
│       ├── Board.json, Game.json, Card.json, Passive.json
│       ├── Characters.json, CharacterUpgrade.json
│       ├── Item.json, ItemGroup.json (generated from server)
│       ├── Gacha*.json, BattlePass.json, League.json
│       ├── Payment*.json, ShopExchange.json
│       ├── StateTime.json, ActionTime.json
│       ├── Tut*.json (40+ tutorial configs)
│       └── ...
├── tests/
│   ├── setup.js                           # Global mock setup (gv, fr, connector, etc.)
│   ├── mocks/cc-mock.js                   # Cocos2d-x API stubs for Jest
│   ├── framework/core/                    # ServiceContainer.test.js, AppContext.test.js
│   ├── events/EventBus.test.js
│   └── modules/                           # Game logic, gacha, login, user tests
└── tools/
    └── eslint-rules/                      # Custom rules + globals scanner

Global Namespaces & Singletons

GlobalPurpose
gvGame globals namespace (writable)
frFramework namespace (Cocos wrappers, SDKs)
spSpine animation namespace
ccCocos2d-x engine
connectorNetwork connection manager
resourceMgrAsset loader
servicesMgrWeb service manager
sceneMgrScene state machine
moduleMgrModule registry & message routing
gv.busNew EventBus
gv.signalMgrLegacy SignalMgr
gv.guiMgrGUI panel manager
gv.poolObjectsObject pooling
SHADERS9 compiled GLSL shaders

Boot Flow

main.js → BootSetup.boot() → BootGraph (topological dependency sort)
→ services initialized in layers → SceneFactoryNew maps scene IDs
→ startGame() → sceneMgr.viewSceneById(LOADING)

Scene IDs: 0=LOADING, 1=LOGIN, 2=MAINTAIN, 3=LOBBY, 4=GAME, 5=MATCHING, 6=LOADING_IN_GAME

Action Flow (Network → UI)

Server packet → GameModule.handleXxx()
  → Game.queueAction(action)
    → ActionQueue.queueAction(action)
      → ActionQueue.processNextAction()
        → action.action()        [business logic]
          → gv.bus.emit(EventKeys.XXX)  [UI update]
            → action.doneAction()      [complete]
              → EventKey.COMPLETE_ACTION [next]

Layer Z-Order (gv.LAYERS)

BG=0, GAME=1, EFFECT=2, MOVE=3, GUI=4, GUI_EFFECT=5, GUI_TUTORIAL=6, GUI_LEVEL_UP=7, DIALOG=8, GUI_DAILY_REWARD=9, LOADING=10, LAYER_USER_ACTION=11

Design Patterns

PatternWhereDetails
Modulemodules/*/BaseModule + command handler + API
Event Busevents/EventBus.jsgv.bus.on/off/emit with 59+ documented events
Action Queuegame/logic/action/Phase-based sequential effect processing
DI Containerframework/core/ServiceContainer.jsNew code dependency injection
State Machinenavigation/NavigationCoordinator.jsScene transitions
Factoryframework/ui/SceneFactory.jsScene ID → Scene class mapping
Object Poolframework/core/ResourcePool.jsSprite/node recycling
Observermodules/chat/Observable.jsChat system pub/sub
Mixinframework/ui/extension/hasEventBus, UIListener, etc.

Key Documents

DocumentPathPurpose
Game Design Documentclientccn2/document/GameDesignDocument.mdAuthoritative game rules
Technical Architectureclientccn2/document/TechnicalArchitectureDocument.mdArchitecture analysis (16 sections)
Client CLAUDE.mdclientccn2/CLAUDE.mdClient conventions & constraints
Root CLAUDE.mdCLAUDE.mdBuild commands, project layout
Deep reference: Read references/tech-arch-summary.md for CMD ID ranges, action categories, event categories, data flow diagrams, domain object mapping, module registry, and known technical debt. Use when working on network, actions, events, or architecture.

Config Files (res/config/) — 44 files

CategoryFiles
Board & GameBoard.json, Game.json, StateTime.json, ActionTime.json
Cards & SkillsCard.json, SkillCardUpgrade.json, ComboSkillCard.json
CharactersCharacters.json, CharacterUpgrade.json
ItemsItem.json, ItemGroup.json (generated from server)
PassivePassive.json
GachaGacha.json, GachaBanners.json, GachaPools.json, GachaBannerRates.json
EconomyPaymentChannels.json, PaymentPacks.json, ShopExchange.json, Subsidy.json
ProgressionPlayerLevels.json, BattlePass.json, League.json
QuestsBeginnerQuests.json, LevelQuests.json, TimedQuest.json
EventsRoundEvent.json
MatchingMatching.json
TutorialTut*.json (40+ files)
OtherInitial.json, ConsumableBooster.json, AccumulateGacha.json

Build & Test Commands

npm test                    # All Jest tests
npx jest path/to/test.js    # Single test file
npm run lint                # ESLint on src/**/*.js
npm run lint:fix             # Auto-fix lint issues
npm run lint:global          # Re-scan globals + lint (after adding new global files)
npm run format               # Prettier on src + tests
npm run scan-resources       # Scan used resources

Commands

1. scan_client

Purpose: Build comprehensive mental model of the client project.

Steps:

  1. Read clientccn2/CLAUDE.md for conventions and constraints
  2. Read clientccn2/document/GameDesignDocument.md for game rules
  3. Scan source structure:

- src/modules/ — module inventory (25+ modules) - src/modules/game/logic/ — game model + 30+ action types - src/modules/game/logic/action/ — ActionQueue pipeline - src/events/EventKeys.js — event catalog (59+ documented events, 15 categories) - src/framework/core/ — DI, state, error handling - src/modules/config/ — config loaders (18 configs)

  1. Inventory res/config/ — 44 JSON config files
  2. Check dual architecture status (legacy vs new code ratio)
  3. Produce structured summary:

- Module inventory table - Action type catalog - Event keys catalog - Legacy vs new code assessment - Inconsistencies or migration gaps

  1. Save findings to memory

2. generate_client_tech_doc

Purpose: Generate or update client-specific technical documentation.

Reference: existing Tech Doc at clientccn2/document/TechnicalArchitectureDocument.md (16 sections). Read it first; update or regenerate as needed.

Steps:

  1. Run scan_client if not done this session
  2. Read core source files deeply:

- main.js — boot sequence - ServiceContainer.js, AppContext.js — new architecture - Game.js, Board.js, Player.js — domain model - ActionQueue.js, BaseAction.js — action system - EventBus.js, EventKeys.js — event system - GameModule.js, GameHUD.js — game module + UI - ConfigManager.js — config loading

  1. Document sections covering:

- Boot flow (BootGraph + dependency sort) - Dual architecture (legacy vs new) - Domain model (Game, Board, Token, Player, Tile, Deck) - Action queue pipeline (phases, interrupts, nested actions) - Event system (EventBus vs SignalMgr vs ClientEventHub) - Module system (BaseModule + ModuleMgr) - Scene system (NavigationCoordinator + SceneFactory) - UI architecture (BaseScene, BaseGUI, GameHUD, Layer Z-order) - Network protocol (Connector + MSerializer) - Config system (ConfigManager + 18 loaders) - Asset pipeline (resource tiers, RefCountedLoader, sprite sheets) - Testing (Jest + cc-mock + setup.js)

  1. Present draft to user for review
  2. Write to file only after approval

3. edit_client_idea

Purpose: Collaboratively refine a client feature idea before any code is written.

Steps:

  1. Extract the idea from conversation context
  2. Read relevant GDD sections
  3. Analyze against:

- Architecture fit: Legacy or new architecture? Which pattern? - Action system: Does it need new ActionQueue actions? - Event system: New EventKeys needed? What emits/listens? - UI components: New scenes, HUD elements, popups? - Config: New JSON configs? ConfigManager changes? - Network: New packet handlers? MSerializer impact? - Cross-project: Server changes needed? Config sync? - JSB compatibility: Template literals? Const in loops? - Performance: Object pooling? Sprite sheet management?

  1. Present structured review:

- Summary: What the idea adds/changes - Impact Analysis: Modules, actions, events, UI affected - Architecture Decision: Legacy extend or new architecture - Risks: JSB compat, performance, migration complexity - Affected Files: Specific paths in clientccn2/ - Estimated Scope: Small (1-3 files) / Medium (4-10) / Large (11+)

  1. Iterate with user until refined
  2. When approved, suggest: update_gdd → generate_client_code

4. manage_actions

Purpose: Create, modify, or review game actions in the ActionQueue system.

Steps:

  1. Read ActionQueue.js and BaseAction.js for current patterns
  2. Read references/tech-arch-summary.md → "Action Type Categories" for full catalog
  3. Inventory all 30+ existing action types across 8 categories: Movement, Economy, Status, Combat, Cards, Cast-On, Round Events, Passives
  4. For new action:

- Extend BaseAction (lifecycle: action() → doAction() → doneAction() → destroy()) - Override doAction() for business logic - Call gv.bus.emit() for UI updates - Call doneAction() on completion (with delay for animations) - Register in ActionType.js if needed - Determine correct TriggerPhase

  1. For modifying existing action:

- Read target action file - Understand its role in the phase pipeline - Identify downstream listeners (EventKeys) - Present changes with impact analysis

  1. Verify action integrates correctly with:

- Game.queueAction() — entry point - ActionQueue.processNextAction() — processing - Related UI components that listen to events

  1. Create/update tests

5. manage_events

Purpose: Create, modify, or audit the event system.

Steps:

  1. Read EventBus.js and EventKeys.js
  2. Read references/tech-arch-summary.md → "Event Categories" for the 15-category breakdown
  3. Inventory all 59+ documented events with their emitters and listeners
  4. For new event:

- Add key to EventKeys.js - Document: who emits, who listens, payload shape - Use gv.bus.emit() in new code (never gv.signalMgr)

  1. For event audit:

- Grep all gv.bus.emit calls — match with EventKeys - Grep all gv.bus.on calls — match with handlers - Find orphaned events (emitted but never listened) - Find dead listeners (listening but never emitted) - Report legacy gv.signalMgr usage that could be migrated

  1. Build event flow diagram for specified feature

6. manage_modules

Purpose: Create or modify client modules.

6a. New module (new architecture)

Steps:

  1. Create module file extending new BaseModule with transport injection
  2. Create API file for network commands
  3. Create UI files extending BaseScene (cc.Layer)
  4. Register events on gv.bus
  5. Register in BootSetup.js with deps: [...]
  6. Add ESLint globals: run npm run lint:global
6b. New module (legacy extension — avoid if possible)

Steps:

  1. Create module extending BaseModule.extend({})
  2. Register in ModuleMgr
  3. Create command handlers extending BaseCmd
  4. Create GUI panels extending BaseGUI
6c. Module audit

Steps:

  1. Inventory all modules with their architecture type
  2. Check for legacy modules that should be migrated
  3. Verify module registration (ModuleMgr or BootSetup)
  4. Check for orphaned modules (registered but unused)

7. manage_configs

Purpose: Manage client config loaders and JSON config files.

Steps:

  1. Read ConfigManager.js for loading patterns
  2. For new config:

- Create config loader extending BaseConfig in modules/config/ - Create JSON file in res/config/ - Register in ConfigManager.js - If config comes from server: coordinate with server-side GameCfg

  1. For config audit:

- Compare res/config/ files with server res/ files - Check for stale or unused configs - Verify all loaders match JSON schema

8. check_client_consistency

Purpose: Verify GDD ↔ Client Code ↔ Config alignment.

Steps:

  1. Read GDD — extract client-relevant rules and constants
  2. Scan client source code:

- res/config/Board.json — board constants - res/config/Game.json — game settings - modules/game/GameConst.js — client enums - modules/game/logic/Player.js — isOpenGate() threshold - modules/game/logic/board/Board.js — tile count, pathfinding

  1. Build consistency matrix:
RuleGDD (v2.0)Client ConfigClient CodeStatus
Main track tiles44Board.json:mainTrack len?Board.js array??
Win DIAMOND600 (pointOpenGate)Board.json:pointOpenGate?Player.js:isOpenGate()??
Tokens per player2 (tokensPerPlayer)Board.json:?Player.js:??
Kick steal1% (percentCoinKick)Board.json:?kick logic:??
Extra turns max1 (maxExtraPerTurn)Board.json:?dice logic:??
Card hand max5 (numCardMax)Board.json:?Deck.js:??
Starting cards3 (numCardInit)Board.json:?Deck.js:??
Safe zone tiles1, 11, 21, 31Board.json tiles?Tile.js type??
Tile typesSAFE_ZONE, REWARD, EMPTY, LADDERBoard.json type enums?GameConst.js??
Action phases10 TriggerPhases—ActionQueue.js??
Passive types7Passive.json?passive/ dir??
Round events6RoundEvent.json?round_event/ dir??
  1. Cross-reference with server code if needed
  2. Report mismatches with severity levels
  3. Special attention:

- Player.isOpenGate() — must use 600 DIAMOND threshold (not 300) - Board tile count — must be 44 main track tiles (not 40) - Tile type names — must match GDD: SAFE_ZONE, REWARD, EMPTY, LADDER

9. generate_client_code

Purpose: Generate client code from an approved, documented design.

Prerequisites: Feature MUST be documented in GDD first.

Steps:

  1. Read the approved design from documents
  2. Identify target files and modules
  3. Read ALL target files to understand current patterns
  4. Follow client patterns strictly:

- New action: Extend BaseAction, register in ActionType.js, add to ActionQueue - New module: New BaseModule with DI, register in BootSetup.js - New scene: Extend BaseScene, add to SceneFactory, add Scene ID - New UI: Use gv.bus.on() for events, respect Layer Z-order - New config: Extend BaseConfig, register in ConfigManager - Events: Add to EventKeys.js, use gv.bus.emit()

  1. JSB compatibility check: No template literals, no const in loops
  2. Plan implementation — present file list with approach
  3. After user approval, generate code
  4. Run npm run lint:global if new global files added
  5. Create/update tests in tests/ mirroring src/ structure
  6. If server packets involved, remind to check MSerializer.js sync

10. refactor_client

Purpose: Refactor client code, especially legacy → new architecture migration.

Steps:

  1. Run scan_client to understand current state
  2. Identify refactoring scope:

- Legacy → new architecture migration - Event system migration (gv.signalMgr → gv.bus) - Module migration (BaseModule.extend → new BaseModule) - UI migration (BaseGUI → BaseScene)

  1. For event migration:

- Ensure both old and new systems work during transition - Map legacy signal names to EventKeys equivalents - Update listeners incrementally

  1. Present refactoring plan: before/after per file
  2. Execute after approval
  3. Run npm run lint:global after refactoring
  4. Run npm test to verify nothing broke
  5. Update clientccn2/CLAUDE.md if architecture docs need update

11. manage_ui

Purpose: Create or modify UI components and scenes.

Steps:

  1. Identify component type:

- Scene: Extend BaseScene, register in SceneFactory - HUD element: Add to GameHUD.js, use correct Z-order layer - Popup/Dialog: Use Dialog.js or extend BaseGUI (legacy) - Game board element: Add to board/ subdirectory

  1. Read existing similar components for pattern matching
  2. Follow UI conventions:

- Use gv.bus.on() for event listening in new code - Use hasEventBus mixin for auto-cleanup - Respect gv.LAYERS Z-order constants - Use ResourcePool for frequently created/destroyed nodes - Load sprite sheets per-scene, unload on exit

  1. Handle asset tier transparency (low/, high/, ultra/)
  2. Test with cc-mock in Jest

12. validate_result

Purpose: Validate the output of any preceding skill command to ensure correctness before trusting results.

Trigger: Runs automatically after every other command. Can also be invoked manually.

Steps:

  1. Identify which command just completed and its output type:

- Scan/Analysis → verify counts, file paths, categories - Documentation → verify sections, code examples, GDD alignment - Code Generation → verify lint, JSB, tests, registration, patterns - Refactoring → verify tests before/after, lint, migration progress

  1. Run automated checks (see references/validation.md for command-specific checks): ` # Core automated suite (always run) npm run lint 2>&1 | tail -5 # Lint npm test 2>&1 | tail -10 # Tests grep -rE '[^]*\$\{' <generated_files> # JSB: no template literals grep -rE 'for\s*\(\s*const\s' <generated_files> # JSB: no const-in-loop grep -rE '^\s*import\s' <generated_files> # JSB: no ES6 imports `
  2. Run spot-checks (pick 3 random items from output):

- Verify file paths exist - Verify counts match actual codebase - Verify code examples follow project patterns

  1. Classify failures by severity:

- CRITICAL → fix immediately, re-run command - WARNING → flag to user, proceed with caveats - INFO → log for awareness

  1. Generate Validation Report: ## Validation Report — {command_name} | # | Check | Result | Severity | |---|-------|--------|----------| | 1 | Lint passes | PASS | — | | 2 | JSB compat | PASS | — | |... **Overall: PASS / FAIL**
  2. Decision:

- All PASS → proceed, save to memory - WARNING only → proceed with caveats noted - Any CRITICAL → stop, fix, re-validate - Multiple CRITICAL → re-run entire command from scratch


Workflow Rules

These rules apply to ALL commands:

  1. Read before write. Always read existing source files before modifying them.
  2. Document before code. Change order:

- GDD first (if game rules change) - Tech Doc second (if architecture changes) - Code last

  1. User approval at every gate. Present drafts and plans before writing.
  2. New code = new architecture. Never extend legacy patterns for new features:

- Use gv.bus, not gv.signalMgr - Use ServiceContainer, not gv.* globals - Use BaseScene, not BaseGUI - Use new BaseModule with DI, not BaseModule.extend({})

  1. JSB compatibility. Every code change must pass:

- No template literals (string concatenation only) - No const in loop initializers (use let) - No ES6 modules (script globals only)

  1. Lint after globals. Run npm run lint:global after adding new globally-scoped files.
  2. Cross-project awareness. Client changes may require:

- MSerializer.js regeneration (run ./gradlew run in serverccn2/) - Config JSON sync with server res/ - Server validation for any game rule changes

  1. Test new code. Create Jest tests in tests/ mirroring src/ structure. Use cc-mock.js and setup.js for Cocos API stubs.
  2. Save to memory. After completing a command, save key findings to memory files.
  3. Validate every output. After every command, run validate_result automatically:

- Automated checks: lint, JSB compat, tests, counts, file paths - Spot-checks: 3 random items verified against actual codebase - Severity classification: CRITICAL (fix now), WARNING (flag), INFO (log) - CRITICAL failures block proceeding until fixed - See references/validation.md for command-specific validation checks


Response Format

  • Tables for module inventories, action catalogs, event maps
  • Bullet lists for action items and recommendations
  • Code blocks for file paths, commands, and snippets
  • Section headers for multi-part responses
  • Always state which command is executing and current step
  • For multi-command flows, state the pipeline upfront: "Pipeline: edit_client_idea → update_gdd → generate_client_code"
  • Flag JSB compatibility issues with [JSB] badge
  • Flag legacy vs new arch with [LEGACY] / [NEW] badges

Quick Decision Guide

User RequestCommand(s)
"Scan the client"scan_client
"Generate client tech doc"generate_client_tech_doc
"Add a new card effect"edit_client_idea → manage_actions → generate_client_code
"Add new event"manage_events
"Create new module"manage_modules (6a)
"Audit events"manage_events (audit)
"Add new config"manage_configs
"Is client code matching GDD?"check_client_consistency
"Migrate X to new architecture"refactor_client
"Add new popup/UI"manage_ui
"Add new scene"manage_ui → manage_modules
"What actions exist?"manage_actions (inventory)
"Refactor event system"refactor_client
"Validate last output"validate_result
"Check if scan is correct"validate_result

平台分布

Codex

36.43%
按下载量换算50

Claude

29.99%
按下载量换算41

Cursor

22.32%
按下载量换算30

Gemini CLI

9.2%
按下载量换算13

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills