Command Palette

Search for a command to run...

Назад к скиллам
скилл № 23107

foundry-vtt-dev

Builds, extends and migrates Foundry VTT v14 packages, both modules and game systems: manifests, documentTypes with TypeDataModel, ApplicationV2 sheets, hooks…

БесплатноЗапускает вложенные скрипты
fcsouzaот fcsouza★ 29 звёзд на GitHub

Установить foundry-vtt-dev в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Foundry VTT development (v14)

A package is either a module (extends any world) or a system (defines the rules: Actor and Item types, dice, combat, sheets). Both share the same document model, application framework, hooks and v14 changes. This file holds the decisions; references/ holds the detail.

The current stable build is 14.371 (November 26, 2026), a security release with breaking changes: read "Breaking changes in 14.371" in references/v14-migration.md. Check names against the v14 API docs, https://foundryvtt.com/api/v14/, before you rely on them. Foundry publishes no llms.txt or agent skill. Coming from v13? Read references/v14-migration.md first.

Building a module

  1. Copy boilerplate/module/. It builds with Vite: src/ holds code, static/ holds module.json, templates and lang files, and bun run build writes a complete dist/.
  2. Set id in static/module.json. It must match the folder name under Data/modules/.
  3. The entry point is scripts/main.mjs in dist/ (from src/main.mjs). Keep esmodules and the Vite fileName in step.
  4. Declare sub-types under documentTypes without a prefix. Foundry prefixes them with the module id, so hero becomes my-module.hero: register CONFIG.Actor.dataModels["my-module.hero"] and sheets with types: ["my-module.hero"]. Read references/module-subtypes.md.
  5. Symlink dist/ into Data/modules/<id>/, run bun run dev, enable the module in a world. bun run format and bun run lint work as shipped: biome.jsonc is what bunx ultracite init writes, plus the Foundry globals.
  6. Load CSS through the manifest with "layer": "modules". Read references/module-styling.md.
  7. After every build, check that each path in dist/module.json exists. A missing module.json, stylesheet or lang file fails silently in Foundry.

Building a system

  1. Copy boilerplate/system/. The entry point is scripts/main.mjs, declared in system.json esmodules. Run bun install and bun run build:css to compile styles/my-system.css, the stylesheet system.json lists.
  2. Declare every type in system.json documentTypes (with htmlFields and filePathFields per sub-type), and give each a TypeDataModel in CONFIG.<Doc>.dataModels. System types carry no prefix.
  3. Ship no template.json. Release 14.352 put it into its deprecation period. Read references/system-manifest.md before you move an old system off it.
  4. Set CONFIG.Actor.documentClass and CONFIG.Item.documentClass in init, and implement getRollData() so @abilities.str.mod resolves.
  5. Keep static rules data in one config.mjs assigned to CONFIG.MY_SYSTEM, and stage work across init, i18nInit, setup and ready. Read references/production-patterns.md.
  6. Dice, combat and character creation each have a reference: references/dice-system.md, references/combat-initiative.md, references/character-creation.md.
  7. Systems carry most CSS in a world. Read references/styling-and-themes.md.

Lifecycle

Hook Ready to use Do here
init CONFIG, game.settings.register data models, document classes, sheets, settings, CONFIG.queries, status effects, change types
setup every package has run init work that depends on other packages, enrichers
ready game.user, game.actors, canvas migrations, GM-only side effects

game.user is not set in init. Read references/hooks-and-settings.md.

Data model

  • TypeDataModel.defineSchema() gives fields, defaults (initial), validation and inheritance. Shared fields go in a base class.
  • prepareDerivedData() computes in memory. Never write to the database there.
  • static migrateData(source, options) renames and reshapes raw data on every load and must return it: end with return super.migrateData(source, options).
  • Flags store module data on any document: actor.setFlag("my-module", "key", value).
  • Delete or replace keys with the operator globals, not "-=key" or "==key": _del deletes a key and _replace(value) assigns without merging. Release 14.365 calls them operators; the v14 API documents the classes in foundry.data.operators (ForcedDeletion, ForcedReplacement).

Read references/document-model.md and references/actor-item-classes.md.

Applications

Build every window on HandlebarsApplicationMixin(ApplicationV2), and sheets on ActorSheetV2 / ItemSheetV2 from foundry.applications.sheets. The AppV1 classes under foundry.appv1 are deprecated. Rich text is ProseMirror only. Read references/application-v2.md, references/handlebars-and-templates.md and references/accessibility.md. Old global names (Actors, DocumentSheetConfig) redirect until Version 15; read references/namespaces.md for the namespaced paths.

Player actions the GM must perform

A player can update documents they own. For anything else (damage to a monster, an item moved between players), ask the active GM and let the GM check the reque

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • boilerplate/module/.gitignore
  • boilerplate/module/biome.jsonc
  • boilerplate/module/package.json
  • boilerplate/module/src/actor-sheet.mjs
  • boilerplate/module/src/main.mjs
  • boilerplate/module/src/socket-handler.mjs
  • boilerplate/module/src/type-data-model.mjs
  • boilerplate/module/static/lang/en.json
  • boilerplate/module/static/module.json
  • boilerplate/module/static/styles/my-module.css
  • boilerplate/module/static/templates/sheet.hbs
  • boilerplate/module/vite.config.mjs
  • boilerplate/system/lang/en.json
  • boilerplate/system/package.json
  • boilerplate/system/scripts/actor.mjs
  • boilerplate/system/scripts/config.mjs
  • boilerplate/system/scripts/data/_module.mjs
  • boilerplate/system/scripts/data/character-data.mjs
  • boilerplate/system/scripts/data/npc-data.mjs
  • boilerplate/system/scripts/data/spell-data.mjs
  • boilerplate/system/scripts/data/weapon-data.mjs
  • boilerplate/system/scripts/documents/_module.mjs
  • boilerplate/system/scripts/item.mjs
  • boilerplate/system/scripts/main.mjs
  • boilerplate/system/scripts/migration.mjs
  • boilerplate/system/scripts/settings.mjs
  • boilerplate/system/scripts/sheets/_module.mjs
  • boilerplate/system/scripts/sheets/character-sheet.mjs
  • boilerplate/system/scripts/sheets/item-sheet.mjs
  • boilerplate/system/styles/my-system.less
  • boilerplate/system/styles/v2/apps.less
  • boilerplate/system/styles/v2/character.less
  • boilerplate/system/styles/v2/chat.less
  • boilerplate/system/styles/v2/items.less
  • boilerplate/system/styles/v2/sheets.less
  • boilerplate/system/styles/v2/typography.less
  • boilerplate/system/styles/variables/base.less
  • boilerplate/system/styles/variables/dark.less
  • boilerplate/system/styles/variables/light.less
  • boilerplate/system/system.json

FAQ

Что делает скилл foundry-vtt-dev?

Builds, extends and migrates Foundry VTT v14 packages, both modules and game systems: manifests, documentTypes with TypeDataModel, ApplicationV2 sheets, hooks and settings, GM-checked queries and sockets, dice and message modes, Active Effects V2, status effects, Regions as templates, Scene Levels, compendium packs, world migrations and the Vite build. Use when writing or fixing a Foundry module or system, porting one from v13 to v14, or shipping a release to the Foundry package list.

Как установить скилл foundry-vtt-dev?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл foundry-vtt-dev запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить foundry-vtt-dev с