본문으로 건너뛰기
Skillpedia
웹사이트 및 UI (프런트엔드)56k · #3280

build-ghost-app

하는 일

이 스킬은 Ghost Admin 안에서 실행되는 Ghost 앱을 만드는 과정을 AI 에이전트에게 안내합니다. Ghost에 자신만의 페이지나 도구를 추가하려는 개발자에게 맞습니다.

사용하는 경우

  • ✓Ghost Admin 안에 나타날 새 Ghost 앱을 시작할 때.
  • ✓Ghost에 앱을 알리는 매니페스트 파일을 작성해야 할 때.
  • ✓앱 SDK로 Ghost Admin에 연결하고 앱을 설치하고 싶을 때.

스킬 링크

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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“Vite와 React로 제 Ghost Admin 안에 표시되는 Ghost 앱을 시작해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 Vite와 React 프로젝트를 설정하고, Ghost 앱 SDK를 설치한 뒤 매니페스트 파일을 씁니다. 그다음 Ghost Admin이 앱을 불러올 수 있도록 고정된 로컬 포트에서 앱을 제공합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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.

자주 묻는 질문

앱은 어느 포트를 쓰나요?

설치 링크가 그 포트에 의존하므로, 스킬은 엄격 모드에서 포트 5190을 쓰도록 설정합니다.

매니페스트 파일은 어디에 두나요?

public 폴더에 ghost-app.json 파일로 두며, 그러면 앱의 로컬 주소에서 제공됩니다.

이 스킬은 앱 화면도 다루나요?

아닙니다. 화면은 별도의 build-ghost-app-ui 스킬을 가리킵니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
56k
순위
#3280
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