Install any skill in seconds. Free to start, no credit card required.
Get Started Free →webiny/webiny-ai-powerups-content
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.
Passed 21 of 22 test cases with the skill, and 9 of 22 without it.
and 16 more in the full report
12 fixed9 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
If no generic type argument is supplied when calling execute on CmsGenerateEntryContentUseCase, what is the default TypeScript type of result.value.values?
| Checked | Without skill | With skill |
|---|---|---|
| The default type of values is Record<string, any>. | Missed | Passed |
The instructions your model reads when the skill loads.
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.
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].
test cases passed, vs 9 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.