theming

Use when an app uses @pierre/theming to list, resolve, select, switch, persist, or apply themes, including color modes, theme controllers, React state, UI colors, and bundled Pierre or Shiki collections.

Install
npx skills add 'https://github.com/pierrecomputer/pierre/tree/main/skills/theming'
Download bundle ↓
main · 1831817Scanned 2026-09-15

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗
View on GitHub
← Back to SKILL.md

Collections API

This reference covers collection APIs from @pierre/theming and all exports from @pierre/theming/themes.

@pierre/theming exports

ExportKindPurpose
createThemeCollectionFunctionCreates an immutable ordered set of theme descriptors.
ThemeCollectionTypeDefines collection queries, transforms, and resolver registration.
ThemeCollectionComparatorTypeCompares two descriptors for orderBy.
ThemeCollectionEntryTypeAccepts one descriptor or collection source.
ThemeCollectionFilterTypeFilters by collection and colorScheme.
ThemeCollectionInputTypeAccepts one entry or an iterable of entries.
ThemeCollectionSourceTypeDefines an object that returns theme descriptors.
ThemeDescriptorTypeDescribes one named theme and its lazy loader.
createThemeCatalogFunctionCreates a collection with default light and dark theme names.
ThemeCatalogTypeAdds default theme names to ThemeCollection.

ThemeDescriptor fields

FieldPurpose
nameStores the stable theme identifier.
loadLoads the theme object.
colorSchemeLabels the descriptor as light or dark.
collectionGroups related themes.
displayNameSupplies a user-facing label.

ThemeCollection methods

MethodPurpose
getTheme(name)Gets one descriptor by name.
getThemes(filter?)Lists descriptors that match an optional filter.
getThemeNames(filter?)Lists names that match an optional filter.
hasTheme(name)Tests whether the collection has a name.
orderBy(compare)Returns a new collection in comparator order.
pick(names)Returns a new collection in the supplied name order.
registerInto(resolver)Adds every descriptor loader to a resolver.

ThemeCatalog fields

FieldPurpose
defaultLightThemeNameNames the initial light theme.
defaultDarkThemeNameNames the initial dark theme.

@pierre/theming/themes exports

ExportKindPurpose
themesValueCombines the Pierre and Shiki collections in stable order.
pierreThemesValueProvides lazy descriptors for the ten Pierre themes.
shikiThemesValueProvides lazy descriptors for the bundled Shiki themes.
createThemeFunctionCreates a descriptor whose loader normalizes a raw Shiki or VS Code theme.
CreateThemeOptionsTypeDefines the name, loader, and optional descriptor metadata for createTheme.

Use createTheme for a raw Shiki or VS Code theme. Use a ThemeDescriptor directly when the loader already returns a compatible ThemeLike object.

Referenced from SKILL.md