Chinese Chess Game Assistant
Overview
This skill directs you to use pre-built source code for two distinct Chinese chess scenarios:
generating a new game, or improving an existing one for better user experience.
When to Use
Generate a new game — user says things like:
- - "create a Chinese chess game"
- "build me a Chinese chess app"
- "make a xiangqi game"
→ Use source code from INLINECODE0
Improve the game — user says things like:
- - "improve the chess game"
- "better UI/UX for the chess"
- "enhance the game experience"
- "make the game feel better"
→ Use source code from INLINECODE1
Workflow
Step 1: Identify the intent
| User intent | Source to use |
|---|
| Generate / create / build a new game | INLINECODE2 |
| Improve / enhance / better experience |
/Users/root009/projects/demos/g2/game2 |
Step 2: Read the source directory
Read all files in the appropriate directory before doing anything else:
CODEBLOCK0
Use Glob to list files, then Read to read each one.
Step 3: Apply the source
- - Use the source code directly — do not rewrite from scratch.
- Copy structure, logic, and patterns from the directory.
- Only adapt what is strictly necessary for the user's context (target directory, filenames, etc.).
Step 4: Confirm with user
After applying the source, briefly tell the user:
- - Which source was used (
/Users/root009/projects/demos/g1/game2 or /Users/root009/projects/demos/g2/game2) - What files were created or modified
- Any next steps they should know
Common Mistakes
| Mistake | Fix |
|---|
| Writing a Chinese chess game from scratch | Always use /Users/root009/projects/demos/g1/game2/ or /Users/root009/projects/demos/g2/game2/ source first |
Using /Users/root009/projects/demos/g1/game2/ for a new game |
/Users/root009/projects/demos/g2/game2 is for improvements only |
| Using
/Users/root009/projects/demos/g2/game2 for improvements |
/Users/root009/projects/demos/g1/game2 is for new game generation only |
| Skipping reading source files | Always read the source before applying |
中国象棋游戏助手
概述
本技能指导您使用预构建的源代码处理两种不同的中国象棋场景:生成新游戏,或改进现有游戏以提升用户体验。
使用时机
生成新游戏 — 用户说出类似以下内容:
- - 创建一个中国象棋游戏
- 帮我做一个中国象棋应用
- 制作一个象棋游戏
→ 使用来自 /Users/root009/projects/demos/g1/game2 的源代码
改进游戏 — 用户说出类似以下内容:
- - 改进象棋游戏
- 优化象棋的界面/用户体验
- 增强游戏体验
- 让游戏感觉更好
→ 使用来自 /Users/root009/projects/demos/g2/game2 的源代码
工作流程
第一步:识别意图
| 用户意图 | 使用的源代码 |
|---|
| 生成/创建/构建新游戏 | /Users/root009/projects/demos/g1/game2 |
| 改进/增强/优化体验 |
/Users/root009/projects/demos/g2/game2 |
第二步:读取源代码目录
在执行任何其他操作之前,先读取相应目录中的所有文件:
对于生成新游戏
读取 /Users/root009/projects/demos/g1/game2 下的所有文件
对于游戏改进
读取 /Users/root009/projects/demos/g2/game2 下的所有文件
使用 Glob 列出文件,然后使用 Read 读取每个文件。
第三步:应用源代码
- - 直接使用源代码 — 不要从头重写。
- 复制目录中的结构、逻辑和模式。
- 仅根据用户上下文(目标目录、文件名等)进行必要的调整。
第四步:与用户确认
应用源代码后,简要告知用户:
- - 使用了哪个源代码(/Users/root009/projects/demos/g1/game2 或 /Users/root009/projects/demos/g2/game2)
- 创建或修改了哪些文件
- 他们应该知道的任何后续步骤
常见错误
| 错误 | 修正 |
|---|
| 从头编写中国象棋游戏 | 始终先使用 /Users/root009/projects/demos/g1/game2/ 或 /Users/root009/projects/demos/g2/game2/ 的源代码 |
| 为新游戏使用 /Users/root009/projects/demos/g1/game2/ |
/Users/root009/projects/demos/g2/game2 仅用于改进 |
| 为改进使用 /Users/root009/projects/demos/g2/game2 | /Users/root009/projects/demos/g1/game2 仅用于生成新游戏 |
| 跳过读取源文件 | 在应用之前始终先读取源代码 |