Pular para o conteúdo
Skillpedia
Sites e telas (frontend)56 mil · #3280

build-ghost-app

O que ela faz

Esta skill guia um agente de IA na construção de um app do Ghost que roda dentro do Ghost Admin. Ela é para desenvolvedores que querem adicionar uma página ou ferramenta própria ao Ghost.

Quando usar

  • ✓Quando você começar um app novo do Ghost e quiser que ele apareça dentro do Ghost Admin.
  • ✓Quando precisar escrever o arquivo de manifesto que informa ao Ghost sobre o seu app.
  • ✓Quando quiser conectar o seu app ao Ghost Admin com o SDK de apps e instalá-lo.

Link da skill

https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.md

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Quero começar um app do Ghost com Vite e React que apareça dentro do meu Ghost Admin.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente configura um projeto com Vite e React, instala o SDK de apps do Ghost e escreve um arquivo de manifesto. Depois publica o app em uma porta local fixa, para que o Ghost Admin consiga carregá-lo.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do GitHub.

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. In vite.config.ts, set server: { port: 5190, strictPort: true }. The install link depends on the port.

  3. Manifest. Serve it as public/ghost-app.json, so it's at http://localhost:5190/ghost-app.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:

    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://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%2Flocalhost%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.

Perguntas frequentes

Qual porta o app usa?

A skill define a porta 5190 no modo estrito, porque o link de instalação depende dessa porta.

Onde fica o arquivo de manifesto?

Ele fica na pasta public como ghost-app.json, para ser servido no endereço local do app.

Esta skill cobre as telas do app?

Não. A skill aponta para uma skill separada, build-ghost-app-ui, para as telas.

Detalhes

Descrição original do autor

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.

repo: TryGhost/Ghost

Popularidade

Estrelas no GitHub
56 mil
Posição no ranking
#3280
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas