cocos-helper

cocos-helper is a skill for Claude Code, Codex from guyulong/cn-agent-skills. It costs 10 tokens per session (761 once invoked), scanned A, original, MIT.

A helper guide for building games with Cocos Creator, a game engine and editor. It covers project folders, common components, and managers written in TypeScript.

In plain words
What is it for?
Use it when structuring Cocos Creator projects, creating scenes and scripts, building UI or game logic, and adding singleton or event managers.
Why use it?
It gives developers ready-made patterns for organising game files and managing shared systems such as events or game state.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when structuring Cocos Creator projects, creating scenes and scripts, building UI or game logic, and adding singleton or event managers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guyulong/cn-agent-skills/cocos-helper
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add guyulong/cn-agent-skills --skill cocos-helper
Clone the repo
git clone --depth 1 https://github.com/guyulong/cn-agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cocos-helper

README.md
[![agentmods](https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/cocos-helper/github.svg)](https://agentmods.dev/skills/guyulong/cn-agent-skills/cocos-helper)
Your own site
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/cocos-helper"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/cocos-helper/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cocos-helper

Your own site · 80×15
<a href="https://agentmods.dev/skills/guyulong/cn-agent-skills/cocos-helper"><img src="https://agentmods.dev/badge/skills/guyulong/cn-agent-skills/cocos-helper.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 761 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00010 $0.00761
Opus 5 $0.00005 $0.00380
Sonnet 5 $0.00002 $0.00152
Haiku 4.5 $0.00001 $0.00076

Measured 12d ago against content hash 733cf91091ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

cocos-helper scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/cocos-helper/SKILL.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cocos Creator 开发助手

使用场景

辅助Cocos Creator游戏开发,提供常用组件和最佳实践。

项目结构

├── assets/
│   ├── scenes/        # 场景文件
│   ├── scripts/       # 脚本文件
│   │   ├── manager/   # 管理器
│   │   ├── ui/        # UI组件
│   │   ├── game/      # 游戏逻辑
│   │   └── utils/     # 工具函数
│   ├── prefabs/       # 预制体
│   ├── textures/      # 纹理
│   ├── audio/         # 音频
│   └── animations/    # 动画
├── settings/          # 项目设置
└── native/            # 原生平台配置

常用组件模板

单例管理器

import { _decorator, Component } from 'cc';
const { ccclass, property } = _decorator;

@ccclass('GameManager')
export class GameManager extends Component {
    private static _instance: GameManager = null;
    
    public static get instance(): GameManager {
        return this._instance;
    }
    
    onLoad() {
        if (GameManager._instance) {
            this.node.destroy();
            return;
        }
        GameManager._instance = this;
        // 不销毁节点
        // cc.game.addPersistRootNode(this.node);
    }
}

事件管理器

import { EventTarget } from 'cc';

export class EventManager {
    private static _eventTarget = new EventTarget();
    
    static on(event: string, callback: Function, target?: any) {
        this._eventTarget.on(event, callback, target);
    }
    
    static off(event: string, callback: Function, target?: any) {
        this._eventTarget.off(event, callback, target);
    }
    
    static emit(event: string, ...args: any[]) {
        this._eventTarget.emit(event, ...args);
    }
}

对象池

import { NodePool, Prefab, instantiate } from 'cc';

export class PoolManager {
    private static pools: Map<string, NodePool> = new Map();
    
    static getPool(name: string, prefab: Prefab): NodePool {
        if (!this.pools.has(name)) {
            this.pools.set(name, new NodePool(name));
        }
        return this.pools.get(name);
    }
    
    static spawn(name: string, prefab: Prefab) {
        const pool = this.getPool(name, prefab);
        if (pool.size() > 0) {
            return pool.get();
        }
        return instantiate(prefab);
    }
    
    static recycle(name: string, node: any) {
        const pool = this.pools.get(name);
        if (pool) {
            pool.put(node);
        }
    }
}

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 116 lines · 10 tokens per session scan A 733cf91091ea

Subscribe to this mod's changes

cocos-helper is a skill published in the GitHub repository guyulong/cn-agent-skills (3 stars, last pushed 3mo ago), licensed MIT. It adds 10 tokens to every session and 761 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

unreal-mcp

Automate Unreal Engine editor scenes, actors, and renders.

NousResearch/hermes-agent · 17 tokens

img2threejs

Turn an object or character reference image into a quality-gated, animation-ready procedural Three.js model built in code. Use for image-to-3D reconstruction, detail-accurate object rebuilds, stylized/likeness-maximized human characters, sculpt specs, and staged code generation.

img2threejs/img2threejs · 63 tokens

sceneview-ios

Build 3D and AR apps on Apple platforms (iOS, macOS, visionOS) with SceneViewSwift — the SwiftUI wrapper around RealityKit. Use whenever the user asks for "3D in SwiftUI", "AR with ARKit in SwiftUI", a model viewer for iOS, or any Apple-platform 3D/AR app where the dependency is the SceneViewSwift Swift Package from…

sceneview/sceneview · 148 tokens

sceneview

Build 3D and AR apps with the SceneView SDK in Jetpack Compose, SwiftUI (iOS/macOS/visionOS via SceneViewSwift), Web (Filament.js), Flutter and React Native. Use whenever the user asks for "3D in Compose", "AR with ARCore in Compose", a model viewer, or any cross-platform 3D/AR app where the dependency is…

sceneview/sceneview · 156 tokens

sceneview-web

Build 3D and WebXR (AR/VR) experiences in the browser with SceneView for Web — Filament.js (WebGL2/WASM) wrapped in a Kotlin/JS DSL and a plain-JavaScript API on window.sceneview. Use whenever the user asks for "3D in the browser", "a web model viewer", "WebXR AR/VR", or any browser 3D/AR app where the dependency is…

sceneview/sceneview · 147 tokens

ai-game-world-design

Complete mastery guide for designing and building AI-powered game worlds — procedural world generation, NPC behavior trees, LLM-driven dialogue systems, emergent storytelling, economy simulation, player modeling, and real-time difficulty adaptation. Covers the full stack from world-building fundamentals to integrating…

nirholas/three.ws · 88 tokens