본문으로 건너뛰기
Skillpedia
프롬프트 및 LLM8.1k · #12582

webiny-ai-powerups-content

하는 일

이 스킬은 모델을 직접 호출하지 않고, Webiny의 AI Power Ups 기능을 통해 CMS 항목 텍스트를 만드는 방법을 AI에게 보여 줍니다. 코드에서 자동 콘텐츠를 만들려는 개발자를 위한 스킬입니다.

사용하는 경우

  • ✓CMS 항목 내용을 요약하거나 다시 쓰는 대량 작업이나 훅이 필요할 때.
  • ✓생성된 내용이 프로젝트에 설정된 어조나 대상 페르소나를 따라야 할 때.
  • ✓모델을 고르거나 API 키를 다루지 않고 사용자 지정 뮤테이션 안에서 AI 콘텐츠를 만들어야 하는 경우.

스킬 링크

https://github.com/webiny/webiny-js/blob/next/skills/user-skills/api/ai-powerups-content/SKILL.md

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

사용 방법

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

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

Use this skill to help me: https://github.com/webiny/webiny-js/blob/next/skills/user-skills/api/ai-powerups-content/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“AI Power Ups 설정을 사용해서, 각 제품 항목마다 짧은 마케팅 요약을 생성하는 대량 작업을 작성해 주세요.”

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

작동 방식

이 스킬은 프롬프트와 선택적인 프로젝트 및 페르소나 ID를 넣어 생성 유스케이스를 호출하는 방법을 설명합니다. 유스케이스는 생성된 항목 값을 돌려주고, 코드가 그것을 파싱해 사용합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 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 overwrite name, price, etc.
  • Type the values at the call site if you like: execute<{ aiSummary?: string }>(...), which makes result.value.values.aiSummary typed (defaults to Record<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 whose processData calls CmsGenerateEntryContentUseCase and writes the result, as a background task.
  • @webiny/ai-powerups's AiImageEnrichmentTask shows the alternative (raw, hardcoded Ai.generateText) — use that only when you deliberately don't want the configured setup.
자주 묻는 질문

모델을 고르거나 API 키를 다뤄야 하나요?

아닙니다. 유스케이스는 사용자가 AI Power Ups에서 이미 설정한 제공자를 쓴다고 스킬이 설명합니다.

생성 결과는 무엇인가요?

생성된 항목 값이 담긴 JSON 문자열이며, 코드가 이를 파싱합니다.

페르소나란 무엇인가요?

작성자 페르소나는 어조를, 독자 페르소나는 대상을 정하며, 둘 다 선택 사항입니다.

상세 정보

작성자의 원본 설명

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

인기도

GitHub 스타
8.1k
순위
#12582
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