claude-code-arcane 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +131 -41
  3. package/agents/game/ue-blueprint-specialist.md +125 -0
  4. package/agents/game/ue-gas-specialist.md +133 -0
  5. package/agents/game/ue-umg-specialist.md +131 -0
  6. package/dist/cli.js +642 -478
  7. package/docs/SKILLS-CATALOG.md +42 -3
  8. package/docs/USER-GUIDE.md +28 -54
  9. package/hooks/detect-unreal.sh +90 -0
  10. package/package.json +2 -1
  11. package/profiles/agile.yaml +1 -1
  12. package/profiles/ai.yaml +1 -1
  13. package/profiles/android-native.yaml +1 -1
  14. package/profiles/audio.yaml +1 -1
  15. package/profiles/backend-dotnet.yaml +1 -1
  16. package/profiles/backend-go.yaml +1 -1
  17. package/profiles/backend-nestjs.yaml +1 -1
  18. package/profiles/backend-nextjs.yaml +1 -1
  19. package/profiles/backend-ts.yaml +1 -1
  20. package/profiles/business.yaml +1 -1
  21. package/profiles/clevel.yaml +1 -1
  22. package/profiles/clickup.yaml +1 -1
  23. package/profiles/core.yaml +1 -1
  24. package/profiles/database.yaml +1 -1
  25. package/profiles/design.yaml +1 -1
  26. package/profiles/docs.yaml +1 -1
  27. package/profiles/ecommerce.yaml +1 -1
  28. package/profiles/finance.yaml +1 -1
  29. package/profiles/flutter.yaml +1 -1
  30. package/profiles/freelance.yaml +1 -1
  31. package/profiles/frontend.yaml +1 -1
  32. package/profiles/infra.yaml +1 -1
  33. package/profiles/integrations.yaml +1 -1
  34. package/profiles/ios-native.yaml +1 -1
  35. package/profiles/jira.yaml +1 -1
  36. package/profiles/job-hunt.yaml +1 -1
  37. package/profiles/marketing.yaml +1 -1
  38. package/profiles/mobile.yaml +1 -1
  39. package/profiles/regulatory.yaml +1 -1
  40. package/profiles/second-brain.yaml +1 -1
  41. package/profiles/security.yaml +1 -1
  42. package/profiles/self-improving.yaml +1 -1
  43. package/profiles/statusline.yaml +1 -1
  44. package/profiles/testing.yaml +1 -1
  45. package/profiles/unity-design.yaml +1 -1
  46. package/profiles/unity-dev.yaml +1 -1
  47. package/profiles/unreal-dev.yaml +97 -0
  48. package/profiles/visual-novel.yaml +1 -1
  49. package/rules/gamedev/unreal-code.md +125 -0
  50. package/skills/arcane-list/SKILL.md +12 -7
  51. package/skills/install-mcp/SKILL.md +135 -46
  52. package/skills/install-mcp/references/unreal-operations.md +55 -0
  53. package/skills/ue-actor-component-architecture/SKILL.md +509 -0
  54. package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
  55. package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
  56. package/skills/ue-ai-navigation/SKILL.md +526 -0
  57. package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
  58. package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
  59. package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
  60. package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
  61. package/skills/ue-animation-system/SKILL.md +521 -0
  62. package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
  63. package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
  64. package/skills/ue-async-threading/SKILL.md +433 -0
  65. package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
  66. package/skills/ue-async-threading/references/threading-patterns.md +345 -0
  67. package/skills/ue-audio-system/SKILL.md +527 -0
  68. package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
  69. package/skills/ue-blueprints/SKILL.md +134 -0
  70. package/skills/ue-blueprints/references/communication.md +82 -0
  71. package/skills/ue-character-movement/SKILL.md +475 -0
  72. package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
  73. package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
  74. package/skills/ue-cpp-foundations/SKILL.md +533 -0
  75. package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
  76. package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
  77. package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
  78. package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
  79. package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
  80. package/skills/ue-data-assets-tables/SKILL.md +527 -0
  81. package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
  82. package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
  83. package/skills/ue-editor-tools/SKILL.md +523 -0
  84. package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
  85. package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
  86. package/skills/ue-game-features/SKILL.md +477 -0
  87. package/skills/ue-game-features/references/experience-system.md +222 -0
  88. package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
  89. package/skills/ue-gameplay-abilities/SKILL.md +518 -0
  90. package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
  91. package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
  92. package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
  93. package/skills/ue-gameplay-framework/SKILL.md +466 -0
  94. package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
  95. package/skills/ue-input-system/SKILL.md +394 -0
  96. package/skills/ue-input-system/references/cpp-setup.md +131 -0
  97. package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
  98. package/skills/ue-input-system/references/input-action-reference.md +731 -0
  99. package/skills/ue-mass-entity/SKILL.md +476 -0
  100. package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
  101. package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
  102. package/skills/ue-materials-rendering/SKILL.md +526 -0
  103. package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
  104. package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
  105. package/skills/ue-module-build-system/SKILL.md +487 -0
  106. package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
  107. package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
  108. package/skills/ue-naming-conventions/SKILL.md +142 -0
  109. package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
  110. package/skills/ue-naming-conventions/references/content-structure.md +83 -0
  111. package/skills/ue-networking-replication/SKILL.md +452 -0
  112. package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
  113. package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
  114. package/skills/ue-niagara-effects/SKILL.md +531 -0
  115. package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
  116. package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
  117. package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
  118. package/skills/ue-packaging/SKILL.md +116 -0
  119. package/skills/ue-physics-collision/SKILL.md +423 -0
  120. package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
  121. package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
  122. package/skills/ue-procedural-generation/SKILL.md +505 -0
  123. package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
  124. package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
  125. package/skills/ue-project-context/SKILL.md +305 -0
  126. package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
  127. package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
  128. package/skills/ue-serialization-savegames/SKILL.md +524 -0
  129. package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
  130. package/skills/ue-state-trees/SKILL.md +489 -0
  131. package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
  132. package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
  133. package/skills/ue-testing-debugging/SKILL.md +520 -0
  134. package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
  135. package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
  136. package/skills/ue-ui-umg-slate/SKILL.md +431 -0
  137. package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
  138. package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
  139. package/skills/ue-world-level-streaming/SKILL.md +518 -0
  140. package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
  141. package/templates/gamedev/unreal-project-context.md +107 -0
