cc-3-8-x-mcp: Instructions file for Codex

AGENTS.md

cc-3-8-x-mcp AGENTS.md is an instructions file for Codex, OpenCode from HappyLifeOk/cc-3-8-x-mcp. It costs 1,566 tokens per session, scanned A, original, Apache-2.0.

Instructions for an add-on that lets coding agents work with Cocos Creator 3.8.x, a game-development editor. It defines approved ways to inspect and modify scenes, assets, prefabs, animations, and previews.

In plain words
What is it for?
They are for editing Cocos projects, checking assets and scenes, previewing games, changing prefab or animation files, and verifying the result in a browser.
Why use it?
They ensure the agent connects to the correct open Cocos project and does not expose or bypass the add-on's private authentication details.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is HappyLifeOk/cc-3-8-x-mcp's own configuration. It tells Codex and OpenCode how to work on cc-3-8-x-mcp itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything cc-3-8-x-mcp configures →

Reuse

Borrowing it

Nothing to install: this file belongs to HappyLifeOk/cc-3-8-x-mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/HappyLifeOk/cc-3-8-x-mcp/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/HappyLifeOk/cc-3-8-x-mcp

Made for: Codex, OpenCode.

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 cc-3-8-x-mcp AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/happylifeok/cc-3-8-x-mcp/agents-md/github.svg)](https://agentmods.dev/instructions/happylifeok/cc-3-8-x-mcp/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/happylifeok/cc-3-8-x-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/happylifeok/cc-3-8-x-mcp/agents-md/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 cc-3-8-x-mcp AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/happylifeok/cc-3-8-x-mcp/agents-md"><img src="https://agentmods.dev/badge/instructions/happylifeok/cc-3-8-x-mcp/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,566 This file is loaded in full into every session.
When invoked 1,566 The same file — it is already loaded in full.
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.01566 $0.01566
Opus 5 $0.00783 $0.00783
Sonnet 5 $0.00313 $0.00313
Haiku 4.5 $0.00157 $0.00157

Measured yesterday against content hash dd754eed5f5b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

cc-3-8-x-mcp AGENTS.md 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 yesterday.

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.

AGENTS.md · 159 lines

How it starts

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

AGENTS.md

本文是 cc-3-8-x-mcp 的 agent 使用规则。它只支持 Cocos Creator 3.8.x;项目自己的预览参数、业务本地服地址、测试账号和验证步骤写在项目文档里。

允许入口

使用本插件时,只允许从下面这些入口进入:

入口 用途
全局 cocos-mcp-gateway 注入的项目 tool scene / asset-db / preview / local 域操作
cocos-mcp-cli offline 命令 .prefab / .anim 文件查询和修改
Playwright / Chrome 浏览器里真实游戏页面的交互验证
temp/refreshrestart-package 重启本扩展代码

项目扩展的 /bridge 是 Gateway 私有协议,agent 和其他 MCP 客户端不得直接调用、不得直接读取或复制注册记录中的 token。其它入口不作为本插件使用路径。

绑定当前项目

同机可能同时打开多个 Cocos 项目。agent 必须先按项目根目录绑定 MCP 实例,再执行后续操作。

实例注册文件:

~/.cocos-mcp/editors/*.json

绑定规则:

  1. 扫描 ~/.cocos-mcp/editors/*.json
  2. 只保留 projectPath 与当前项目根目录一致的记录。
  3. 校验 pid 仍存活。
  4. 多个匹配时取 updatedAt 最新的记录。
  5. 只接受 transport=editor-bridgegatewayApiVersion>=2bridgeApiVersion=1 的记录。
  6. 后续操作只调用 Gateway 暴露的 <project>__<tool>,不直接请求记录中的 /bridge URL。
  7. 缺失或格式不正确的 authToken 视为无效注册记录;token 不写日志、不贴到回复里。

快速确认脚本:

python3 - <<'PY'
import glob
import json
import os
from pathlib import Path

def find_project_root(start):
    cur = Path(start).resolve()
    for item in [cur, *cur.parents]:
        if (item / 'assets').is_dir() and (item / 'settings').is_dir() and (item / 'extensions').is_dir():
            return str(item)
    return str(cur)

PROJECT = os.environ.get('PROJECT_ROOT') or find_project_root(os.getcwd())
items = []

for path in glob.glob(os.path.expanduser('~/.cocos-mcp/editors/*.json')):
    try:
        with open(path, 'r', encoding='utf-8') as f:
            data = json.load(f)
        if os.path.realpath(data.get('projectPath', '')) != os.path.realpath(PROJECT):
            continue
        if data.get('transport') != 'editor-bridge':
            continue
        if data.get('gatewayApiVersion', 0) < 2 or data.get('bridgeApiVersion') != 1:
            continue
        os.kill(int(data['pid']), 0)
        items.append((data.get('updatedAt', ''), path, data))
    except Exception:
        pass

for _, path, data in sorted(items)[-3:]:
    print(path, data.get('url'), data.get('previewUrl') or '')
PY

Read the full file on GitHub · 159 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. yesterday Changed dd754eed5f5b
  2. 11d ago First seen · 159 lines · 1,566 tokens per session scan A 93b964f0e368

Subscribe to this mod's changes

cc-3-8-x-mcp AGENTS.md is an instructions file published in the GitHub repository HappyLifeOk/cc-3-8-x-mcp (130 stars, last pushed yesterday), licensed Apache-2.0. It adds 1,566 tokens to every session, about $0.0078 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-30.

Related

Other instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens