webiny-new-entry-wizard
できること
このスキルは、Webinyのヘッドレス CMSでエントリーの編集画面より前に表示されるウィザードを作るとき、AIを導きます。新しいエントリーを、いくつかの項目がすでに集められた状態で始めたい開発者向けです。
使う場面
- ✓新しいCMSエントリーを作る前に、タイトルやスラッグのような短いフォームを表示したいとき。
- ✓作成時にカスタムのウィザードを表示する、特定のコンテンツモデルが必要なとき。
- ✓エントリーのフォームを、ウィザードの回答で事前入力したいとき。
スキルのリンク
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/new-entry-wizard/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ブログのコンテンツモデルに、エントリーが開く前にタイトル、スラッグ、カテゴリーを尋ねるウィザードを追加してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
スキルは、共通のインターフェース、機能、フォームを所有するプレゼンター、ビュー、登録の手順を持つウィザードの拡張を設定します。ウィザードの回答はエントリーのフォームに渡され、そのフォームは未保存の変更がある状態で開きます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
New Entry Wizard
TL;DR
A New Entry Wizard intercepts the "create new entry" flow in the Headless CMS and shows a custom form before the full entry editor. The wizard collects initial values (title, slug, category, etc.), then calls formPresenter.newEntry(initialValues) to pre-fill the entry form and transition to the editor. The form is automatically marked as dirty so the user sees unsaved changes.
A wizard extension has five files:
abstractions.ts-- DI token and presenter interface (ALWAYS a standalone file)feature.ts--createFeaturewiring (ALWAYS a standalone file)- Presenter -- owns the wizard form (fields, layout, validation) via
FormModelFactory - View -- renders the wizard UI using
FormViewandFormErrors - Registration -- plugs the wizard into specific content models via
ContentEntryEditorConfig.NewEntryWizard
Registration
// extensions/myWizard/index.tsx
import React from "react";
import { RegisterFeature } from "webiny/admin";
import { ContentEntryEditorConfig } from "webiny/admin/cms/entry/editor";
import { MyWizardFeature } from "./feature.js";
import { MyWizardForm } from "./MyWizardForm.js";
const MyWizardExtension = () => {
return (
<>
<RegisterFeature feature={MyWizardFeature} />
<ContentEntryEditorConfig>
<ContentEntryEditorConfig.NewEntryWizard
element={<MyWizardForm />}
modelIds={["article", "blogPost"]}
/>
</ContentEntryEditorConfig>
</>
);
};
export default MyWizardExtension;
Props
| Prop | Type | Description |
|---|---|---|
element |
React.ReactElement |
The wizard component to render |
modelIds |
string[] |
Content model IDs this wizard applies to. Omit or pass [] to apply to all models. |
Enabling the extension
// webiny.config.tsx
<Admin.Extension src={"@/extensions/myWizard/index.tsx"} />
Abstractions
Abstractions MUST live in a dedicated abstractions.ts file. This file defines the DI token for the presenter. It is imported by both the feature and the view.
// extensions/myWizard/abstractions.ts
import { createAbstraction } from "webiny/admin";
import type { FormModel } from "webiny/admin/form";
export interface MyWizardVM {
form: FormModel.FormVM;
data: Record<string, unknown>;
}
export interface IMyWizardPresenter {
vm: MyWizardVM;
submit(): Promise<Record<string, unknown> | false>;
reset(): void;
}
export const MyWizardPresenter = createAbstraction<IMyWizardPresenter>("MyWizardPresenter");
Feature
The feature MUST live in a dedicated feature.ts file. It wires the presenter implementation to the abstraction and defines how the feature is resolved from the DI container.
// extensions/myWizard/feature.ts
import { createFeature, FormModelFactory } from "webiny/admin";
import { MyWizardPresenter } from "./abstractions.js";
import { MyWizardPresenterImpl } from "./MyWizardPresenter.js";
export const MyWizardFeature = createFeature({
name: "MyWizard",
register(container) {
container.register(
MyWizardPresenter.createImplementation({
implementation: MyWizardPresenterImpl,
dependencies: [FormModelFactory]
})
);
},
resolve(container) {
return { presenter: container.resolve(MyWizardPresenter) };
}
});
Presenter
The presenter owns a FormModel for the wizard's own fields. It is a plain class -- the DI token lives in abstractions.ts and the feature wiring lives in feature.ts.
// extensions/myWizard/MyWizardPresenter.ts
import type { FormModel } from "webiny/admin/form";
import { makeAutoObservable, toJS } from "mobx";
import { FormModelFactory } from "webiny/admin";
import type { IMyWizardPresenter, MyWizardVM } from "./abstractions.js";
export class MyWizardPresenterImpl implements IMyWizardPresenter {
private form: FormModel.Interface;
constructor(formFactory: FormModelFactory.Interface) {
this.form = formFactory.create({
fields: fields => ({
title: fields.text().label("Title").required("Title is required"),
slug: fields.text().label("Slug").required("Slug is required"),
category: f
よくある質問
ウィザードがエントリーを保存してくれますか?
いいえ。ウィザードはエントリーのフォームに入力するだけで、その後ユーザーが未保存の変更を見て、保存します。
ウィザードはコンテンツモデルにどう結び付けられますか?
エントリーの編集画面の設定を通じて、特定のコンテンツモデルに登録されます。
ウィザードにはどんなファイルが必要ですか?
スキルは五つの部分を挙げています。抽象化、機能、プレゼンター、ビュー、登録です。
詳細
作者による元の説明
Building a New Entry Wizard for the Headless CMS. Use this skill when the developer wants to show a custom wizard UI before the entry form when creating new CMS entries -- collecting fields like title, slug, or category upfront, then pre-filling the entry form. Covers ContentEntryEditorConfig.NewEntryWizard, createFeature, FormModelFactory, createReactiveComponent, useContentEntryFormPresenter, and the dirty-flag on setData.
repo: webiny/webiny-js
人気
- GitHubのスター
- 8.1k
- ランキング
- #12577
- ライセンス
- —
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
prd-to-plan
8.1k製品要件書を、それぞれ端から端まで成立する小さなスライスの段階的な計画に変え、Markdownファイルとして保存するよう、エージェントを支援します。
webiny-admin-architect
8.1kビジネスロジックの層とプレゼンターのパターンを使い、Webinyプラットフォームの管理画面を作る方法をエージェントに教えます。
webiny-admin-permissions
8.1k自動生成される権限フォームや、表示・非表示のチェックを含め、Webinyの管理画面に権限の制御を追加するよう、エージェントに教えます。
webiny-form-model
8.1kビルダーで宣言的にフィールドを定義し、レイアウト、検証、条件付きのルールを使って、Webinyのフォームを作るよう、エージェントに教えます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。