build-ghost-app
Skill này làm gì
Skill này hướng dẫn agent AI xây dựng một ứng dụng Ghost chạy bên trong Ghost Admin. Skill dành cho lập trình viên muốn thêm trang hoặc công cụ riêng vào Ghost.
Khi nào nên dùng
- ✓Khi bạn bắt đầu một ứng dụng Ghost mới và muốn nó xuất hiện bên trong Ghost Admin.
- ✓Khi bạn cần viết file manifest để cho Ghost biết về ứng dụng của bạn.
- ✓Khi bạn muốn kết nối ứng dụng với Ghost Admin bằng SDK và cài đặt nó.
Liên kết skill
https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn bắt đầu một ứng dụng Ghost bằng Vite và React, hiển thị ngay bên trong Ghost Admin của mình.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thiết lập một dự án Vite và React, cài Ghost app SDK và viết file manifest. Sau đó nó chạy ứng dụng trên một cổng cục bộ cố định để Ghost Admin có thể tải nó.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
SDK.
@tryghost/app-sdkisn't on npm yet. Install it from the folder:npm install ./vendor/tryghost-app-sdk.tgz. It brings its one dependency,@quilted/threads.Fixed port. In
vite.config.ts, setserver: { port: 5190, strictPort: true }. The install link depends on the port.Manifest. Serve it as
public/ghost-app.json, so it's athttp://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.urltoo, and Admin rejects fields it doesn't know.icon.nameis any Lucide icon name in kebab case, such asmegaphoneorlayout-list; Admin draws it onaccent_color.Connect before rendering. Admin keeps the frame hidden until the app calls
connect(), and gives up after 10 seconds. Insrc/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.Theme.
ghost.theme.modeis'light'or'dark', andghost.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 thebuild-ghost-app-uiskill, at its "Light and dark theme" step.Install link. With
npm run devrunning, 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.
Câu hỏi thường gặp
Ứng dụng dùng cổng nào?
Skill đặt ứng dụng ở cổng 5190 với chế độ strict, vì liên kết cài đặt phụ thuộc vào cổng đó.
File manifest đặt ở đâu?
File được đặt trong thư mục public với tên ghost-app.json, nên nó được phục vụ tại địa chỉ cục bộ của ứng dụng.
Skill này có bao gồm các màn hình của ứng dụng không?
Không. Skill hướng bạn tới một skill riêng là build-ghost-app-ui để làm các màn hình.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 56k
- Vị trí xếp hạng
- #3280
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
tinybird-cli-guidelines
56kHướng dẫn agent của bạn dùng các lệnh Tinybird CLI để phát triển cục bộ, làm việc với nhánh, build, deploy và quản lý dữ liệu.
tinybird
56kDạy agent của bạn định dạng file, quy tắc SQL và các mẫu hiệu năng của Tinybird cho datasource, pipe, endpoint và materialized view.
build-ghost-app-ui
56kGiúp agent của bạn xây dựng các màn hình của ứng dụng Ghost bằng Shade, hệ thống thiết kế của Ghost, và chỉ đường đến đúng tài liệu và skill.
shade-imports
56kGiúp agent của bạn import các thành phần Shade từ đúng đường dẫn theo layer và thiết lập stylesheet cùng ShadeApp cho đúng.
Skill tương tự
angular-developer
280kGiúp agent của bạn viết code Angular và tư vấn cấu trúc dự án, hữu ích khi bắt đầu dự án mới hoặc cải thiện hiệu suất.
frontend-a11y
280kGiúp agent của bạn làm cho giao diện web dễ tiếp cận với mọi người. Đảm bảo website và ứng dụng hoạt động tốt với trình đọc màn hình và điều hướng bằng bàn phím.
frontend-patterns
280kGiúp agent của bạn áp dụng các mẫu hiện đại trong phát triển frontend. Tối ưu hiệu năng, quản lý trạng thái và tuân theo thực hành tốt nhất với React và Next.js.