openeditor-project-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpenEditor Project Setup
OpenEditor 项目配置
Quick Start
快速开始
Use this skill to onboard an arbitrary repo into OpenEditor. The output is usually:
.logic-editor.json- for iOS or SwiftUI repos
oe-swift.json - a short explanation of what was inferred vs. what still needs confirmation
When the repo signals are sufficient, generate the file contents directly.
Do not ask the user for the or schema when the references in this skill already cover it.
.logic-editor.jsonoe-swift.jsonRead only the references you need:
- Always read references/project-config.md
- Read references/project-detection.md when inferring framework, port, or run command
- Read references/ios-config.md only for iOS or SwiftUI projects
使用此技能将任意代码仓库接入OpenEditor。输出内容通常包括:
.logic-editor.json- 针对iOS或SwiftUI仓库的
oe-swift.json - 一份简短说明,解释已推断的内容和仍需确认的内容
当仓库提供的信号足够时,直接生成文件内容。
当本技能中的参考资料已涵盖相关内容时,不要向用户询问或的 schema。
.logic-editor.jsonoe-swift.json仅阅读你需要的参考资料:
- 务必阅读references/project-config.md
- 推断框架、端口或运行命令时,阅读references/project-detection.md
- 仅针对iOS或SwiftUI项目阅读references/ios-config.md
Workflow
工作流程
1. Inspect the repo first
1. 先检查代码仓库
Look for the smallest high-signal set of inputs:
package.json- lockfiles such as ,
bun.lockb,bun.lock, orpackage-lock.jsonpnpm-lock.yaml - framework folders such as ,
app/,pages/,src/,templates/layout/ - iOS signals such as ,
*.xcodeproj, and*.xcworkspace*.swift - any existing or
.logic-editor.jsonoe-swift.json
Do not invent support for frameworks that the references do not cover.
寻找最少量的高信号输入:
package.json- 锁文件,如、
bun.lockb、bun.lock或package-lock.jsonpnpm-lock.yaml - 框架文件夹,如、
app/、pages/、src/、templates/layout/ - iOS相关信号,如、
*.xcodeproj和*.xcworkspace*.swift - 任何已存在的或
.logic-editor.jsonoe-swift.json
不要为参考资料未涵盖的框架添加支持。
2. Infer the project type conservatively
2. 保守地推断项目类型
Prefer the real parser defaults from the references over generic assumptions.
- -> port
next, run command3000ornpm run devwhen Bun lockfiles are presentbun dev - -> port
astro4321 - -> port
expo, run command8081npx expo start - -> port
react-native, run command8081ornpm startbun start - Vite React -> port
5173 - Shopify theme -> port , run command
9292shopify theme dev - iOS -> port , empty
0, plusrunCommandoe-swift.json - Unknown web repo -> default to , port
type: "unknown", run command5173npm run dev
If the evidence is mixed, explain that uncertainty instead of pretending confidence.
优先使用参考资料中的实际解析器默认值,而非通用假设。
- -> 端口
next,当存在Bun锁文件时运行命令为3000或npm run devbun dev - -> 端口
astro4321 - -> 端口
expo,运行命令8081npx expo start - -> 端口
react-native,运行命令8081或npm startbun start - Vite React -> 端口
5173 - Shopify theme -> 端口,运行命令
9292shopify theme dev - iOS -> 端口,
0为空,同时生成runCommandoe-swift.json - 未知Web仓库 -> 默认,端口
type: "unknown",运行命令5173npm run dev
如果证据存在矛盾,要说明这种不确定性,而非假装确定。
3. Generate the smallest correct config
3. 生成最小化的正确配置
Rules:
- Keep minimal unless the repo clearly supports more
.logic-editor.json - Do not add speculative routes or URL-state variants just to look smart
- If route discovery is weak, emit a single home route:
{ "path": "/", "label": "Home" }
- Preserve existing config when updating; merge carefully instead of replacing unrelated fields
- Do not invent unsupported keys
规则:
- 保持尽可能简洁,除非仓库明确支持更多配置
.logic-editor.json - 不要为了显得专业而添加推测性的路由或URL状态变体
- 如果路由发现的信号较弱,仅输出一个首页路由:
{ "path": "/", "label": "Home" }
- 更新时保留现有配置;仔细合并而非替换无关字段
- 不要添加不支持的键
4. Only generate oe-swift.json
for real iOS projects
oe-swift.json4. 仅为真正的iOS项目生成oe-swift.json
oe-swift.jsonWhen the repo is SwiftUI or Xcode-based:
- infer from the
schemeor.xcodeprojname when possible.xcworkspace - default simulator to
iPhone 16 Pro - infer views from obvious files
*View.swift - keep view entries simple unless the repo provides stronger signals
- do not fabricate bundle IDs, deep links, or accessibility tap metadata unless the repo exposes them
当仓库是SwiftUI或基于Xcode时:
- 尽可能从或
.xcodeproj名称推断.xcworkspacescheme - 模拟器默认设置为
iPhone 16 Pro - 从明显的文件推断视图
*View.swift - 保持视图条目简洁,除非仓库提供更强的信号
- 不要编造Bundle ID、深度链接或无障碍点击元数据,除非仓库已暴露这些信息
5. Explain assumptions explicitly
5. 明确解释假设
After the config output, include a short explanation covering:
- detected framework or platform
- chosen port and run command
- whether routes were inferred or defaulted
- whether was generated and why
oe-swift.json - which fields should be manually confirmed
在配置输出后,添加一段简短说明,涵盖:
- 检测到的框架或平台
- 选择的端口和运行命令
- 路由是推断的还是默认的
- 是否生成了及原因
oe-swift.json - 哪些字段需要手动确认
6. Prefer generation over schema questions
6. 优先生成而非询问schema
If the repo is a supported type and the references here cover the config format:
- generate the file contents directly
- use conservative defaults when some fields are weakly signaled
- ask follow-up questions only when a missing field would make the config invalid or misleading
Do not stop with "I need the schema" for normal React, Next, Astro, Expo, React Native, Shopify, or iOS repos.
如果仓库是受支持的类型,且此处的参考资料已涵盖配置格式:
- 直接生成文件内容
- 当某些字段信号较弱时,使用保守的默认值
- 仅当缺失的字段会导致配置无效或产生误导时,才提出后续问题
对于普通的React、Next、Astro、Expo、React Native、Shopify或iOS仓库,不要以“我需要schema”为由停止操作。
Output Rules
输出规则
When the user asks for file contents, prefer this structure:
text
.logic-editor.json
```json
{ ... }oe-swift.json
json
{ ... }Notes
- ...
If the project is not iOS, omit `oe-swift.json`.
If there is already a config file, show the updated file content instead of a from-scratch template.当用户要求提供文件内容时,优先使用以下结构:
text
.logic-editor.json
```json
{ ... }oe-swift.json
json
{ ... }Notes
- ...
如果项目不是iOS项目,省略`oe-swift.json`。
如果已存在配置文件,显示更新后的文件内容而非从头开始的模板。