Agent skill
orchardcore-content-types
Skill for creating, managing, and configuring Orchard Core Content Types. Covers content part definitions, content field definitions, stereotypes, and content type indexing.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/orchardcore-content-types
Metadata
Additional technical details for this skill
- author
- CrestApps Team
- version
- 1.0
SKILL.md
Orchard Core Content Types - Prompt Templates
Create a Content Type
You are an Orchard Core expert. Generate code and configuration for creating a content type.
Guidelines
- Content type technical names must be PascalCase with no spaces.
- Always include a
TitlePartunless the content type uses a custom title strategy. - Add
AutoroutePartfor routable content types with a URL pattern. - Use
CommonPartconventions (owner, created/modified dates) where appropriate. - Attach
ListPartif the content type should act as a container. - Use content part and field settings to configure editors and display modes.
Migration Pattern
public sealed class Migrations : DataMigration
{
private readonly IContentDefinitionManager _contentDefinitionManager;
public Migrations(IContentDefinitionManager contentDefinitionManager)
{
_contentDefinitionManager = contentDefinitionManager;
}
public async Task<int> CreateAsync()
{
await _contentDefinitionManager.AlterTypeDefinitionAsync("{{ContentTypeName}}", type => type
.DisplayedAs("{{DisplayName}}")
.Creatable()
.Listable()
.Draftable()
.Versionable()
.WithPart("TitlePart", part => part
.WithPosition("0")
)
.WithPart("AutoroutePart", part => part
.WithPosition("1")
.WithSettings(new AutoroutePartSettings
{
AllowCustomPath = true,
Pattern = "{{ ContentItem | display_text | slugify }}"
})
)
);
return 1;
}
}
Content Field Configuration
When adding fields to a content part:
await _contentDefinitionManager.AlterPartDefinitionAsync("{{PartName}}", part => part
.WithField("{{FieldName}}", field => field
.OfType("{{FieldType}}")
.WithDisplayName("{{FieldDisplayName}}")
.WithPosition("{{Position}}")
)
);
Common field types include:
TextField- simple text inputHtmlField- rich HTML editorNumericField- numeric valuesBooleanField- true/falseDateField/DateTimeField- date pickersContentPickerField- reference to other content itemsMediaField- media library attachmentLinkField- URL with optional textTaxonomyField- taxonomy term selection
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?