Agent Skills › Christian-Katzmann/app-it

Christian-Katzmann/app-it

GitHub

将已完成的Web应用构建为macOS Dock可启动的.app包,通过静态服务器或本地文件提供服务。适用于需要轻量级Dock应用、静态站点分发或从Dock直接点击运行构建产物的场景。

3 skills 214

Install All Skills

npx skills add Christian-Katzmann/app-it --all -g -y
More Options

List skills in collection

npx skills add Christian-Katzmann/app-it --list

Skills in Collection (3)

将已完成的Web应用构建为macOS Dock可启动的.app包,通过静态服务器或本地文件提供服务。适用于需要轻量级Dock应用、静态站点分发或从Dock直接点击运行构建产物的场景。
用户请求 app-it-static 需要将成品网站转换为 macOS Dock 可点击的 .app 应用 需要轻量级静态服务器替代开发服务器
plugins/app-it-static/skills/app-it-static/SKILL.md
npx skills add Christian-Katzmann/app-it --skill app-it-static -g -y
SKILL.md
Frontmatter
{
    "name": "app-it-static",
    "description": "Turn a finished or buildable web app into a macOS Dock-launchable .app that serves built output instead of a dev server. Use when the user asks for app-it-static, a finished site\/app launcher, a lightweight Dock app, or a dist\/build\/out bundle clickable from the Dock. Builds once, serves a snapshot via static-server.py or file:\/\/, and routes live projects to app-it. macOS only."
}

app-it-static - Make a finished build launchable from the Dock

app-it-static is the no-dev-server companion to app-it: it builds once, serves the finished output, installs beside live apps in ~/Applications/App It/, and keeps the native Swift WebKit window and Dock identity.

Non-Negotiables

  1. Run templates/inspect-static.sh first and read the output before editing.
  2. Confirm before the first project build. It can write files and take time.
  3. Never run npm run dev. If the app needs a live dev server, route to app-it and say why.
  4. Serve a snapshot and say so. Source changes need desktop:rebuild.
  5. Default to serve_mode: "server". Use file only after proving the build is file:// safe.
  6. Copy shipped templates and customize through scripts/app-it.config.json. Do not re-derive launcher patterns.
  7. Verify the built output, app bundle, install path, runtime port, server response, quit cleanup, and human-only GUI limits.

Reference Map

Open only the files needed by the inspection result:

  • references/project-inspection.md - static-servable tests, build/output detection, package managers, monorepos, names, bundle IDs, and tools.
  • references/serve-modes.md - server vs file decisions and the file:// safety checklist.
  • references/generated-files.md - template roster, shared-template rules, allowed target-project files, config JSON, and package scripts.
  • references/verification.md - smoke tests, app-bundle checks, runtime checks, cleanup, and human/deferred buckets.
  • references/report-template.md - exact final report format plus decision history.
  • references/anti-patterns.md - traps that cause broken static launchers.

Templates

Templates live next to this file in templates/. Copy them into the target project; do not rewrite them. See references/generated-files.md for the full roster.

Shared templates are byte-identical to app-it and guarded by repo validation: wrapper.swift, native-run-stub.c, desktop-icons.sh, desktop-icons-preview.sh, desktop-install.sh, info-plist-template.xml, and placeholder-icon-gen.sh. If launcher internals change, edit the app-it copy and re-sync this plugin so marketplace installs stay self-contained.

Workflow

1. Inspect

Run:

/path/to/plugins/app-it-static/skills/app-it-static/templates/inspect-static.sh

Use disk truth: package.json, config files, built output, and actual scripts. Read references/project-inspection.md before deciding whether the app is static-servable, which build command/output dir to use, or whether a monorepo contains multiple apps.

2. Decide

For each user-facing app:

Static build or hand-written index.html exists?
  no  -> route to app-it
  yes -> needs http origin, routing fallback, fetch(), or service worker?
           yes -> server mode (default)
           no  -> file mode candidate

When unsure, choose server mode. It costs a tiny Python process and is the safe default for framework builds.

