cf-oop-gen
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "cf-oop-gen" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ebeb123a11faa93a68f690e087579c52aab9409bab115c67a337edb75e4c20fa. Verify the upstream source and version against https://skillhub.cn/skills/user_9ad9c473/cf-oop-gen before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
An object-oriented thinking analysis and file-mapping skill from COFFEE; it first uses OOP, SOLID, and design patterns to define objects, responsibilities, relationships, states, and class structures, then verifies module dependencies, UUID references, and breakpoints via TypeScript/Cocos file maps. If a user asks “cf-oop-gen how to use”, “usage instructions”, “manual”, “teach me to use”, or “how to install”, it should directly return the usage instructions for the current AI platform.
Introduction source: third_party · user_9ad9c473 · 1.0.7 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Inputs and outputs
- Translation pending; see source documentation.
- Software, accounts and paid services
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: cf-oop-gen
description: COFFEE 出品的面向对象思维分析与文件图谱技能;先用 OOP、SOLID 和设计模式完成对象、职责、关系、状态及类结构设计,再通过 TypeScript/Cocos 文件图谱验证模块依赖、UUID 引用和断裂点;当用户询问 cf-oop-gen 怎么用、使用说明、说明书、教我用或如何安装时,直接返回当前 AI 平台对应的使用说明。
version: 1.0.7
author: COFFEE
license: Proprietary
trigger:
- "帮我做面向对象分析"
- "设计类和职责"
- "分析对象关系和状态"
- "用 SOLID 或设计模式设计功能"
- "生成或扫描文件图谱"
- "cf-oop-gen 怎么用"
- "cf-oop-gen 使用说明"
- "cf-oop-gen 说明书"
- "教我用 cf-oop-gen"
- "如何使用 cf-oop-gen"
- "cf-oop-gen 安装"
- "cf-oop-gen 快速开始"
- "cf-oop-gen help"
metadata:
slug: cf-oop-gen
displayName: CF-OOP-GEN 面向对象思维与文件图谱
summary: 用面向对象思维设计代码结构,并通过文件图谱验证依赖和断裂点。
category: dev-programming
tags: OOP, SOLID, 设计模式, Cocos Creator, TypeScript, 文件图谱
platforms: windowsCF-OOP-GEN 面向对象思维与文件图谱
本技能的主体是面向对象思维分析,文件图谱是实现后的辅助验证工具。不得把图谱扫描代替对象建模,也不得在没有代码项目时强制运行图谱。
完整功能没有试用期限、功能锁定、设备绑定、激活或联网授权。发布包不包含二进制可执行文件。
独立使用、平台接入、结果验收和使用边界统一见 usage-guide.md。首次安装或排查环境时先读取 quickstart.md,遇到异常时读取 faq.md。WorkBuddy 章节仅定义兼容接入边界,不代表原生 Skill 认证。各平台使用自然语言或平台技能入口调用 cf-oop-gen,不要使用 Codex 专用的 [$cf-oop-gen](...) 引用格式。
使用说明书直答
当用户询问“cf-oop-gen 怎么用”“使用说明”“说明书”“教我用”“如何安装”“快速开始”或含义相同的问题时,直接读取并回答 usage-guide.md 中当前宿主 AI 对应的平台章节,不进入 OOP 分析、不运行图谱、不修改项目;排错信息不足时补读 faq.md。
核心工作流
处理设计或开发任务时,按以下顺序进行:
- 明确需求目标、业务边界、输入输出和不包含的内容。
- 从领域名词、行为和状态中识别候选对象。
- 为每个对象分配单一职责,避免上帝类和职责重复。
- 明确对象之间的组合、依赖、协作、继承或实现关系,优先组合而非深继承。
- 梳理关键状态、生命周期、事件和状态转换。
- 设计必要的类、接口、抽象、公开方法和依赖方向。
- 用 SOLID 原则检查职责、扩展性、替换性、接口粒度和依赖方向。
- 只在确有变化点时选择设计模式,不为使用模式而制造抽象。
- 输出可落地的类结构、文件计划、调用关系和验证标准。
- 项目存在代码时,再运行文件图谱验证模块依赖、调用链、UUID 引用和删除断裂点。
思维资料路由
- 每次 OOP 设计先参考
references/oop.md和references/solid.md。 - 对象创建复杂时参考
references/patterns-creational.md。 - 需要适配、包装、组合或统一入口时参考
references/patterns-structural.md。 - 涉及状态、事件、策略、命令或系统协调时参考
references/patterns-behavioral.md。 - 需要测试策略或验收标准时参考
references/testing.md。 - 涉及错误恢复、断言或日志设计时参考
references/exception-logging.md。
只读取当前任务需要的资料,不机械套用全部模式。
OOP 输出结构
分析结果至少包含:
- 需求边界与关键假设。
- 对象清单及每个对象的职责。
- 对象关系和依赖方向。
- 状态、生命周期或事件流。
- 类、接口、公开方法及关键数据结构。
- SOLID 与模式选择理由,包括未采用方案的取舍。
- 文件落地计划与可验证的完成标准。
- 已有项目需要时附图谱扫描和断裂定位结果。
文件图谱环境
- Windows 10/11 x64。
- Python 3.10 或更高版本。
- Node.js 与 TypeScript Compiler API 用于高精度 AST 分析;不可用时使用内置回退分析。
- 已验证 Cocos Creator 2.4.8,以及 3.1.2、3.2.1、3.3.2、3.4.2、3.5.2、3.6.3、3.7.4、3.8.0、3.8.6、3.8.7。
- 不得自动安装缺失环境,应先告知用户并由用户决定。
文件图谱命令
python scripts/graph.py preflight <project>
python scripts/graph.py generate <project> [--slice <version>]
python scripts/graph.py scan <project> [--json]
python scripts/graph.py locate <project> [--index <n>] [--json]
python scripts/graph.py watch <project> [--interval <seconds>] [--slice <version>]
首次执行 generate、scan 或 locate 时,会为该项目自动启动一个后台 watch 进程;状态记录在 <项目目录>/.cf/cf-oop-gen-watch.json,已有有效监听时不会重复启动。设置 CF_OOP_GEN_NO_WATCH=1 可关闭自动启动。
图谱数据输出到 <项目目录>/.cf/feature-graph.json 和 <项目目录>/.cf/cf-map-data.js,可视化页面输出到 <项目目录>/cf-map.html。查看图谱时打开项目根目录中的页面,不直接打开 Skill 安装目录中的模板。
图谱包含 schema、模块、入口、关键词、slice、调用信息、UUID 注册表和 COFFEE 发布者标记。缺少 TypeScript Compiler API 时仍可生成和扫描,但复杂别名、泛型及动态调用链可能只能得到回退分析结果,不能把未解析内容表述为确定关系。
使用许可
Copyright (c) 2026 COFFEE。允许永久、无时间限制地用于个人、教育、企业内部及商业项目分析;禁止转售、再分发、提取实现或移除 COFFEE 品牌与图谱水印。软件按现状提供,不附带任何形式的保证。
Current listing version
1.0.7
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 面向开发者提供面向对象分析与文件图谱验证能力,解决代码结构设计、依赖验证等明确痛点
- 功能闭环完整,涵盖从 OOP 设计到图谱验证的全流程
Highlights
- 触发词覆盖 OOP 分析、设计模式、文件图谱等核心功能,边界清晰
- 包含使用说明相关触发词,变体覆盖合理
Areas to improve
-
缺少 When to Use 显式章节 Reported severity: Minor
文档未设置独立的 When to Use 章节,但核心工作流已涵盖使用场景
Recommendation: 建议增加显式的 When to Use 章节以提升可读性
Highlights
- 文档结构清晰,包含使用说明书直答、核心工作流、思维资料路由等完整章节
- frontmatter 完整,有端到端命令示例
Highlights
- 工具来源明确(Python/Node.js/TypeScript),参数正确
- 覆盖主要异常处理,不可逆操作有确认机制和状态记录
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Translation pending; see source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.