$npx -y skills add Christian-Katzmann/app-it --skill app-it-staticTurn 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
| 1 | # app-it-static - Make a finished build launchable from the Dock |
| 2 | |
| 3 | `app-it-static` is the no-dev-server companion to `app-it`: it builds once, |
| 4 | serves the finished output, installs beside live apps in `~/Applications/App It/`, |
| 5 | and keeps the native Swift WebKit window and Dock identity. |
| 6 | |
| 7 | ## Non-Negotiables |
| 8 | |
| 9 | 1. Run `templates/inspect-static.sh` first and read the output before editing. |
| 10 | 2. Confirm before the first project build. It can write files and take time. |
| 11 | 3. Never run `npm run dev`. If the app needs a live dev server, route to |
| 12 | `app-it` and say why. |
| 13 | 4. Serve a snapshot and say so. Source changes need `desktop:rebuild`. |
| 14 | 5. Default to `serve_mode: "server"`. Use `file` only after proving the build is |
| 15 | file:// safe. |
| 16 | 6. Copy shipped templates and customize through `scripts/app-it.config.json`. |
| 17 | Do not re-derive launcher patterns. |
| 18 | 7. Verify the built output, app bundle, install path, runtime port, server |
| 19 | response, quit cleanup, and human-only GUI limits. |
| 20 | |
| 21 | ## Reference Map |
| 22 | |
| 23 | Open only the files needed by the inspection result: |
| 24 | |
| 25 | - `references/project-inspection.md` - static-servable tests, build/output |
| 26 | detection, package managers, monorepos, names, bundle IDs, and tools. |
| 27 | - `references/serve-modes.md` - server vs file decisions and the file:// safety |
| 28 | checklist. |
| 29 | - `references/generated-files.md` - template roster, shared-template rules, |
| 30 | allowed target-project files, config JSON, and package scripts. |
| 31 | - `references/verification.md` - smoke tests, app-bundle checks, runtime checks, |
| 32 | cleanup, and human/deferred buckets. |
| 33 | - `references/report-template.md` - exact final report format plus decision |
| 34 | history. |
| 35 | - `references/anti-patterns.md` - traps that cause broken static launchers. |
| 36 | |
| 37 | ## Templates |
| 38 | |
| 39 | Templates live next to this file in `templates/`. Copy them into the target |
| 40 | project; do not rewrite them. See `references/generated-files.md` for the full |
| 41 | roster. |
| 42 | |
| 43 | Shared templates are byte-identical to `app-it` and guarded by repo validation: |
| 44 | `wrapper.swift`, `native-run-stub.c`, `desktop-icons.sh`, |
| 45 | `desktop-icons-preview.sh`, `desktop-install.sh`, `info-plist-template.xml`, and |
| 46 | `placeholder-icon-gen.sh`. If launcher internals change, edit the `app-it` copy |
| 47 | and re-sync this plugin so marketplace installs stay self-contained. |
| 48 | |
| 49 | ## Workflow |
| 50 | |
| 51 | ### 1. Inspect |
| 52 | |
| 53 | Run: |
| 54 | |
| 55 | ```bash |
| 56 | /path/to/plugins/app-it-static/skills/app-it-static/templates/inspect-static.sh |
| 57 | ``` |
| 58 | |
| 59 | Use disk truth: `package.json`, config files, built output, and actual scripts. |
| 60 | Read `references/project-inspection.md` before deciding whether the app is |
| 61 | static-servable, which build command/output dir to use, or whether a monorepo |
| 62 | contains multiple apps. |
| 63 | |
| 64 | ### 2. Decide |
| 65 | |
| 66 | For each user-facing app: |
| 67 | |
| 68 | ```text |
| 69 | Static build or hand-written index.html exists? |
| 70 | no -> route to app-it |
| 71 | yes -> needs http origin, routing fallback, fetch(), or service worker? |
| 72 | yes -> server mode (default) |
| 73 | no -> file mode candidate |
| 74 | ``` |
| 75 | |
| 76 | When unsure, choose server mode. It costs a tiny Python process and is the safe |
| 77 | default for framework builds. |
| 78 | |
| 79 | ### 3. Build |
| 80 | |
| 81 | Confirm with the user, run the project build once, then copy templates into the |
| 82 | target project and write `scripts/app-it.config.json`. `desktop:build` assembles |
| 83 | the `.app`; it must not run the project build. `desktop:rebuild` is the refresh |
| 84 | path that reruns the build command. |
| 85 | |
| 86 | Read `references/generated-files.md` before editing package scripts, generated |
| 87 | docs, config JSON, icons, or install paths. |
| 88 | |
| 89 | ### 4. Verify |
| 90 | |
| 91 | Verification is mandatory. Read `references/verification.md` and run the checks |
| 92 | that apply: built `index.html`, Mach-O `Contents/MacOS/run`, executable |
| 93 | `run.sh`, Mach-O wrapper, plist placeholders gone, `.icns`, installed-path |
| 94 | open, server response, and Cmd+Q cleanup for server mode. |
| 95 | |
| 96 | Never claim GUI-only checks passed unless a display actually proves them. Put |
| 97 | window render and Dock icon identity in the human bucket when needed. |
| 98 | |
| 99 | ### 5. Report |
| 100 | |
| 101 | Use `references/report-template.md` for both the chat reply and |
| 102 | `docs/desktop-launcher.app-it-static-report.md`. Include snapshot limitations, |
| 103 | refresh command, verification results, known limits, and decision history. |
| 104 | |
| 105 | Stage files only when the local convention or user request asks for it. Do not |
| 106 | commit unless asked. |
| 107 | |
| 108 | ## Quick Defaults |
| 109 | |
| 110 | - Install destination: `~/Applications/App It/`. |
| 111 | - Bundle ID prefix: `com.user.<slug>`. |
| 112 | - Serve mode: `server`, unless file:// safety is proven. |
| 113 | - Vite/CRA/Astro/SvelteKit static/Next export/Angular/Nuxt generate: usually |
| 114 | server mode. |
| 115 | - Hand-written `index.html` with relative assets and no routing/fet |