3. Build

Confirm with the user, run the project build once, then copy templates into the target project and write scripts/app-it.config.json. desktop:build assembles the .app; it must not run the project build. desktop:rebuild is the refresh path that reruns the build command.

Read references/generated-files.md before editing package scripts, generated docs, config JSON, icons, or install paths.

4. Verify

Verification is mandatory. Read references/verification.md and run the checks that apply: built index.html, Mach-O Contents/MacOS/run, executable run.sh, Mach-O wrapper, plist placeholders gone, .icns, installed-path open, server response, and Cmd+Q cleanup for server mode.

Never claim GUI-only checks passed unless a display actually proves them. Put window render and Dock icon identity in the human bucket when needed.

5. Report

Use references/report-template.md for both the chat reply and docs/desktop-launcher.app-it-static-report.md. Include snapshot limitations, refresh command, verification results, known limits, and decision history.

Stage files only when the local convention or user request asks for it. Do not commit unless asked.

Quick Defaults

  • Install destination: ~/Applications/App It/.
  • Bundle ID prefix: com.user.<slug>.
  • Serve mode: server, unless file:// safety is proven.
  • Vite/CRA/Astro/SvelteKit static/Next export/Angular/Nuxt generate: usually server mode.
  • Hand-written index.html with relative assets and no routing/fetch/service worker: file mode candidate.
  • Missing swiftc or python3: stop and say xcode-select --install.

Stop Signs

Stop and explain clearly when the app only works through a live dev server, the build fails before launcher work, the output dir lacks index.html, required tooling is missing, or the environment cannot verify a claim the report would need.

为本地 Web 项目生成 Windows WPF+WebView2 桌面启动器、快捷方式及图标。需先运行 inspect.ps1 检查,遵循模板配置,严禁在未验证的 Windows 硬件上宣称功能可用,所有运行时行为标记为 Beta 并待维护者确认。
用户请求创建 Windows 应用或 .exe 启动器 需要生成 Windows 桌面图标或开始菜单快捷方式
plugins/app-it-windows/skills/app-it-windows/SKILL.md
npx skills add Christian-Katzmann/app-it --skill app-it-windows -g -y
SKILL.md
Frontmatter
{
    "name": "app-it-windows",
    "description": "Create Windows beta desktop launchers for local web projects: WPF + WebView2 .exe, Start Menu shortcut, .ico, warm server, quit cleanup. Use when the user asks for app-it-windows, a Windows app, .exe launcher, Start Menu shortcut, Windows package, or desktop icon. CI-guarded but untested on Windows hardware; never claim runtime success without a Windows maintainer."
}

app-it-windows - Make a project launchable on Windows (beta)

Windows beta: scaffolded, untested on real hardware, maintainer wanted.

The macOS app-it lane is proven. This Windows sibling mirrors the contract with Windows primitives, but every runtime behavior that needs a real Windows desktop must be marked deferred: this needs a Windows maintainer - see docs/WINDOWS.md.

Non-Negotiables

  1. Run templates/inspect.ps1 first and read the output before editing.
  2. Trust disk over docs. Verify project type, scripts, ports, and desktop signals from files.
  3. Build everything a Mac or CI can build; never claim Windows runtime behavior works unless it was verified on real Windows hardware.
  4. Prefer the WPF + WebView2 host. Edge --app= is a fallback, not the default.
  5. Keep Windows visibly beta in every report and user-facing summary.
  6. Copy shipped templates and customize through scripts\app-it.config.json. Do not re-derive launcher patterns.
  7. Verify build/lint/config checks, then list hardware-only checks as deferred.

Reference Map

Open only what the inspection or chosen path needs:

  • references/maintainer-contract.md - what a Mac can produce, what must be deferred, and the exact Windows-maintainer phrase.
  • references/inspection-and-strategies.md - project inspection, toolchain probes, strategy tree, W-Native, W-Edge, W-Static, W-Multi, B, and D.
  • references/generated-files.md - template roster, allowed target files, config JSON, package scripts, and Start Menu destination.
  • references/wrapper-host.md - WebView2 host, lifecycle, Job Object ownership, single-instance behavior, and wrapper argument contract.
  • references/verification.md - buildable checks, Windows-only checks, and deferred rows.
  • references/report-template.md - exact beta report format.

