Guides building multi-step wizards in Orchard Core using the CrestApps Wizard module. Covers content-driven wizards with WizardPart, code-driven wizards with IWizardDefinition and handlers, session management, completion locking, and workflow events.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate accurate setup and extension guidance for the CrestApps Wizard module, a decoupled multi-step wizard engine for sign-up, onboarding, surveys or any guided flow. A wizard is built from content items (no code) or from code; both share one engine, session store, public host controller, completion lock and workflow events.
CrestApps.OrchardCore.Wizard (or the CrestApps.OrchardCore.Cms.Core.Targets bundle) in the web/startup project. Reference CrestApps.OrchardCore.Wizard.Abstractions from a module that only implements wizard contracts.CrestApps.OrchardCore.Wizard. It is the only feature ID. The content-driven part activates when OrchardCore.Contents is enabled, and the workflow events activate when OrchardCore.Workflows is enabled (both through [RequireFeatures] startups).ActivatingAsync, which runs once per new session, so resuming does not add steps again.CollectData step is complete only when WizardSession.SavedSteps has an entry for its key.CompletedAsync. The engine runs completing and completed handlers exactly once.{ "steps": [...] }.sealed modifier, except View Models.| Item | Value |
|---|---|
| Feature ID | CrestApps.OrchardCore.Wizard (category Content Management) |
| Definition | IWizardDefinition (WizardType, DisplayName, RequiresAuthenticatedUser) |
| Handler | IWizardHandler, or derive from WizardHandlerBase (namespace CrestApps.OrchardCore.Wizard.Handlers) |
| Renderer | IDisplayDriver<WizardFlow> |
| Flow | WizardFlow (Session, GetSortedSteps, GetCurrentStep, SetCurrentStep, GetFirstStep, GetLastStep, GetNextStep, GetPreviousStep, CurrentStepEquals) |
| Session | WizardSession (SessionId, WizardType, DefinitionId, Status, Steps, CurrentStep, SavedSteps, OwnerId, Properties) |
| Step | WizardStep (Key, Title, Description, Order, CollectData, State, Data, Conceal) |
| Engine | IWizardEngine.CompleteAsync(flow, prepareUnderLock, cancellationToken) returns WizardCompletionResult |
| Store | IWizardSessionStore (GetAsync, NewAsync, SaveAsync), indexed by WizardSessionIndex |
| Access | IWizardAccessPolicy.RequiresAuthenticatedUserAsync(wizardType, definitionId) |
| Permissions | StartWizard, ContinueWizard (descriptions are LocalizationSource values; granted to Anonymous, Authenticated and Administrator by default) |
| Rate-limit group | wizard (WizardConstants.RateLimitGroups.Wizard, for OrchardCore.RateLimits) |
Enums: WizardSessionStatus (Pending, AwaitingExternal, Completed, Failed, Canceled, Expired), WizardStepState (NotStarted, InProgress, Completed, Failed), WizardCompletionStatus (Completed, AlreadyCompleted, Blocked, Failed).
| Route name | URL | Purpose |
|---|---|---|
WizardStart | GET/POST Wizard/Start/{wizardType} | Start or resume (a per-wizard cookie remembers the pending session) and post a step |
WizardStep | GET Wizard/Step/{sessionId}/{step?} | Show a saved step of a pending session |
WizardConfirmation | GET Wizard/Confirmation/{sessionId} | Confirmation of a completed session |
On a valid post, the controller moves to the next step, or to the first incomplete data-collecting step, and when none is left calls IWizardEngine.CompleteAsync and redirects to the confirmation.
CrestApps.OrchardCore.Wizard, OrchardCore.Contents and OrchardCore.Flows. The manifest does not declare Flows, but the WizardPart editor uses its flowpart-edit script and style resources for adding and ordering steps.WizardPart to a host content type (for example Registration).WizardStep.BagPart) and order the cards./Wizard/Start/Content?definitionId={contentItemId}. All content wizards share the wizard type Content.WizardPartSettings: ContainedContentTypes, ContainedStereotypes, DisplayType, CollapseContainedItems, RequiresAuthenticatedUser, CompletionPolicy (WizardCompletionPolicy None = 0, Draft = 1 or Publish = 2; default Publish).
{
"steps": [
{
"name": "ContentDefinition",
"ContentTypes": [
{
"Name": "Registration",
"DisplayName": "Registration",
"Settings": { "ContentTypeSettings": { "Creatable": true, "Listable": true } },
"ContentTypePartDefinitionRecords": [
{ "PartName": "TitlePart", "Name": "TitlePart", "Settings": { "ContentTypePartSettings": { "Position": "0" } } },
{
"PartName": "WizardPart",
"Name": "WizardPart",
"Settings": {
"ContentTypePartSettings": { "Position": "1" },
"WizardPartSettings": {
"ContainedStereotypes": [ "WizardStep" ],
"CompletionPolicy": 1,
"RequiresAuthenticatedUser": false
}
}
}
]
}
]
}
]
}
Each step renders a fresh content item seeded from the authored step's default values, with the type's standard editor. Responses are saved in the session and, per the completion policy, created as drafts or published inside the completion lock, so a persistence failure marks the wizard failed instead of losing data. Only types still in the allowlist render at runtime, and the administrator is responsible for exposing only safe step types to the wizard's audience.
Register a definition, a handler that adds and finalizes steps, and a display driver that renders the current step and writes SavedSteps:
services.AddSingleton<IWizardDefinition, OnboardingWizardDefinition>();
services.AddScoped<IWizardHandler, OnboardingWizardHandler>();
services.AddScoped<IDisplayDriver<WizardFlow>, OnboardingProfileStepDisplayDriver>();
Then link to /Wizard/Start/Onboarding. A complete definition, handler, step driver and view are in references/code-wizard-examples.md.
Driver zones used by the default host: Steps (the stepper), Content (the step editor) and Actions (navigation buttons, WizardFlowButtons); the confirmation display uses the Confirmation display type. Set the session property WizardConstants.SuppressDefaultChromePropertyKey to true to render your own stepper and buttons while reusing the controller and engine.
IWizardEngine.CompleteAsync takes a distributed lock for the session, reloads the authoritative session, checks every CollectData step has data, and runs completing and completed handlers exactly once even under concurrent or repeated posts. A missing step returns Blocked with BlockingStepKey. Use prepareUnderLock to validate and record external evidence, such as a payment return, inside the same lock:
var result = await _wizardEngine.CompleteAsync(
flow,
prepareUnderLock: async authoritativeFlow =>
{
// Return false to stop completion when the external evidence is not valid.
return await _receipts.ValidateAndRecordAsync(authoritativeFlow.Session, cancellationToken);
},
cancellationToken);
if (!result.IsCompleted)
{
// Blocked, or Failed: send the user back to result.BlockingStepKey when it is set.
}
The host challenges anonymous visitors when the definition's RequiresAuthenticatedUser is true or any IWizardAccessPolicy returns true for the wizard type and definitionId. The content-driven part ships such a policy for its per-item setting. Register your own with services.AddScoped<IWizardAccessPolicy, MyWizardAccessPolicy>();. Starting needs StartWizard; posting, showing steps and the confirmation need ContinueWizard. Remove these from Anonymous to make every wizard sign-in only.
With OrchardCore.Workflows enabled, four events appear under the Wizard category: WizardStartedEvent, WizardStepDisplayedEvent, WizardCompletedEvent and WizardFailedEvent. Each has an optional WizardType filter (empty matches all, or Onboarding, Content, and so on) and supplies SessionId, WizardType, DefinitionId, CurrentStep, Status and the Session object as input, correlated by session id.
| Symptom | Check |
|---|---|
Wizard/Start/{type} returns 404 | No IWizardDefinition with that WizardType is registered, or the feature is off |
| WizardPart not in the part list | Enable OrchardCore.Contents; the content startup requires it |
| Add step or drag-to-reorder does nothing in the editor | Enable OrchardCore.Flows, which provides the flowpart-edit resources |
| Workflow events missing | Enable OrchardCore.Workflows |
| Steps duplicate after resume | Add steps only in ActivatingAsync |
| Wizard never completes | A CollectData step has no SavedSteps entry; the driver's UpdateAsync must write it |
| Another wizard's step renders | A handler or driver does not early-return for foreign wizard types or steps |
| Anonymous users get 403 | StartWizard or ContinueWizard was removed from Anonymous |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, multi-step-wizard, stepper, onboarding-flow, wizard-engine
/crestapps-orchardcore:orchardcore-wizardfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job