agentleFS
ChefDavid0815ChefDavid0815/gpt-craft-system/skills/craft-engineering/SKILL.md

craft-engineering

Skill0 starsChanged 2 months agoMITView on GitHub

Implement or repair nontrivial code with explicit state, data and lifecycle boundaries. Covers async races, persistence, integration and root-cause debugging.

The file

Files
SKILL.md

可靠实现

保持仓库技术栈与格式。先阅读实际调用者、接口及依赖版本;不要凭一个文件名推断整个架构。代码服务于当前问题,既不堆在一个巨型组件,也不为未出现的复用建立十层抽象。

实现约束

  1. 边界清楚:视图负责展示与事件,业务层负责规则,适配层负责 IO。小项目可在少量文件中表达,不强制目录模板。
  2. 命名表达领域和单位,例如 durationMs、selectedProjectId;不用无含义的 data2 或不准确的 isLoading 表示所有异步情况。
  3. 用户输入、网络、磁盘和 IPC 在边界验证。静态类型不能证明运行时数据有效。错误包含可处理的类别与上下文,用户提示可执行,不暴露凭据。
  4. 持久化状态以成功提交为准;乐观更新有回滚或冲突协调。读取竞争通常只让最新意图更新视图,写操作则按实际语义串行、版本检查或幂等,不能套用简单“忽略旧响应”掩盖已发生的写入。
  5. 资源创建与清理成对:订阅、计时器、请求、监听、Worker、GPU 资源、文件句柄。React effect 可重复安装/清理,不靠全局“只运行一次”掩盖泄漏。
  6. 性能按测量瓶颈优化;先查等待瀑布、载荷和昂贵重算,再做小范围缓存。缓存必须有作用域、失效和容量;不可把跨用户请求数据存进共享全局变量。
  7. 注释解释原因、不变量和兼容边界;避免逐行翻译代码。删除本次废弃代码与调试输出,不清理用户无关文件。

按问题读取

  • 架构、类型、React、API/数据库、文件、Agent 集成:implementation.md。
  • 故障、测试失败、回归、卡住:debugging.md。
  • 搜索、预览等只读异步竞争:可复用 latest-task.mjs,先读文件头的适用边界;配套测试只证明其中列出的行为。

需要最新框架/API 时核对仓库版本与官方资料;当前宿主已有 React/Next/AI SDK 等专用技能时按需调用。不要把某套示例导入方式当所有版本的规范。

结束前完成适当的类型/构建/回归检查。证据标准见 craft-verification;发现既有失败记录其基线,不把本次新增失败称为历史问题。

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.