Templates

Templates live next to this file in templates/. Copy them into the target project and keep their contracts intact:

templates/
  wrapper-windows/
  desktop-build.ps1
  desktop-install.ps1
  desktop-quit.ps1
  inspect.ps1
  run-template.ps1
  run-template-edge.ps1
  desktop-icons.ps1
  placeholder-icon-gen.ps1
  PSScriptAnalyzerSettings.psd1
  app-it.config.example.json

The comments inside templates encode Windows traps: PATH augmentation, WebView2/.NET prerequisites, free-port probing, Job Object ownership, Start Menu shortcuts, SmartScreen, and icon-cache behavior. Read the matching reference before changing launcher internals.

Workflow

1. Inspect

Run the bundled probe from the target project root:

pwsh -File path\to\plugins\app-it-windows\skills\app-it-windows\templates\inspect.ps1

Read references/inspection-and-strategies.md before deciding project shape, ports, existing desktop tooling, names, icons, or strategy.

2. Decide

For each user-facing app:

Existing Electron/Tauri/NW.js Windows target?
  yes -> Strategy B
  no  -> native desktop requirement beyond web shell?
           yes -> Strategy D
           no  -> .NET 8 buildable and WebView2 expected?
                    no  -> W-Edge fallback
                    yes -> static built bundle, no server?
                             yes -> W-Static
                             no  -> cohabiting frontend + backend?
                                      yes -> W-Multi
                                      no  -> W-Native (default)

WebView2 is Chromium, so File System Access and other Chromium APIs are reasons to prefer the WPF host, not reasons for a polyfill.

3. Build

Touch as little project surface as possible. Copy the selected templates, write scripts\app-it.config.json, add desktop:* package scripts, and generate the .ico/published output when tooling is present.

Read references/generated-files.md before editing scripts/config/docs, and references/wrapper-host.md before changing the host or PowerShell lifecycle.

4. Verify

On macOS, only claim buildable evidence: .NET publish when available, PowerShell lint when available, manifest/config parse, and placeholder icon round-trip in Windows CI. Everything involving a real window, Taskbar identity, tray Quit, Start Menu icon cache, SmartScreen, DPI, or Job Object tree reaping stays deferred with the maintainer phrase.

Read references/verification.md before reporting results.

5. Report

Use references/report-template.md inline and in docs\desktop-launcher.app-it-report.md. Keep beta wording visible, separate build/lint evidence from runtime unknowns, and append decision history.

Stage files only when the local convention or user request asks for it. Do not commit unless asked.

Quick Defaults

  • Install destination: %APPDATA%\Microsoft\Windows\Start Menu\Programs\app-it\.
  • Runtime state: %LOCALAPPDATA%\app-it\<slug>\.
  • Bundle ID/key prefix: com.user.<slug>.
  • Default strategy: W-Native when .NET 8 can build and WebView2 is expected.
  • Fallback: W-Edge only when host prerequisites are unavailable.
  • Icon sizes: 16, 32, 48, 64, 128, 256.
  • First-run signing stance: unsigned; SmartScreen click-through documented.

Stop Signs

Stop and mark deferred or blocked when only Windows hardware can decide, when the required build toolchain is missing and no fallback fits, when a port cannot be made env-driven, when a template needed for the selected strategy is absent, or when the requested claim would imply real Windows runtime verification that has not happened.

