I’ve been using AI tools (agents, like Amp, Codex, Claude) with Defold heavily lately. I noticed that for every new Defold project, I kept creating a new AGENTS.md file and defining the same set of skills/instructions for the AI over and over again.
To save time and stop repeating myself, I decided to start collecting these configurations into a single repository and share with the community.
AGENTS.md: Context specifically for the Defold game projects.
Skills: A set of reusable skills for the AI.
Skill
Description
defold-api-fetch
Fetches Defold engine API documentation
defold-assets-search
Searches the Defold Asset Store for community libraries and extensions
defold-docs-fetch
Fetches Defold manuals and conceptual documentation
defold-examples-fetch
Fetches Defold code examples by topic
defold-native-extension-editing
Assists with native extension development (C/C++, JS, manifests)
defold-project-build
Builds the project via the running Defold editor
defold-project-setup
Downloads project dependencies into .deps/ (hidden from the IDE!) to be used by AI agent
defold-proto-file-editing
Creates and edits Defold Protobuf Text Format files
defold-scripts-editing
Assists with Lua script editing
defold-skill-maintain
Maintains and updates skill definitions
defold-shaders-editing
Creates and edits Defold shader files (.vp, .fp, .glsl)
monarch-screen-setup
Sets up screens and popups using Monarch screen manager
I hope this helps anyone else looking to speed up their workflow with AI assistance. Feel free to submit PRs or suggestions!
P.S. This repository also includes an editor script for generating convex 2D collision shapes from images. It will be extracted into a separate library in the future.
The most essential skill here is defold-project-setup. It includes a Python script that downloads all your project dependencies into a .deps folder (hidden from Defold via .defignore) and fetches the latest version of /builtins from the engine. This allows the AI agent to “see” the entire project, including all external files and library code.
I think this could actually be a feature request for Defold, i.e. it would be great if the engine had a built-in mechanism to automatically sync dependencies and builtins (which is the most important part!) into a directory like .internal/deps/.... This would be incredibly useful for external IDEs and AIs.
Yep, we are in fact discussing this! I couldn’t find a feature request specifically for this (please create one!), but it came up last week in a team meeting.
In the project, I started making a vibe-coded-only game (the game_catch_me screen) based on the mechanics of an old Flash game where a little guy tried to catch your cursor and eat it. I didn’t quite finish it and will get back to it later – just ran out of credits in the AI agent for today
I decided to split the skill for the Defold documentation into three sections with direct links to the documents as separate *-fetch skills. Apparently, this works much better than just giving the link to https://defold.com/llms.txt and letting it sort things out itself. Especially for less capable agents like Warp, compared to Claude/Codex/Cursor.
And one more thing: all these skills and the AGENTS.md file themselves are not a 100% working tool or an instruction manual, but a very subjective thing. So if you’re curious - give it a try! And if something doesn’t work as expected, ask the agent to refine the skill and make a PR (preferably right from your AI agent’s console - that’s the most fun part!!).
Added a new defold-shaders-editing skill that covers creating and editing Defold shader files (.vp , .fp , .glsl ). It includes modern GLSL (#version 140) syntax rules and more info in a minimal form to not to duplicate official docs, but to give an agent proper direction of their thoughts.
I don’t have the ability to check all the agents since this isn’t a commercial product. You just need to add the files to the project following the instructions in the README and then ask your AI about them - if it doesn’t see them, ask it to fix that.
Added parent transform caveat for dynamic collision objects.
Added physics caveats for raycasts to the .script reference.
Added xmath-usage skill for the Xmath extension.
Added a small note to the defold-api-fetch skill that Extension APIs (extension-*) require the corresponding extension to be added as a dependency in game.project.
Added runtime environment notes to the defold-scripts-editing skill (applies to .script, .gui_script, .render_script):
html5 module is only available on the HTML5 platform.
Some built-in modules (liveupdate, image, types, profiler, sound, physics, etc.) can be excluded via the App Manifest.
Defold’s Lua 5.1 / LuaJIT has no utf8 module — recommends using the defold-utf8 dependency for non-ASCII string handling.
Added a new skill: defold-assets-search - searches for existing libraries and extensions before writing custom code.
How it works:
A Python script downloads the latest data from the @Insality Asset Store JSON index and generates a compact TSV file with all dependencies (sorted by stars).
The agent searches this index by keywords and synonyms (e.g., “RNG” also searches “random”), then presents the top candidates to the user.
If available, the agent can fetch docs before recommending them.
Includes a Community defaults section (here I added my own best picks, plus a note that the built-in camera is sufficient).
Reminder, again - this is not the final version of the skill(s). I’m trying to transfer into skills the things I constantly do manually - like picking the right asset for a task - so hopefully this kind of automation will be useful for others too
One more thing, if you add .deps/ to .gitignore (to avoid committing downloaded dependencies), AI agents will ignore it by default - their internal tools (Glob, Grep, file picker etc) respect .gitignore.
Ironically, many agents treat node_modules in JS/TS projects as a special case and still index it, as far as I know; .deps in Defold projects gets no such favor. To make agents see .deps while keeping it out of git - follow the new section in README in the repo!
I was testing it for a while with Codex CLI and it is amazing. Previously, it had problems writing a proper .gui or .collection file without mismatching format and making some other mistakes in Defold specific files, causing even Editor to stop working with such broken files, so I was always telling not modify any of those files. But with these agents and all those skills it is way better, only tasked to make a monarch screen with sample inventory GUI with Druid set up, it manages to nail everything, creating all Defold files, setting nodes, their positions, etc. It’s barebone, nothing’s there, but the prompts were just lazy to test it, yet effect surprised me. And during the process it used newest command options and build the Defold from CLI, analyzed results, corrected all mistakes, in a loop, until it was done.
Maybe half a day of work in few minutes, with me doing something completely different in the meanwhile? If only I hadn’t built a whole inventory system from scratch a long time ago
If you hadn’t you wont be this good today.
You wont be able to understand if the AI’s work is good or bad. Cant use a tool right if you’re not competent.