PuerTS Agent Development Guide
What it does
This skill is a guide for building AI agents with the PuerTsAgent framework in Unity. It is for game and app developers who want an LLM agent running inside their Unity project.
When to use it
- βWhen you want to create an LLM agent inside a Unity project with PuerTS.
- βWhen you need to set up the system prompt, skills or builtin modules for an agent.
- βWhen you want to check that the required PuerTS packages are installed before building an agent.
Skill link
https://github.com/Tencent/puerts/blob/master/unity/skills/puerts-agent-development/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βHelp me create an LLM agent in my Unity project that helps players, with its own system prompt and skills.β
5 new skills a week. 1 minute to read.
How it works
The skill checks that the required PuerTS packages are installed, then asks where the agent files should go in the Unity Resources folder. It then guides you through the prompt, skills and builtin modules, and the language choice for builtins.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
PuerTS Agent Development Guide
This skill provides the complete guide for developing LLM agents based on the PuerTsAgent framework.
β οΈ Important β Required Packages: This framework depends on PuerTS core, v8, and agent packages. Before proceeding, you must check the Unity project's
Packages/manifest.jsonto verify that the following packages are installed:
com.tencent.puerts.corecom.tencent.puerts.v8com.tencent.puerts.agentIf any of these packages are missing, they must be installed first before using this skill. you MUST first invoke the "Install PuerTS for Unity" skill to AUTO complete the setup.
β οΈ Prerequisite: Before using this skill to create or modify an agent, you must know the agent's resource directory path under Unity
Resources/(e.g.,maze-runner,editor-assistant). If the user has not provided this path, ask the user whichResources/subdirectory to use before proceeding. All agent files (system-prompt, skills, builtins) are organized under this path.
β οΈ Builtin Language Choice: When creating builtin modules, you must ask the user whether they want to write builtins in TypeScript or JavaScript:
- TypeScript β Create a dedicated TS project (with
package.json,tsconfig.json,esbuild.mjs) whose build output (outdir) points toAssets/Resources/<agent-name>/builtins/. See TypeScript Project Setup for Builtins section below.- JavaScript β Write
.mjsfiles directly inAssets/Resources/<agent-name>/builtins/.
Overview
In this framework, an agent's behavior and capabilities are entirely defined by files in a resource directory (Resource Root). Different resource directories represent different agents β Unity editor assistants, in-game AI characters, or any role you need.
Key Concept: Both
system-prompt.md.txtand files underskills/are essentially prompts (natural language instructions for the LLM). The only difference is their loading strategy:
system-prompt.md.txtβ Always present in context (persistent). Put prompts here that are needed for most tasks.skills/*.md.txtβ Loaded on demand by the LLM vialoadSkill. Put prompts here that are not needed for every task β they are loaded only when the LLM determines they are relevant.
Creating an Agent
Initialize an agent in C# via its resource path:
var agent = new AgentScriptManager();
agent.Initialize("maze-runner", () =>
{
Debug.Log("Maze runner agent is ready!");
});
The first parameter of Initialize is the resource directory path under Unity Resources/. The framework loads the full agent definition from this directory:
system-prompt.md.txtβ Role definition (System Prompt)skills/β Domain skill documents (loaded on demand, optional)builtins/β Built-in helper modules (executable JS modules)
Example Directory Structure
Resources/maze-runner/
βββ system-prompt.md.txt # Role definition (System Prompt)
βββ skills/ # Domain skills (loaded on demand, optional)
βββ builtins/ # Built-in modules (loaded on demand)
βββ maze-control.mjs # Maze movement and status query
βββ screenshot.mjs # Screenshot to observe the maze
All resource files are placed in Unity's Resources/ directory.
File extension convention: Unity
Resourcesdoes not support.mdand.mjsas TextAsset, so:
- Markdown files use
.md.txtsuffix- JS module files use
.mjssuffix
1. System Prompt β Role Definition
Purpose
system-prompt.md.txt defines the agent's identity, personality, capabilities, and behavioral rules. It is injected at the beginning of the LLM's system prompt and is the core of the agent's "persona."
This is a persistent prompt β it is always present in the LLM's context for every conversation turn. Therefore, put only the most frequently used instructions here β things the agent needs for the majority of its tasks. Avoid stuffing rarely-used domain knowledge here, as it permanently consumes context tokens.
File Location
<resource-root>/system-prompt.md.txt
Format
Plain text / Markdown format, write role definition directly, no front-matter needed.
Example β Editor A
FAQ
Which packages does it need?
It needs the PuerTS core, v8 and agent packages in the Unity project.
Can I write builtins in TypeScript?
Yes, the skill asks whether you want TypeScript or JavaScript for builtin modules.
Where do the agent files go?
They go in a folder under the Unity Resources directory that you choose.
Details
Original description by the author
Guide for developing LLM agents based on PuerTsAgent framework β covers resource directory structure, system-prompt, skills, builtin modules, and best practices.
repo: Tencent/puerts
Popularity
- GitHub stars
- 6.3k
- Ranking position
- #14378
- License
- β
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.