将本地项目或托管Web应用打包为macOS Dock可点击的.app。通过模板化流程实现Swift WebKit封装、端口验证及Cmd+Q清理,支持Artifact包装与Auth隔离,确保构建与运行时可靠性。
用户希望创建macOS桌面快捷方式 需要将Web应用封装为原生App 需要生成Dock可启动的本地包
plugins/app-it/skills/app-it/SKILL.md
npx skills add Christian-Katzmann/app-it --skill app-it -g -y
SKILL.md
Frontmatter
{
    "name": "app-it",
    "description": "Turn a local project or a hosted web app (including a published Claude Artifact URL) into a macOS Dock-launchable .app. Use when the user wants a clickable Dock app, local app package, icon, App It install, hosted-URL or Artifact wrapper, or repeatable desktop launcher. Defaults to native Swift WebKit, shipped templates, and verification of build, launch, ports, quit, warm relaunch, and cleanup."
}

app-it - Make a local project or hosted web app launchable from the Dock

App It installs local projects under ~/Applications/App It/ as clickable macOS apps: click opens, window close stays warm, Cmd+Q cleans up.

Non-Negotiables

  1. Run templates/inspect.sh first and read the output before editing.
  2. Trust disk over docs. Verify project type from package.json, config files, and actual scripts when docs disagree.
  3. Decide for the user when the default is defensible. Ask only before a destructive or genuinely ambiguous choice.
  4. Copy the shipped templates into the target project and customize through scripts/app-it.config.json. Do not re-derive launcher patterns.
  5. Keep App It local and reversible. No Electron/Tauri migration unless the project already has one or Strategy A cannot satisfy the requirement.
  6. Verify the installed app path, runtime port truth, warm relaunch, Cmd+Q cleanup, and report honestly when GUI-only checks need a human.
  7. When wrapping a hosted app, keep auth with the host. Never copy sessions, cookies, API keys, or another user's auth into a local bundle. For a Claude Artifact that uses hosted runtime APIs (window.claude, window.storage, MCP prompts, or Claude-provided auth), package the published/shared claude.ai URL rather than copied source.

Reference Map

Open these only when the inspection or chosen path needs them:

  • references/project-inspection.md - inspect output, app naming, bundle IDs, multi-app signals, and framework recipes.
  • references/strategies.md - A1 native, Chrome fallback, A2 static, A3 multi-server, A4 CLI, existing Electron/Tauri/NW.js, and Strategy D.
  • references/ports-and-worktrees.md - worktrees, runtime port truth, hardcoded/env ports, and framework port cheat sheet.
  • references/generated-files.md - allowed files, templates, config JSON, placeholders, scripts, and generated docs.
  • references/assets-and-icons.md - icon discovery, rejection, preview, placeholders, and replacement.
  • references/fsa-and-chromium.md - File System Access, polyfill, and Chromium-only routing.
  • references/verification.md - build/install/runtime checks, smoke checks, human/deferred buckets, and cleanup semantics.
  • references/troubleshooting.md - Gatekeeper/iCloud rescue, stale wrappers, desktop:doctor, and anti-patterns.
  • references/report-template.md - exact final report format. Use it for the chat reply and docs/desktop-launcher.app-it-report.md.

Templates

Copy templates from templates/; do not rewrite them. They encode the Mach-O entrypoint, NFC/NFD-safe matching, daemon servers, two-stage cleanup, runtime port fallback, descendant reattach, Finder/Dock PATH, menu shortcuts, and doctor checks. See references/generated-files.md for the roster.

Workflow

1. Inspect

Run the bundled inspector from the target project root:

/path/to/plugins/app-it/skills/app-it/templates/inspect.sh

Use its output for worktree status, project type, scripts, hardcoded ports, multi-app/cohabiting-server signals, FSA, port collisions, toolchains, runtime paths, and assets.

Read references/project-inspection.md before resolving app count, names, bundle IDs, existing desktop configs, or project type. Read references/ports-and-worktrees.md for worktrees, hardcoded ports, proxy targets, or cohabiting frontend/backend servers.

2. Decide

For each user-facing app, choose one strategy:

Existing Electron/Tauri/NW.js config?
  yes -> Strategy B
  no  -> native desktop requirements beyond web shell?
           yes -> Strategy D
           no  -> FSA real-I/O or Chromium-only API?
                    yes -> A1 Chrome fallback
                    no  -> static built bundle, no server?
                             yes -> A2
                             no  -> cohabiting frontend + backend?
                                      yes -> A3
                                      no  -> A1 native WebKit (default)