@@ -0,0 +1,357 @@
1
+ # Profiling Commands & Unreal Insights
2
+
3
+ Reference for stat commands, Unreal Insights capture, custom profiling markers, CSV telemetry, and performance analysis workflow.
4
+
5
+ ---
6
+
7
+ ## Built-in Stat Commands
8
+
9
+ All `stat` commands are typed into the in-game console (`~`) or passed via `-ExecCmds` on the command line.
10
+
11
+ ### Frame & CPU
12
+
13
+ | Command | Description |
14
+ |---|---|
15
+ | `stat fps` | Frame rate and frame time overlay |
16
+ | `stat unit` | Game, Draw, GPU, Frame times in ms |
17
+ | `stat unitgraph` | Rolling graph of unit timings |
18
+ | `stat game` | Game thread breakdown: Tick, Actors, Components |
19
+ | `stat engine` | Engine-level counters |
20
+ | `stat tasks` | Async task system occupancy |
21
+ | `stat threads` | Per-thread CPU times |
22
+ | `stat slate` | Slate UI widget tick cost |
23
+ | `stat scenerendering` | Scene rendering draw calls and primitives |
24
+ | `stat initviews` | Visibility / frustum culling cost |
25
+
26
+ ### Memory
27
+
28
+ | Command | Description |
29
+ |---|---|
30
+ | `stat memory` | High-level memory categories |
31
+ | `stat memoryplatform` | OS-level virtual / physical memory |
32
+ | `stat streaming` | Texture and mesh streaming stats |
33
+ | `stat streamingdetails` | Per-resource streaming detail |
34
+ | `memreport` | Full memory dump to `Saved/Profiling/MemReports/` |
35
+ | `memreport -full` | Extended dump including asset registry |
36
+ | `obj list class=Texture2D` | Count and size of all loaded Texture2D objects |
37
+ | `obj list class=StaticMesh sortby=size` | Mesh objects sorted by memory |
38
+
39
+ ### GPU
40
+
41
+ | Command | Description |
42
+ |---|---|
43
+ | `stat gpu` | Per-pass GPU time overlay (requires GPU timing support) |
44
+ | `ProfileGPU` | Single-frame GPU capture, opens in RenderDoc-style viewer |
45
+ | `r.ProfileGPU.Pattern *` | Set capture pattern (default `*` = everything) |
46
+ | `r.GPUBusyWait 1` | Force busy-wait timing for more accurate GPU stats |
47
+
48
+ ### Networking
49
+
50
+ | Command | Description |
51
+ |---|---|
52
+ | `stat net` | Network channel counts, saturation, packet loss |
53
+ | `stat netdetailed` | Per-actor replication bandwidth |
54
+ | `net.Stats 1` | Enable network stats overlay |
55
+
56
+ ---
57
+
58
+ ## Capturing Stats to File
59
+
60
+ ### .uestats Capture (Legacy)
61
+
62
+ ```
63
+ # In-game console
64
+ stat startfile # starts recording to Saved/Profiling/
65
+ stat stopfile # stops and writes the .uestats file
66
+
67
+ # Open in: UnrealEditor > Window > Session Frontend > Profiler tab
68
+ # Or use deprecated StatsViewer commandlet
69
+ ```
70
+
71
+ ### Command-Line Automated Capture
72
+
73
+ ```bash
74
+ # Capture for 10 seconds then exit
75
+ UnrealEditor-Cmd MyGame -game \
76
+ -ExecCmds="stat startfile, delay 10, stat stopfile, quit" \
77
+ -log
78
+ ```
79
+
80
+ ---
81
+
82
+ ## Unreal Insights
83
+
84
+ Unreal Insights replaces the legacy profiler for CPU, GPU, memory, and network trace analysis.
85
+
86
+ ### Starting a Trace
87
+
88
+ ```bash
89
+ # Attach Insights at launch (preferred for full coverage)
90
+ UnrealEditor MyGame \
91
+ -trace=cpu,gpu,frame,memory,loadtime,log,bookmark \
92
+ -tracehost=127.0.0.1 # send to local Insights recorder
93
+ # or -tracefile=MyCapture.utrace to write directly to disk
94
+
95
+ # Insight trace channels
96
+ # cpu — CPU thread events and named events
97
+ # gpu — GPU pass timings (requires RHI support)
98
+ # frame — per-frame markers
99
+ # memory — LLM allocation tracking
100
+ # loadtime — asset and package load timings
101
+ # log — UE_LOG lines embedded in timeline
102
+ # bookmark — UE_TRACE_BOOKMARK calls
103
+ # task — Task Graph tasks
104
+ # rhicommands — RHI command list
105
+ ```
106
+
107
+ ### Runtime Console Commands
108
+
109
+ ```
110
+ # Start trace mid-session
111
+ Trace.Start cpu,frame,gpu
112
+
113
+ # Stop trace
114
+ Trace.Stop
115
+
116
+ # Bookmark (appears as vertical line in Insights timeline)
117
+ Trace.Bookmark "LevelLoaded"
118
+ ```
119
+
120
+ ### Opening Insights
121
+
122
+ ```bash
123
+ # Launch the standalone Insights app
124
+ Engine/Binaries/Win64/UnrealInsights.exe
125
+
126
+ # Open a .utrace file directly
127
+ UnrealInsights.exe MyCapture.utrace
128
+ ```
129
+
130
+ Key Insights views:
131
+
132
+ - **Timing Insights** — CPU/GPU flame chart, thread rows
133
+ - **Memory Insights** — allocation timeline, LLM categories
134
+ - **Asset Loading** — package load waterfall
135
+ - **Networking** — connection bandwidth and packet timeline
136
+
137
+ ---
138
+
139
+ ## Custom Profiling Markers
140
+
141
+ ### SCOPE_CYCLE_COUNTER
142
+
143
+ Links to the stat system (visible in `stat MyGame` overlay and Insights).
144
+
145
+ ```cpp
146
+ // In a .cpp file — one DECLARE per stat, referenced anywhere in the module
147
+ DECLARE_STATS_GROUP(TEXT("MyGame"), STATGROUP_MyGame, STATCAT_Advanced);
148
+ DECLARE_CYCLE_STAT(TEXT("InventoryTick"), STAT_InventoryTick, STATGROUP_MyGame);
149
+ DECLARE_CYCLE_STAT(TEXT("PathFinder"), STAT_PathFinder, STATGROUP_MyGame);
150
+ DECLARE_CYCLE_STAT(TEXT("AbilityResolve"), STAT_AbilityResolve, STATGROUP_MyGame);
151
+
152
+ // Usage
153
+ void UInventoryComponent::TickComponent(float DeltaTime, ...)
154
+ {
155
+ SCOPE_CYCLE_COUNTER(STAT_InventoryTick);
156
+ // ...
157
+ }
158
+ ```
159
+
160
+ ### SCOPED_NAMED_EVENT
161
+
162
+ Shows as a colored block in Insights without stat overhead.
163
+
164
+ ```cpp
165
+ #include "HAL/PlatformMisc.h"
166
+
167
+ void UMySystem::ProcessBatch()
168
+ {
169
+ SCOPED_NAMED_EVENT(MySystem_ProcessBatch, FColor::Orange);
170
+ for (auto& Item : Batch)
171
+ {
172
+ SCOPED_NAMED_EVENT_TEXT("ItemProcess", FColor::Yellow);
173
+ Process(Item);
174
+ }
175
+ }
176
+ ```
177
+
178
+ ### UE_TRACE_BOOKMARK
179
+
180
+ Places a labelled vertical marker in the Insights timeline.
181
+
182
+ ```cpp
183
+ #include "ProfilingDebugging/TraceAuxiliary.h" // or use Trace.Bookmark in console
184
+
185
+ UE_TRACE_BOOKMARK(TEXT("WaveStarted_%d"), WaveNumber);
186
+ ```
187
+
188
+ ---
189
+
190
+ ## CSV Profiling
191
+
192
+ CSV profiling writes lightweight, always-on telemetry to `Saved/Profiling/CSVStats/`. Enable with `-csvstatfile` or the auto-started profiler.
193
+
194
+ ```cpp
195
+ #include "ProfilingDebugging/CsvProfiler.h"
196
+
197
+ // Declare category once per module
198
+ CSV_DEFINE_CATEGORY(MyGame, true); // true = enabled by default
199
+
200
+ // Timing stat in a function (duration captured each frame)
201
+ void UMySystem::Tick(float DeltaTime)
202
+ {
203
+ CSV_SCOPED_TIMING_STAT(MyGame, SystemTick);
204
+ // ...
205
+ }
206
+
207
+ // Custom scalar value
208
+ void UMySystem::PostSpawn()
209
+ {
210
+ CSV_CUSTOM_STAT(MyGame, ActiveEnemies, ActiveEnemyCount, ECsvCustomStatOp::Set);
211
+ CSV_CUSTOM_STAT(MyGame, DamageDealt, FrameDamage, ECsvCustomStatOp::Accumulate);
212
+ }
213
+
214
+ // Named event (segment in CSV timeline)
215
+ CSV_EVENT(MyGame, TEXT("LevelLoaded"));
216
+ ```
217
+
218
+ ### Launching with CSV Capture
219
+
220
+ ```bash
221
+ UnrealEditor-Cmd MyGame -game \
222
+ -csvstatfile=MySession.csv \
223
+ -csvCaptureFrames=1000 \ # capture 1000 frames then stop
224
+ -log
225
+ ```
226
+
227
+ Open `.csv` output with Python / Excel or the **PerfReportTool** (`Engine/Extras/PerfReportTool/`).
228
+
229
+ ---
230
+
231
+ ## LLM (Low-Level Memory Tracker)
232
+
233
+ LLM categorises allocations for memory profiling in Insights.
234
+
235
+ ```cpp
236
+ #include "HAL/LowLevelMemTracker.h"
237
+
238
+ // Push/pop a custom LLM scope
239
+ LLM_SCOPE(ELLMTag::EngineMisc); // built-in tag
240
+ LLM_SCOPE_BYTAG(MyGame_Inventory); // custom tag (declared separately)
241
+
242
+ // Declare a custom LLM tag (in a cpp, once)
243
+ LLM_DEFINE_TAG(MyGame_Inventory, TEXT("MyGame/Inventory"), TEXT("MyGame"));
244
+
245
+ // Use in allocations
246
+ {
247
+ LLM_SCOPE_BYTAG(MyGame_Inventory);
248
+ InventoryData = new FInventoryData();
249
+ }
250
+ ```
251
+
252
+ Activate LLM at launch:
253
+
254
+ ```bash
255
+ UnrealEditor MyGame -LLM -trace=memory -tracehost=127.0.0.1
256
+ ```
257
+
258
+ ---
259
+
260
+ ## Performance Analysis Workflow
261
+
262
+ ### 1. Identify the Bottleneck
263
+
264
+ ```
265
+ stat unit # Is Frame time dominated by Game, Draw, or GPU?
266
+ stat fps # Confirm frame rate
267
+ ```
268
+
269
+ - **Game > 33ms** → CPU game thread (tick, AI, physics logic)
270
+ - **Draw > 33ms** → Render thread (draw calls, visibility)
271
+ - **GPU > 33ms** → GPU fill rate, overdraw, shader complexity
272
+
273
+ ### 2. Drill Down on CPU
274
+
275
+ ```
276
+ stat game # Which game-thread category?
277
+ stat engine # Is it engine overhead?
278
+ stat tasks # Async task contention?
279
+ ```
280
+
281
+ Then capture with Insights (`-trace=cpu,frame`) and look at the flame chart.
282
+
283
+ ### 3. Drill Down on GPU
284
+
285
+ ```
286
+ stat gpu # Per-pass timings
287
+ ProfileGPU # Single-frame breakdown
288
+ r.ProfileGPU.Pattern BasePass # isolate specific pass
289
+ ```
290
+
291
+ ### 4. Memory Pressure
292
+
293
+ ```
294
+ stat memory
295
+ memreport -full
296
+ obj list class=Texture2D sortby=size
297
+ ```
298
+
299
+ Insights memory view shows allocation spikes over time.
300
+
301
+ ### 5. Reproduce and Baseline
302
+
303
+ Always capture a baseline before any optimization. Use CSV profiling for production telemetry:
304
+
305
+ ```bash
306
+ # Baseline run
307
+ UnrealEditor-Cmd MyGame -game -csvstatfile=Baseline.csv -csvCaptureFrames=600
308
+
309
+ # After optimization
310
+ UnrealEditor-Cmd MyGame -game -csvstatfile=Optimized.csv -csvCaptureFrames=600
311
+
312
+ # Diff with PerfReportTool or a Python script
313
+ ```
314
+
315
+ ---
316
+
317
+ ## GPU Profiling with RenderDoc
318
+
319
+ ```bash
320
+ # Launch with RenderDoc capture support
321
+ UnrealEditor MyGame -AttachRenderDoc
322
+
323
+ # In-game console
324
+ renderdoc.CaptureFrame # capture next frame
325
+ ```
326
+
327
+ Or attach RenderDoc externally and use **F12** to capture. Open `.rdc` in the RenderDoc UI for draw-call-level inspection.
328
+
329
+ ---
330
+
331
+ ## Profiling on Device (Mobile / Console)
332
+
333
+ ```bash
334
+ # iOS / Android — tunnel Insights over USB
335
+ UnrealInsights.exe -RecorderAddress=127.0.0.1:1980
336
+
337
+ # On device launch with
338
+ -trace=cpu,frame -tracehost=<HOST_IP>
339
+
340
+ # Console-specific profiling tools (e.g. PlayStation Razor / Xbox PIX)
341
+ # integrate via platform-specific plugin; SCOPE_CYCLE_COUNTER feeds into them automatically
342
+ ```
343
+
344
+ ---
345
+
346
+ ## Quick Reference: Command-Line Profiling Flags
347
+
348
+ | Flag | Effect |
349
+ |---|---|
350
+ | `-trace=cpu,gpu,frame,memory,log` | Enable trace channels for Insights |
351
+ | `-tracehost=127.0.0.1` | Send trace to local Insights recorder |
352
+ | `-tracefile=Output.utrace` | Write trace directly to file |
353
+ | `-LLM` | Enable Low-Level Memory Tracker |
354
+ | `-csvstatfile=Out.csv` | Start CSV profiling |
355
+ | `-csvCaptureFrames=N` | Stop CSV after N frames |
356
+ | `-statnamedevents` | Include stat names in profiler named events |
357
+ | `-ExecCmds="stat startfile"` | Begin stats file capture on startup |