build-ghost-app
ما الذي تفعله
ترشد هذه المهارة وكيل الذكاء الاصطناعي في بناء تطبيق Ghost يعمل داخل Ghost Admin. وهي مناسبة للمطورين الذين يريدون إضافة صفحة أو أداة خاصة بهم إلى Ghost.
متى تستخدمها
- ✓عندما تبدأ تطبيق Ghost جديدًا وتريد أن يظهر داخل Ghost Admin.
- ✓عندما تحتاج إلى كتابة ملف البيان الذي يعرّف Ghost بتطبيقك.
- ✓عندما تريد ربط تطبيقك بـ Ghost Admin باستخدام حزمة تطوير التطبيقات والتثبيت.
رابط المهارة
https://github.com/TryGhost/Ghost/blob/main/apps/shade/dev-skill/ghost-app-ui-dev-setup/build-ghost-app/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“أريد بدء تطبيق Ghost باستخدام Vite وReact، يظهر داخل Ghost Admin الخاص بي.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
يُعد الوكيل مشروع Vite وReact، ويثبت حزمة تطوير تطبيقات Ghost، ويكتب ملف البيان. ثم يشغّل التطبيق على منفذ محلي ثابت حتى تستطيع 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
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.
الأسئلة الشائعة
أي منفذ يستخدم التطبيق؟
تضبط المهارة التطبيق على المنفذ 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
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
tinybird-cli-guidelines
56kيرشد وكيلك في استخدام أوامر Tinybird CLI للتطوير المحلي وعمل الفروع والبناء والنشر وإدارة البيانات.
tinybird
56kيعلّم وكيلك صيغ ملفات Tinybird وقواعد SQL وأنماط الأداء لمصادر البيانات والخطوط ونقاط النهاية والعروض المادية.
build-ghost-app-ui
56kيساعد وكيلك على بناء شاشات تطبيق Ghost باستخدام Shade، نظام تصميم Ghost، ويوجهه إلى الوثائق والمهارات الصحيحة.
shade-imports
56kيساعد وكيلك على استيراد مكونات Shade من مسارات الطبقات الصحيحة، وعلى إعداد ورقة الأنماط وShadeApp بشكل صحيح.
مهارات مشابهة
angular-developer
280kيساعد وكيلك على كتابة شيفرة Angular وتقديم نصائح لبنية المشروع، ويفيد في بدء المشاريع الجديدة وإنشاء المكونات وتحسين الأداء وإمكانية الوصول.
frontend-a11y
280kيساعد وكيلك على جعل واجهات الويب متاحة للجميع، فيضمن أن المواقع والتطبيقات تعمل جيدًا مع قارئات الشاشة والتنقل بلوحة المفاتيح.
frontend-patterns
280kيطبّق وكيلك أنماط تطوير الواجهات الحديثة، فيحسّن الأداء ويدير الحالة ويتبع أفضل الممارسات في React وNext.js.