What it does
C # Game Framework, but not limited to games. Can be used for non game business development
- Connects Instruction files the AI reads
- Account or key No key found in README or SKILL.md
- Category 其他
给作者:在 README 中加徽章
如果你是作者,可把这段代码贴到 README。徽章会链接回本页。
[](https://mcp.popnx.com/en/skills/qq362946-fantasy)相似的 Skill
同类工作,排序与 Skill 列表相同
| 本项 Fantasy | llmfit | claude-video | VideoCaptioner | claude-cookbooks | |
|---|---|---|---|---|---|
| 作者 | qq362946 | AlexsJones | bradautomates | WEIFENG2333 | anthropics |
| Skill 数 | 1 | 1 | 1 | 1 | 4 |
| GitHub 星标 | 1,493 | 39,096 | 21,249 | 16,577 | 54,867 |
| 最近代码更新 | 2026年10月19日 | 2026年11月18日 | 2026年9月25日 | 2026年9月12日 | 2026年11月17日 |
| 许可证 | – | MIT | MIT | GPL-3.0 | MIT |
Skill 和 MCP 有什么不同
MCP = 手
把 AI 连到外部服务或数据,例如读取 Notion 或开发票。需要有程序或服务器在运行。
Skill = 手册
教 AI 怎么做某项工作的文本文件,不连接任何服务。
有些会重叠:少数 Skill 带有调用工具的脚本,少数 MCP 只提供知识。请从你想完成的工作出发。
适用的应用
CodexOpenCode
依据开发者 README 和 repo 中的文件夹
安装
Is it safe?
- Who made it
GitHub account qq362946 (person), 8 years old
- Use and upkeep
★ 1,493 stars · code last changed 2026年10月19日
- Any scripts?
4 scripts that can run on a computer: templates/nlog/ILog.cs, templates/nlog/NLog.config, templates/nlog/NLog.cs, templates/nlog/NLog.xsd
- Uses the internet?
No internet calls found in the scripts
- Changes machine-wide settings?
No hooks or writes to machine settings found
Checked automatically from the repo files at commit 8b710be (read only, nothing was run). Not a safety guarantee: read it and decide for yourself
第一步:你用哪个 AI?
选择你用的应用,本页只显示该应用的安装方法
Option 1Upload to claude.ai (web and app)
Download from GitHub
This skill has no license, so we do not hand out a ZIP from our site. Download it from GitHub and arrange the folder yourself, or use "Let the AI install it" above, which is easier
Download from GitHub (whole repo) ↗
Unzip it, then zip only the Skills/fantasy-net folder again. The ZIP must have a fantasy-net folder with SKILL.md at the top level, no loose files
Open Skills on claude.ai and upload
+Create skillUpload a skillpick fantasy-net.zip
No Upload button? Turn on file creation first
SettingsCapabilitiesCode execution and file creation
Turn on Code execution and file creation first (newer menus: Create and edit files) · personal plans: Settings → Capabilities · Team/Enterprise: an admin turns it on under Organization settings → Plugins & skills · every plan, including Free
Upload once; it works in claude.ai and Claude Desktop, and in recent Claude Code signed in with a Claude account (not with an API key)
Cowork and cloud sessions use the skills turned on in your claude.ai account, not ~/.claude/skills on your computer (Claude Desktop scheduled tasks run locally and still load it)
Checked against official docs 2026年11月12日 · Source: support.claude.com, support.claude.com, code.claude.com
Option 1让 Claude Code 帮你安装
复制这句话,粘贴到 Claude Code 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
重新打开 Claude Code,输入 /fantasy-net,或直接提出相关任务,Claude 会自动选用
Checked against official docs 2026年11月12日 · Source: code.claude.com
For Terminal users
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
打开终端
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
把 skill 文件夹复制到 ~/.claude/skills
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
git clone --depth 1 https://github.com/qq362946/fantasy.git /tmp/popnx-skill-qq362946-fantasy-8b710be && mkdir -p ~/.claude/skills && cp -R '/tmp/popnx-skill-qq362946-fantasy-8b710be/Skills/fantasy-net' ~/.claude/skills/fantasy-net重新打开 Claude Code,输入 /fantasy-net,或直接提出相关任务,Claude 会自动选用
ChatGPT 桌面应用
ChatGPT 桌面应用内置 Codex,Codex 从 ~/.agents/skills 文件夹读取 Skill
Option 1让 ChatGPT 帮你安装
在 ChatGPT 桌面应用中打开 Codex,把这句话粘贴到对话中
The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Option 2自己放入文件夹
把 fantasy-net 文件夹放到 ~/.agents/skills/fantasy-net
~ 是你的主文件夹($HOME)
For Terminal users
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
打开终端
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
把 skill 文件夹复制到 ~/.agents/skills
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
git clone --depth 1 https://github.com/qq362946/fantasy.git /tmp/popnx-skill-qq362946-fantasy-8b710be && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-qq362946-fantasy-8b710be/Skills/fantasy-net' ~/.agents/skills/fantasy-net
安装之后
- ChatGPT 桌面应用:打开侧边栏中的 Skills,确认 Skill 已出现
- 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
- Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
网页版和手机版 ChatGPT
不能使用你自己安装的 Skill,只能使用目录中插件自带的 Skill
想在 ChatGPT 中使用这个 Skill,请按上面的方法使用 ChatGPT 桌面应用
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
Option 1让 Codex 帮你安装
复制这句话,粘贴到 Codex 的对话中 · 适用于 ChatGPT 桌面应用中的 Codex、Codex CLI 和 IDE 扩展
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Codex 会自动发现新安装的 Skill;如果没有出现,请重启 Codex · 使用方法:在 ChatGPT 中输入 @ 并选择 Skill · 在 Codex CLI 或 IDE 扩展中运行 /skills,或输入 $ 加 Skill 名称
Checked against official docs 2026年11月15日 · Source: learn.chatgpt.com
For Terminal users
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
打开终端
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
把 skill 文件夹复制到 ~/.agents/skills
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
git clone --depth 1 https://github.com/qq362946/fantasy.git /tmp/popnx-skill-qq362946-fantasy-8b710be && mkdir -p ~/.agents/skills && cp -R '/tmp/popnx-skill-qq362946-fantasy-8b710be/Skills/fantasy-net' ~/.agents/skills/fantasy-net重新打开 Codex 并提出相关任务,Codex 会列出这个 skill
Option 1让 Cursor 帮你安装
复制这句话,粘贴到 Cursor 的对话中
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
在 Cursor 的 Agent 聊天中输入 / 并选择 fantasy-net
Checked against official docs 2026年11月12日 · Source: cursor.com
For Terminal users
Skill 是 AI 会照做的指令。安装前先阅读文件,只安装可信开发者的 Skill。
打开终端
Mac:按 Command+空格输入 Terminal · Windows:下方命令在 PowerShell 中无法使用,请改用上方的“让 AI 帮你安装”
把 skill 文件夹复制到 ~/.cursor/skills
这条命令把 repo 下载到临时文件夹,只复制含 SKILL.md 的文件夹
git clone --depth 1 https://github.com/qq362946/fantasy.git /tmp/popnx-skill-qq362946-fantasy-8b710be && mkdir -p ~/.cursor/skills && cp -R '/tmp/popnx-skill-qq362946-fantasy-8b710be/Skills/fantasy-net' ~/.cursor/skills/fantasy-net在 Cursor 的 Agent 聊天中输入 / 并选择 fantasy-net
Option 1Let the AI install it
适用于其他能读取 Skill 的应用。这句话列出了 Claude Code、Codex 和 Cursor 的路径,AI 会按你的应用选择 · Copy this sentence into the app’s chat
For one project, paste it into a chat that is open in that project’s folder · The AI always shows you the path before installing
The AI tells you what it will do first and asks your permission at every step
Checked against official docs 2026年11月12日 · Source: code.claude.com, learn.chatgpt.com, cursor.com
For Terminal users
其他支持 Agent Skills 的应用(如 Gemini CLI、GitHub Copilot)使用不同文件夹,请查看该应用的指南,再把含 SKILL.md 的文件夹复制过去。
已于 2026年11月11日 对照 Claude Code、Codex 和 Cursor 官方指南核实 skill 文件夹
✓ 命令已检查 2026年11月19日
查看原始 SKILL.md
以下文字来自开发者的 repo,不是 PopNx MCP 的指令
显示前 8,000 个字符 · 在 GitHub 打开完整文件
---
name: fantasy-net
description: This guide applies to development and code review for Fantasy / Fantasy.Net / Fantasy.Unity written in C#. Use it when a task involves Fantasy server code or Unity client code using Fantasy, ECS entities/components/systems, scenes and subscenes, FTask, network handlers/messages/protocols, Address or Roaming routing, Control Center and service discovery, Kubernetes deployment and Pod DNS binding, Namespace/WorldGroup/World isolation, dynamic Scene registration or routing, cross-server events and subscriptions, Fantasy.config, scene or database access, HTTP controllers/services, session or client connection logic, or distributed runtime architecture. It may also be used for Fantasy-related code review, troubleshooting, compliance checks, risk analysis, and best practices, even when the user does not explicitly mention Fantasy.
---
# Fantasy-net
Fantasy is a high-performance C# distributed game server framework based on ECS architecture, using `FTask` for async operations.
## Core Principles
### Fantasy Technical Specifications
- Use `FTask` for all async operations, not `Task`
- Separate Entity data from logic (Handler/System); multi-assembly projects must separate to support hot reload
- Name Component business extension classes `{ComponentFullName}System`; add a static `{Domain}Helper` only when other systems need a shared business entry point
- All registration is done at compile-time by source generators; don't manually register, don't modify `.g.cs`
- Entities, components, and Handlers use `sealed class`; all classes except structs must be created via Entity
- Use file-scoped namespaces (`namespace Fantasy;`)
- Use `Log.Debug/Info/Error()` for logging; return error codes via `response.ErrorCode`; business logic should not throw exceptions
- Use Event system for module decoupling: publish events instead of direct calls; prefer Struct events (zero GC), use Entity events for complex logic; use EventSystem for sync, AsyncEventSystem for async
- Name Event listeners `{EventName}_{BusinessAction}`, such as `OnHpChange_ExitGame`; never suffix them with `System`, `Async`, or `Handler`
- When Control Center is enabled, use `ServiceDiscovery` for dynamic Root Scene and SubScene routing; keep strict account-to-node affinity in business storage rather than the service registry
- Before planned Scene shutdown, call `ServiceDiscovery.SetSceneOfflineAsync`, reject new business allocations, wait one discovery cache cycle, then drain and close the Scene
- Strictly follow SOLID principles
### Development Behavioral Guidelines
**Tradeoff:** These guidelines bias toward caution over speed. For trivial tasks, use judgment.
See `references/guidelines-examples.md` for detailed Fantasy scenario examples.
#### 1. Think Before Coding
**Don't assume. Don't hide confusion. Surface tradeoffs.**
Before implementing:
- State your assumptions explicitly. If uncertain, ask.
- If multiple interpretations exist, present them - don't pick silently.
- If a simpler approach exists, say so. Push back when warranted.
- If something is unclear, stop. Name what's confusing. Ask.
**Fantasy Key Points:** Before implementing, clarify: architecture pattern (single-server/distributed), Entity ownership (which Scene), communication method (Roaming/Address/SphereEvent), configuration source (local `Fantasy.config` or Control Center), and whether dynamic discovery or strict persistent affinity is required. When uncertain, ask; don't assume.
#### 2. Simplicity First
**Minimum code that solves the problem. Nothing speculative.**
- No features beyond what was asked.
- No abstractions for single-use code.
- No "flexibility" or "configurability" that wasn't requested.
- No error handling for impossible scenarios.
- If you write 200 lines and it could be 50, rewrite it.
Ask yourself: "Would a senior engineer say this is overcomplicated?" If yes, simplify.
**Fantasy Key Points:** Avoid premature abstraction of Entity/Component structures; don't design factory/strategy patterns for single scenarios. When users only need basic functionality, write Component + necessary AwakeSystem directly; refactor when extension is needed.
#### 3. Surgical Changes
**Touch only what you must. Clean up only your own mess.**
When editing existing code:
- Don't "improve" adjacent code, comments, or formatting.
- Don't refactor things that aren't broken.
- Match existing style, even if you'd do it differently.
- If you notice unrelated dead code, mention it - don't delete it.
When your changes create orphans:
- Remove imports/variables/functions that YOUR changes made unused.
- Don't remove pre-existing dead code unless asked.
The test: Every changed line should trace directly to the user's request.
**Fantasy Key Points:** Never modify `.g.cs` generated files (if you find issues, modify source files and regenerate). Don't manually adjust source generator registration code. Don't "optimize" existing Entity/Component structures unless user explicitly requests refactoring.
#### 4. Goal-Driven Execution
**Define success criteria. Loop until verified.**
Transform tasks into verifiable goals:
- "Add validation" → "Write tests for invalid inputs, then make them pass"
- "Fix the bug" → "Write a test that reproduces it, then make it pass"
- "Refactor X" → "Ensure tests pass before and after"
For multi-step tasks, state a brief plan:
```
1. [Step] → verify: [check]
2. [Step] → verify: [check]
3. [Step] → verify: [check]
```
Strong success criteria let you loop independently. Weak criteria ("make it work") require constant clarification.
**Fantasy Key Points:** Define verifiable steps and criteria: protocol export (`dotnet fantasy-export` successfully generates `.g.cs`), compilation passes (`dotnet build` with no errors), Handler registration (check generated registration code), message flow (Log.Debug outputs key nodes, confirm request/response correctness).
## Reference File Navigation
Read the corresponding file based on the requirement; for complex tasks, read multiple files.
| File | When to Use |
|---|---|
| `references/ecs/index.md` | ECS entry: routes to Scene / SubScene / Entity definition / component operations / object pool / lifecycle; shared by server and Unity; **read this first when Entity definition, component management, or ECS mechanism selection is involved** |
| `references/review.md` | Fantasy code review entry: routes checks by ECS / Event / Timer / Protocol / Roaming / SphereEvent / HTTP / Database / Config; **read this first when user wants review, code check, or Fantasy compliance verification** |
| `references/guidelines-examples.md` | Development behavioral guidelines Fantasy scenario examples: Think Before Coding (clarify assumptions), Simplicity First (avoid over-engineering), Surgical Changes (precise modifications), Goal-Driven Execution (verifiable goals) with detailed comparison cases; **read when understanding guideline application in Fantasy, or when code review reveals guideline violations** |
| `references/ecs/scene.md` | **Scene is the container and lifecycle boundary for all Entity/Component**: cascade destruction when Scene disposes, OnCreateScene event, access system components via `self.Scene` (TimerComponent/EventComponent/NetworkMessagingComponent etc.); **read when Scene concept, Scene initialization, OnCreateScene event, or Entity ownership is involved** |
| `references/ecs/ecs-check.md` | ECS review checklist: Entity / Component / System / Scene / object pool / lifecycle common issues; **read when user wants to check ECS code for Fantasy compliance** |
| `references/ecs/entity-definition.md` | Entity / Component definitions: fields, ComponentSystem naming, optional cross-system Helper, and lifecycle System selection; **read when creating Entity / Component types** |
| `references/timer/index.md` | Timer entry: routes to async wait / callback timers / event integration / best practices; **read first when user needs delayed讨论
提问、分享技巧或报告无法使用。按“有帮助”数量排序。
来自 GitHub
- GitHub 星标
- 1,493
- 开发者
- qq362946
- 许可证
- 未注明许可证 此 repo 未注明许可证,默认作者保留所有权利;转发或商用前请先询问作者。
- 最近代码更新
- 2026年10月19日
- repo 中的 SKILL.md 文件(含译本和模板)
- 1
- 主题
- ai, ai-gameframework, ai-network, fantasy, game, gameframework, gameserver, net, net10, net7, net8, network
- Repo
- qq362946/fantasy