Pcg logo

Pcg

Community
kevinpbuckley
pcg

Create, inspect, and edit PCG Graph assets — add nodes, configure settings, connect pins, and wire procedural generation graphs (native PCG Python API). Use when the user asks to build a PCG graph, add PCG nodes (Surface Sampler, Static Mesh Spawner, filters), wire PCG pins, place a PCGVolume and generate, or set up procedural scattering.

Overview

Publisherkevinpbuckley
RepositoryVibeUE
Skill namepcg
Stars
735
Forks
161
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by kevinpbuckley on GitHub. Read the source before you install it.

Installation

Install the Pcg AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/pcg
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/kevinpbuckley/VibeUE.git /tmp/VibeUE
mkdir -p .claude/skills
cp -r /tmp/VibeUE/Content/Skills/pcg .claude/skills/pcg
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pcg in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pcg on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pcg is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

PCG Skill

PCG (Procedural Content Generation) in UE 5.7 is production-ready and fully scriptable via the PCGPythonInterop plugin. No VibeUE service wrapper is needed — the Python API is complete.

⚠️ Read this before writing any code

These are the mistakes that cause infinite retry loops. Check each one before executing:

Do not call discover_python_class or discover_python_function on any PCG class — this skill contains everything you need. Calling discover bloats context and causes content filter failures.

  1. Volume Sampler input pin is "Volume", not "In" — add_edge(input_node, 'In', sampler_node, 'Volume'). Using 'In' silently no-ops and produces 0 points.
  2. voxel_size is a Vector, not a float — set_editor_property('voxel_size', unreal.Vector(200, 200, 200)). Passing a float raises a TypeError.
  3. graph property on PCGComponent is protected — use pcg_comp.set_graph(graph), never set_editor_property('graph', ...).
  4. After modifying a graph, always: save → reload → reassign → generate — skipping reload means the component runs the old cached version.
  5. Check for existing nodes before adding — always inspect [type(n.get_settings()).__name__ for n in graph.nodes] first. Adding a node type that already exists creates duplicates that break wiring.
  6. Always save AND reload after every change — call save_asset then reload_packages every time. Without the reload the PCG graph editor window won't update and users will think nothing happened.
  7. Use Volume Sampler for empty levels, not Surface Sampler — Surface Sampler requires geometry to sample from. An empty level has no geometry, so Surface Sampler always produces 0 points. Use PCGVolumeSamplerSettings with unbounded=True for empty or sparse levels.
  8. Never spawn test actors to verify meshes or materials — do not use spawn_actor_from_class to place test cubes. Verify by checking ISM instance counts on the PCGVolume instead: sum(c.get_instance_count() for c in volume.get_components_by_class(unreal.InstancedStaticMeshComponent)).

⚠️ Prerequisites

Both plugins must be enabled in the project's .uproject:

json
{ "Name": "PCG", "Enabled": true },
{ "Name": "PCGPythonInterop", "Enabled": true }

Verify they're loaded before executing:

python
import unreal
assert hasattr(unreal, 'PCGGraph'), "PCG plugins not enabled — check .uproject"

Creating a PCG Graph Asset

python
import unreal

factory = unreal.PCGGraphFactory()
asset_tools = unreal.AssetToolsHelpers.get_asset_tools()
graph = asset_tools.create_asset('MyPCGGraph', '/Game/PCG', unreal.PCGGraph, factory)
unreal.EditorAssetLibrary.save_asset('/Game/PCG/MyPCGGraph')

Loading an Existing PCG Graph

python
import unreal

graph = unreal.EditorAssetLibrary.load_asset('/Game/PCG/MyPCGGraph')
# graph is a PCGGraph — access nodes, input_node, output_node directly

Or search first with the Asset Registry (or Epic's AssetTools toolset):

python
ar = unreal.AssetRegistryHelpers.get_asset_registry()
hits = ar.get_assets_by_class(unreal.TopLevelAssetPath("/Script/PCG", "PCGGraph"))

⚠️ PCGGraph.is_standalone_graph is deprecated (issue #465) — it logs a deprecation warning in 5.8. Use the graph's GraphUsageContext / usage flags instead of is_standalone_graph to tell a top-level graph from a subgraph.

Adding Nodes

Use add_node_of_type(SettingsClass) — returns a (PCGNode, PCGSettings) tuple. All Settings classes are direct attributes of the unreal module — no find_class needed:

python
import unreal

# Surface Sampler node
node, settings = graph.add_node_of_type(unreal.PCGSurfaceSamplerSettings)
settings.set_editor_property('points_per_squared_meter', 5.0)
settings.set_editor_property('point_extents', unreal.Vector(50, 50, 50))
node.set_node_position(200, 0)

# Static Mesh Spawner node
spawner_node, spawner_settings = graph.add_node_of_type(unreal.PCGStaticMeshSpawnerSettings)
spawner_node.set_node_position(500, 0)

Settings can also be read/written after creation via node.get_settings():

python
settings = node.get_settings()
settings.set_editor_property('unbounded', True)
print(settings.get_editor_property('points_per_squared_meter'))

Identifying Nodes

node.get_editor_property('node_title') is None by default. Identify nodes by their settings class:

python
for node in graph.nodes:
    print(type(node.get_settings()).__name__)

Note: the nodes array does not include the graph's Input and Output nodes. Access those via graph.get_input_node() and graph.get_output_node().

Discovering Available Node Types

python
import unreal
node_types = sorted([x for x in dir(unreal) if x.endswith('Settings') and 'PCG' in x])
print(node_types)

Task Index

TaskSub-docSample script
Create / load a PCG graph(above)scripts/build_pcg_graph.txt
Add / identify / discover nodes(above)scripts/build_pcg_graph.txt
Connect pins / position / removeworkflows.mdscripts/build_pcg_graph.txt
Place a PCGVolume and generateworkflows.md → Placing a PCGVolume—
Surface Sampler → Mesh Spawnerworkflows.md → Full Example—
Settings property names / SMS configreference.md—

Sub-docs

  • workflows.md — pin inspection/connection, node positioning/removal, editor notify, save/delete, placing a PCGVolume + generating, the full surface-sampler→mesh-spawner example, subgraphs.
  • reference.md — settings property names, lowercase struct properties, Static Mesh Spawner config, common node settings classes.

Sample scripts (run via execute_python_code)

  • scripts/build_pcg_graph.txt — create a PCG graph and add Surface Sampler + Static Mesh Spawner nodes (native PCG API).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pcg AI skill do?

Create, inspect, and edit PCG Graph assets — add nodes, configure settings, connect pins, and wire procedural generation graphs (native PCG Python API). Use when the user asks to build a PCG graph, add PCG nodes (Surface Sampler, Static Mesh Spawner, filters), wire PCG pins, place a PCGVolume and generate, or set up procedural scattering.

Why use Pcg on TypingMind?

Because you install it once and use it with any model. Pcg is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pcg in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/kevinpbuckley/VibeUE/tree/master/Content/Skills/pcg. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pcg?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pcg?

As many as you like. As long as a model supports skills, you can use Pcg with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pcg AI skill free?

Yes. It is published on GitHub by kevinpbuckley under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