general-create-repository

Creates Umbraco backoffice repositories and server data sources for detail, item, collection, and action-specific operations.

5.2k|2.9k|Updated Jun 10, 2013
One-click install
npx skills add https://github.com/umbraco/Umbraco-CMS --skill general-create-repository
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: general-create-repository
Source: https://github.com/umbraco/Umbraco-CMS/tree/main/src/Umbraco.Web.UI.Client/.claude/skills/general-create-repository
Command: npx skills add https://github.com/umbraco/Umbraco-CMS --skill general-create-repository

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Building data access layers in the Umbraco backoffice requires wiring together repositories, stores, data sources, context tokens, and extension manifests with strict conventions. This Skill generates the complete, correctly structured repository implementation so developers avoid boilerplate errors and inconsistent patterns.

Core Features & Use Cases

  • Four Repository Templates: Generates detail (CRUD with store caching), item (batch lookup for pickers), collection (paginated lists), and action-specific (publish, duplicate, move) repositories.
  • Full File Scaffolding: Produces the repository class, server data source, store, context token, constants, and manifests files following Umbraco naming and folder conventions.
  • Extension Registration: Wires repository and store manifests into the parent module so the backoffice can lazy-load them.
  • Use Case: When adding a new webhook feature to the Umbraco backoffice, use this Skill to scaffold the entire detail repository stack — store, data source mapping server API types to domain models, and manifest registration — in one pass.

Quick Start

Ask the assistant to create a detail repository for the webhook entity in the webhook package, providing the entity name, repository type, and package path.

Frequently Asked Questions about general-create-repository

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a repository in the Umbraco backoffice?

Choose the repository type (detail, item, collection, or action-specific), then create the server data source, repository class, store with context token, constants, and manifests files. Register the manifests in the parent module so the backoffice can lazy-load the repository API.

Which Umbraco repository type should I use for my feature?

Use a detail repository for full CRUD with store caching, an item repository for batch-fetching lightweight display info by IDs, a collection repository for paginated listings, and an action-specific repository for operations like publish, duplicate, or move that do not fit CRUD.

What base classes do Umbraco repositories extend?

Detail repositories extend UmbDetailRepositoryBase, item repositories extend UmbItemRepositoryBase, and collection or action-specific repositories extend UmbRepositoryBase. Collection repositories additionally implement the UmbCollectionRepository interface.

How does the Umbraco data source map server API responses?

The server data source calls the generated backend API service through tryExecute, then maps response models to domain models with entityType and unique fields. For detail repositories it maps in both directions, converting domain models into request bodies for create and update calls.

Why is my Umbraco repository not loading in the backoffice?

The repository must be exported as api for lazy-loading and registered in a manifests file with type 'repository' and a unique alias constant. The manifests must also be spread into the parent module's manifests array, otherwise the extension is never registered.