Default to A1 native WebKit. Use Chrome fallback for real File System Access or other Chromium-only APIs. Use Electron/Tauri/NW.js only when the project already owns that path. Read references/strategies.md before anything beyond simple A1.

3. Build

Touch as few target-project files as possible. Read generated-files for the allowed surface/config, assets-and-icons before icon work, and fsa-and-chromium before FSA polyfill or Chrome fallback.

4. Verify

Verification is mandatory. Read references/verification.md and run applicable programmatic checks:

Check executable shape, plist/icon validity, installed-path open, runtime port, HTTP response, process and LaunchServices identity, Cmd+Q cleanup via Apple Event, red-X warm state, and warm relaunch. Use desktop:verify for the headless loop and desktop:doctor for ownership/template drift. Prefer their --json modes for automation. desktop:verify uses APP_IT_SMOKE=1 and marks GUI-only checks manual unless a visible app window is actually driven.

Never claim GUI-only checks passed unless you can actually see them. Put window content, Dock icon identity, autoplay, and FSA reconnect into the human bucket when the environment cannot verify them.

5. Report

End with the references/report-template.md report inline and in docs/desktop-launcher.app-it-report.md: strategy, changed files, icon source, build/install/quit commands, installed paths, verification, Dock Stack note, limitations, and decisions.

Stage new files with git add only when that is the repository's local convention or the user asked for staging. Do not commit unless asked.

Quick Defaults

  • Install destination: ~/Applications/App It/.
  • Bundle ID prefix: com.user.<slug>, unless the project has a real domain.
  • Preferred single-server ports: Next/CRA 3000, Vite/SvelteKit 5173, Astro 4321, Flask/FastAPI project default.
  • Port mode: keep port_mode: "fallback" unless browser storage, OAuth callbacks, or project config must stay on exactly one localhost origin. Use port_mode: "fixed" for that case; a busy preferred port is then a clear launch failure, not an upward scan.
  • Framework recipes live in project-inspection and ports-and-worktrees. Translate examples to the package manager present.
  • Next: use the direct binary when a script hardcodes flags, wraps next dev, or needs host/port flags: pnpm exec next dev --hostname 127.0.0.1 --port "$PORT" (translate pnpm to npm/yarn/bun as needed). Plain scripts that only run next dev are OK when they already honor PORT.
  • Vite/SvelteKit command: npm run dev -- --host 127.0.0.1 --port "$PORT" --strictPort.
  • Astro command: npm run dev -- --host 127.0.0.1 --port "$PORT".
  • Chrome fallback shutdown: document desktop:quit as primary cleanup because Chrome close/Cmd+Q do not map to the Swift wrapper lifecycle.
  • Command surface: scripts/app-it routes inspect | apply | verify | upgrade over the vendored scripts (a router, not a binary or runtime dep). upgrade (desktop-upgrade.sh) re-vendors newer templates when the manifest's template_version is behind, touches only app-it's own artifacts, and rolls back if the post-upgrade verify fails. See references/generated-files.md.

Stop Signs

Stop and explain clearly if the project needs blocking setup/auth, the start command cannot honor the launcher port, a smoke test proves the project is broken before the launcher, or the environment is hostile to verification.

What Not To Do

  • Do not make App It explicit-only.
  • Do not default to Chrome for vanilla web apps.
  • Do not attach to an arbitrary externally running server.
  • Do not use kill -TERM on the wrapper to test Cmd+Q.
  • Do not hardcode com.$(id -un).* bundle IDs.
  • Do not derive PROJECT_ROOT from the installed app path.
  • Do not remove PATH augmentation, runtime port fallback, daemon-mode warm relaunch, two-stage cleanup, native menu shortcuts, or doctor diagnostics.

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-11 23:13
浙ICP备14020137号-1 $Гость$