webiny-ai-powerups-content
Fungsinya
Skill ini menunjukkan kepada AI Anda cara membuat teks entri di CMS Webiny melalui fitur AI Power Ups, alih-alih memanggil model secara langsung. Skill ini untuk pengembang yang menginginkan konten otomatis dari kode mereka sendiri.
Kapan dipakai
- βSaat Anda menginginkan aksi massal atau hook untuk meringkas atau menulis ulang konten entri CMS.
- βSaat Anda ingin konten yang dihasilkan mengikuti nada atau persona audiens yang diatur untuk proyek.
- βSaat Anda memerlukan pembuatan konten AI di dalam mutasi khusus tanpa memilih model atau menangani kunci API.
Link skill
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/api/ai-powerups-content/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTulis aksi massal yang membuat ringkasan pemasaran singkat untuk setiap entri produk, memakai pengaturan AI Power Ups kami.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill menjelaskan cara memanggil use case generasi dengan prompt serta ID proyek dan persona yang opsional. Use case mengembalikan nilai entri yang dihasilkan, yang kemudian di-parse dan dipakai oleh kode Anda.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
AI content generation via AI Power Ups
TL;DR
Inject CmsGenerateEntryContentUseCase (from webiny/api/ai-powerups) and call
execute(...). It uses the provider the user configured in AI Power Ups and applies an
optional Project, Writer Persona, or Reader Persona β so you never pick
models, decrypt API keys, or hardcode prompts. It returns the AI-generated entry values as
a JSON string; parse it and take the field(s) you want.
Prefer this over a raw Ai.generateText call whenever the point is "apply the user's
configured AI setup" β it composes the product with itself and is far less plumbing.
Generate content
import { CmsGenerateEntryContentUseCase } from "webiny/api/ai-powerups";
class MyThing {
constructor(private generate: CmsGenerateEntryContentUseCase.Interface) {}
async run(model, entry, ctx) {
const result = await this.generate.execute({
modelId: model.modelId,
prompt: `Write a one-sentence marketing summary for "${entry.values.name}". Fill only the "aiSummary" field.`,
// Any of these are optional; they map to what the user configured in AI Power Ups:
projectId: ctx?.projectId, // a bundled context (instructions + files + default personas)
writerPersonaId: ctx?.writerPersonaId, // tone
readerPersonaId: ctx?.readerPersonaId // audience
});
if (result.isFail()) {
throw result.error; // e.g. "No AI provider configured. Add a provider in AI Power Ups settings."
}
return result.value; // { values, telemetry }
}
}
Register the dependency: dependencies: [CmsGenerateEntryContentUseCase].
Output shape β important
result.value.values is an entry-shaped object keyed by the model's field ids (the use
case is built to fill an entry from its schema). The AI decides which fields it fills, so:
- Read only the field(s) you want (e.g.
result.value.values.aiSummary) β do NOT blindly write the whole object back, or the AI could overwritename,price, etc. - Type the values at the call site if you like:
execute<{ aiSummary?: string }>(...), which makesresult.value.values.aiSummarytyped (defaults toRecord<string, any>). - Guard for the field being absent (the model may not have filled it): fall back to
""and, if you're inside a converging background task, still mark the entry done so it doesn't loop.
Then persist with UpdateEntryUseCase (values nested; skipValidation: true for a
targeted field write).
Admin β list configured contexts (for a picker)
To let the user pick a Project/Persona in the Admin UI, read AI Power Ups settings with
GetSettingsFeature (from webiny/admin/ai-powerups):
import { useFeature } from "webiny/admin";
import { GetSettingsFeature } from "webiny/admin/ai-powerups";
const { useCase: getSettings } = useFeature(GetSettingsFeature);
const settings = await getSettings.execute();
// settings.writerPersonas.presets / settings.readerPersonas.presets / settings.projects.presets
// each preset: { id, name, description, ... }
Forward the chosen id(s) to your backend (e.g. via a bulk action's data).
Related
webiny-cms-bulk-actionsβ the common host for this: a bulk action whoseprocessDatacallsCmsGenerateEntryContentUseCaseand writes the result, as a background task.@webiny/ai-powerups'sAiImageEnrichmentTaskshows the alternative (raw, hardcodedAi.generateText) β use that only when you deliberately don't want the configured setup.
Pertanyaan umum
Apakah saya perlu memilih model atau menangani kunci API?
Tidak. Skill menyatakan use case memakai penyedia yang sudah Anda atur di AI Power Ups.
Apa yang dikembalikan oleh generasi?
Nilai entri yang dihasilkan AI sebagai string JSON, yang kemudian di-parse oleh kode Anda.
Apa itu persona?
Persona penulis menentukan nada, dan persona pembaca menentukan audiens. Keduanya bersifat opsional.
Detail
Deskripsi asli dari pembuat
Generating Headless CMS entry content with AI from your own code, by delegating to the AI Power Ups extension instead of calling an LLM directly. Use this skill when the developer wants to generate/summarize/rewrite entry content programmatically (e.g. from a bulk action, a lifecycle hook, or a custom mutation) using the provider and the Writer/Reader Personas and Projects the user configured in AI Power Ups. Requires the AI Power Ups extension (with a provider configured) and Webiny 6.5.0 or newer.
repo: webiny/webiny-js
Popularitas
- Bintang GitHub
- 8.1k
- Peringkat
- #12582
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
prd-to-plan
8.1kMembantu agent Anda mengubah dokumen kebutuhan produk menjadi rencana bertahap yang terdiri dari irisan kecil dari ujung ke ujung, disimpan sebagai berkas Markdown.
webiny-admin-architect
8.1kMengajari agent Anda cara membangun layar admin untuk platform Webiny, dengan memakai lapisan logika bisnis dan pola presenter.
webiny-admin-permissions
8.1kMengajari agent Anda menambahkan kontrol izin ke layar admin Webiny, termasuk formulir izin yang dibuat otomatis dan pemeriksaan tampilkan atau sembunyikan.
webiny-form-model
8.1kMengajari agent Anda membangun formulir di Webiny dengan pembuat field deklaratif, tata letak, validasi, dan aturan bersyarat.
Skill serupa
writing-skills
311kMengajari agent Anda menulis skill baru dan menguji setiap skill lebih dulu, memastikan skill itu benar-benar mengubah perilaku agent.
writing-for-agents
310kMenjelaskan cara menulis instruksi yang jelas untuk agent AI, termasuk file skill, AGENTS.md, dan CLAUDE.md, agar perilaku agent dapat diprediksi.
bengali-nlp
280kMembuat agent Anda memproses teks Bahasa Bengali. Membantu memahami dan mengolah bahasa tersebut, termasuk normalisasi teks dan karakteristik uniknya.