跳到主要内容
知仓学习社ZHICANG

init-xcode-app

Scaffold a standalone SwiftUI app via XcodeGen — pick macOS, iOS, or iOS+watchOS; ships house conventions, a Swift Testing target, swiftformat/swift…

写文件改身份文件读文件严重 0 · 高危 5glebis/claude-skills

它会碰到什么

扫了多少20 个文本文件,18 KB
它会碰到什么写文件改身份文件读文件
命中总数7 处
命中统计严重 0 · 高 5 · 中 2 · 低 0

这个仓库里自带 2 个测试样本文件(有些技能仓会放故意的恶意样本做演示),它们不计入上面的能力与命中。

逐条看命中(5 条严重或高危)
  • assets/core/common/AGENTS.md:34identity-config-write
    `xcrun simctl` is fully scriptable; for tap/swipe/screenshot loops add the **XcodeBuildMCP** server (see `.mcp.json`).
  • scripts/smoke-xcode.sh:10identity-write
    cp "$SKILL"/assets/core/common/AGENTS.md AGENTS.md
  • scripts/smoke-xcode.sh:10identity-write
    cp "$SKILL"/assets/core/common/AGENTS.md AGENTS.md
  • scripts/smoke-xcode.sh:11identity-write
    mkdir -p .claude && cp "$SKILL"/assets/core/common/CLAUDE.md .claude/CLAUDE.md
  • scripts/smoke-xcode.sh:11identity-write
    mkdir -p .claude && cp "$SKILL"/assets/core/common/CLAUDE.md .claude/CLAUDE.md

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

init-xcode-app

Scaffolds a native SwiftUI app with XcodeGen (project.yml → generated, committed .xcodeproj),

pre-loaded with the conventions and loop-closer toolchain (xcsift, the Xcode MCP, swiftformat/lint).

The lighter native sibling of init-tauri-app.

When to use

  • "init an xcode project", "scaffold a swiftui app", "new macOS/iOS app".

Prerequisites (verify before scaffolding)

  • xcodegen on PATH (xcodegen --version; brew install xcodegen if missing).
  • Xcode + CLT (xcodebuild -version).

Procedure

1. Gather inputs (AskUserQuestion)

  • App name (PascalCase, e.g. Tidepool) → <Name>; lowercase → <name>.
  • Bundle-id prefix (default com.glebkalinin) → <bundlePrefix>.
  • DEVELOPMENT_TEAM (optional — blank allowed) → <TEAM>.
  • Target shape: ios | macos | ios-watchos.
  • Modules (multi-select): CloudKit · CI · Release · Push.
  • JTBD artifact (optional): path to a jtbd.json (else auto-discover ./jtbd.json, ~/jtbd/<name>/jtbd.json). See 1.5.
  • Target directory (default ~/ai_projects/<name>). Abort if non-empty.

1.5 Ingest JTBD (optional, additive)

Identical contract to init-tauri-app: resolve (explicit → ./jtbd.json~/jtbd/<name>/jtbd.json),

confirm via hook, validate (render-jtbd.sh exits 3 → skip), pre-fill name. Artifacts written in Step 3.

2. Render core

Copy assets/core/common/* into the project (renames: gitignore.gitignore, swiftformat.swiftformat,

CLAUDE.md.claude/CLAUDE.md). Copy assets/core/shapes/<shape>/* into the project root. For macos,

also copy assets/core/shapes/ios/Sources + Tests (macos reuses the same SwiftUI sources). Substitute

<Name>/<name>/<bundlePrefix>/<TEAM> in every copied file. Blank <TEAM> → leave the placeholder line

DEVELOPMENT_TEAM: "".

If a JTBD artifact was confirmed: render assets/jtbd/PRODUCT.md.templatedocs/PRODUCT.md,

guardrails-check.md.templatedocs/internal/guardrails-check.md, insert

agents-product-section.md.template into AGENTS.md after the first heading, copy the artifact to

project-root jtbd.json. See assets/jtbd/jtbd-map.md.

3. Compose selected modules

For each selected module open assets/modules/<m>/INSERT.md and follow it: it lists source files to copy

and a project-fragment.yml to merge into project.yml (merge into the existing targets.<Name> and

entitlements: maps — never overwrite). CloudKit + Push both extend the same entitlements: map.

4. Generate + verify (the gate)

xcodegen generate

Then the unsigned build gate by shape:

  • ios / ios-watchos: xcodebuild build -scheme <Name> -destination 'generic/platform=iOS Simulator'
  • macos: xcodebuild build -scheme <Name> -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO

Then xcodebuild test against the same destination for the test target. Both must pass.

5. Handoff

Offer git init && git add -A && git commit. Print summary: shape, modules, signing note

(device/release signing is a human step), next command (open <Name>.xcodeproj).

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。