foundry-vtt-dev
Builds, extends and migrates Foundry VTT v14 packages, both modules and game systems: manifests, documentTypes with TypeDataModel, ApplicationV2 sheets, hooks…
от 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
- Copy
boilerplate/module/. It builds with Vite:src/holds code,static/holdsmodule.json, templates and lang files, andbun run buildwrites a completedist/. - Set
idinstatic/module.json. It must match the folder name underData/modules/. - The entry point is
scripts/main.mjsindist/(fromsrc/main.mjs). Keepesmodulesand the VitefileNamein step. - Declare sub-types under
documentTypeswithout a prefix. Foundry prefixes them with the module id, soherobecomesmy-module.hero: registerCONFIG.Actor.dataModels["my-module.hero"]and sheets withtypes: ["my-module.hero"]. Readreferences/module-subtypes.md. - Symlink
dist/intoData/modules/<id>/, runbun run dev, enable the module in a world.bun run formatandbun run lintwork as shipped:biome.jsoncis whatbunx ultracite initwrites, plus the Foundry globals. - Load CSS through the manifest with
"layer": "modules". Readreferences/module-styling.md. - After every build, check that each path in
dist/module.jsonexists. A missingmodule.json, stylesheet or lang file fails silently in Foundry.
Building a system
- Copy
boilerplate/system/. The entry point isscripts/main.mjs, declared insystem.jsonesmodules. Runbun installandbun run build:cssto compilestyles/my-system.css, the stylesheetsystem.jsonlists. - Declare every type in
system.jsondocumentTypes(withhtmlFieldsandfilePathFieldsper sub-type), and give each aTypeDataModelinCONFIG.<Doc>.dataModels. System types carry no prefix. - Ship no
template.json. Release 14.352 put it into its deprecation period. Readreferences/system-manifest.mdbefore you move an old system off it. - Set
CONFIG.Actor.documentClassandCONFIG.Item.documentClassininit, and implementgetRollData()so@abilities.str.modresolves. - Keep static rules data in one
config.mjsassigned toCONFIG.MY_SYSTEM, and stage work acrossinit,i18nInit,setupandready. Readreferences/production-patterns.md. - Dice, combat and character creation each have a reference:
references/dice-system.md,references/combat-initiative.md,references/character-creation.md. - 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 withreturn 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":_deldeletes a key and_replace(value)assigns without merging. Release 14.365 calls them operators; the v14 API documents the classes infoundry.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
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- 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 запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
doc-coauthoring
AnthropicGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
academy-guide
AnthropicStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
internal-comms
AnthropicA set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
skill-development
AnthropicThis skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…