Przejdź do treści
Biblioteka skilli
Programowanie · Integracja z narzędziem

build-ghost-app

/build-ghost-app

Łączy aplikację Ghost z Ghost Admin przez SDK i udostępnia manifest oraz link instalacyjny.

Repozytorium
Ghost ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
4
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Łączy aplikację Ghost z Ghost Admin przez SDK i udostępnia manifest oraz link instalacyjny.

Oryginalny opis (EN)

Connect a Ghost app to Ghost Admin with the app SDK, and serve its manifest and install link. Use when building a Ghost app, connecting it to Admin, writing its manifest or installing it.

Jak działa

  1. Connect the app
  2. Hand over
Sekcje z nagłówków SKILL.md, w oryginale · 83 linii, 529 słów
Podgląd SKILL.md
---
name: build-ghost-app
description: Connect a Ghost app to Ghost Admin with the app SDK, and serve its manifest and install link. Use when building a Ghost app, connecting it to Admin, writing its manifest or installing it.
---

# Build a Ghost app

A Ghost app runs as a full page in a frame inside Ghost Admin. Build it in this
folder, the one with `AGENTS.md`, as a Vite, React and TypeScript app with npm.
These steps make it show up in Admin. For its screens, use the
`build-ghost-app-ui` skill.

`npm create vite` won't scaffold into a folder that already has files without
`--overwrite`, which deletes them. Scaffold into a new subfolder, then move its
files up into this folder and remove the subfolder.

## Connect the app

1. **SDK.** `@tryghost/app-sdk` isn't on npm yet. Install it from the folder:
   `npm install ./vendor/tryghost-app-sdk.tgz`. It brings its one dependency,
   `@quilted/threads`.
2. **Fixed port, own name.** In `vite.config.ts`, set
   `server: { port: 5190, strictPort: true }`. The install link depends on the
   port. Open the app as `my-app.localhost`, not `localhost`: Ghost is on
   `localhost`, and refuses an app on its own host on any port, since browsers
   send its cookies to every port. A name under `.localhost` counts as another
   host, and browsers, Vite and Ghost all send it to this machine with no setup.
   Only if Ghost runs in Docker on Linux, with `pnpm dev:docker`, its container
   reaches the app through the Docker bridge, not loopback, so also set
   `host: '0.0.0.0'`. That makes the dev server reachable from your network too.
3. **Manifest.** Serve it as `public/ghost-app.json`, so it's at
   `http://my-app.localhost:5190/ghost-app.json`:

   ```json
   {
     "id": "org.example.<app-slug>",
     "name": "<App name>",
     "description": "<One sentence on what the app does.>",
     "author": { "name": "<Author>", "url": "https://example.com" },
     "accent_color": "#<six-digit hex>",
     "icon": { "name": "<icon-name>" },
     "surfaces": [{ "type": "admin_page", "url": "/" }]
   }
   ```

   Every field is required, `author.url` too, and Admin rejects fields it
   doesn't know. `icon.name` is any Lucide icon name in kebab case, such as
   `megaphone` or `layout-list`; Admin draws it on `accent_color`.

4. **Connect before rendering.** Admin keeps the frame hidden until the app
   calls `connect()`, and gives up after 10 seconds. In `src/main.tsx`, await
   it before rendering React:

   ```ts
   import { connect, GhostAppError } from '@tryghost/app-sdk'

   try {
     const ghost = await connect()
     // apply ghost.theme.mode (step 5), then render the app
   } catch (error) {
     if (error instanceof GhostAppError && error.code === 'not_framed') {
       // Opened outside Admin: render only a short "Open this app in Ghost Admin" message
     } else {
       // Render a short "Couldn't connect to Ghost" message with error.message
     }
   }
   ```

   Opened directly at `http://my-app.localhost:5190/`, the page isn't framed, so it
   shows only that message. That's expected.

5. **Theme.** `ghost.theme.mode` is `'light'` or `'dark'`, and
   `ghost.onThemeChange(theme => …)` fires when the publisher switches; it
   returns a function that unsubscribes. Apply the mode before the first render
   and follow changes. How Shade takes the mode is in the `build-ghost-app-ui`
   skill, at its "Light and dark theme" step.
6. **Install link.** With `npm run dev` running, the publisher installs the app
   from:
   `http://localhost:2368/ghost/#/apps/install?manifest=http%3A%2F%2Fmy-app.localhost%3A5190%2Fghost-app.json`

## Hand over

You can't open Ghost Admin yourself, so the publisher checks the app there.
When you're done, check that `npm run dev` starts on port 5190 and `npm run build`
passes, stop the dev server, and give them the install link with anything they
should check in Admin.

Wersje

W bazie nie ma innych skilli o nazwie build-ghost-app.

Migawka bazy z 13.11.2026 · wersja paczki 03f89a4d1597 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100build-ghost-app-ui
    Buduje ekrany aplikacji Ghost z użyciem systemu Shade i wyszukuje dla niej dokumentację oraz umiejętności.
  • 95ghost
    Tworzy szkice, publikuje i aktualizuje wpisy na samodzielnie hostowanej witrynie Ghost przez oficjalne Admin API.
  • 100ghost
    Obsługuje platformę Ghost: uruchamianie przez Docker lub ghost-cli, odczyt wpisów z Content API dla headless frontendu w Next.js, zarządzanie członkami przez Admin API i płatne newslettery ze Stripe.
  • 100ghost
    Zarządza treścią Ghost CMS przez Admin API: przegląd postów, stron i tagów, szkice, publikacja, planowanie i informacje o witrynie z terminala.
  • 100ghost-publish
    Tworzy i zarządza wpisami oraz stronami w Ghost przez Admin API, z polami SEO, szkicami domyślnie i rejestrem własności.
  • 90ghost-study
    Stosuje analizę marki Ghost do prezentacji, stron, postów i maili pisanych w tym stylu.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.