skills/debug-cvar-prompt/SKILL.md
Proactively prompt to create runtime-toggleable console variables when implementing debug visualization or draw debug features. Triggers on requests containing "debug", "draw debug", "visualize", "show debug", "debug draw", or any request to add debug/diagnostic rendering that could benefit from runtime toggling.
npx skillsauth add sipherxyz/universal-ue-skills debug-cvar-promptInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Role: Proactive Debug Infrastructure Advisor Trigger: Any request involving debug visualization, draw debug, or diagnostic rendering
When a user requests debug functionality (drawing, visualization, logging), automatically suggest creating a console variable (CVar) to enable/disable it at runtime without recompilation.
Trigger on requests containing:
BEFORE implementing any debug feature, prompt the user:
I notice you're adding debug functionality. For runtime control, I recommend creating a console variable.
Would you like me to:
1. Add a CVar to `Source/S2/Public/Utils/S2ConsoleVariables.h` for this feature?
2. Implement the debug code gated behind the CVar?
This allows toggling via console command (e.g., `Sipher.Debug.{FeatureName} 1`) without recompiling.
All project CVars live in: Source/S2/Public/Utils/S2ConsoleVariables.h
| Type | Pattern | Example |
|------|---------|---------|
| Debug toggle | Sipher.Debug.{Feature} | Sipher.Debug.GrappleHook |
| Show debug | Sipher.ShowDebug.{Feature} | Sipher.ShowDebug.Camera |
| Cheat/bypass | Sipher.{Action} | Sipher.ByPassSavePoint |
| Player cheat | PlayerCheat{Feature} | PlayerCheatInstantStun |
Boolean toggle (most common):
inline static TAutoConsoleVariable<bool> CVarDebug{FeatureName}(
TEXT("Sipher.Debug.{FeatureName}"),
false,
TEXT("Show debug {description}"),
ECVF_Default);
Integer option:
inline static TAutoConsoleVariable<int> CVar{Name}(
TEXT("Sipher.{Category}.{Name}"),
0,
TEXT("Description:\n")
TEXT(" '0': Option A\n")
TEXT(" '1': Option B\n"),
ECVF_Default);
Float value:
inline static TAutoConsoleVariable<float> CVar{Name}(
TEXT("Sipher.Debug.{Name}"),
0.f,
TEXT("Set {description} (0 = disabled)"),
ECVF_Default);
Reading CVar value:
#include "Utils/S2ConsoleVariables.h"
void USomeComponent::DrawDebug()
{
if (!CVarDebugMyFeature.GetValueOnGameThread())
{
return;
}
// Debug drawing code here
DrawDebugSphere(GetWorld(), Location, 50.f, 12, FColor::Green);
}
Thread-safe reading (if accessed from multiple threads):
if (!CVarDebugMyFeature.GetValueOnAnyThread())
{
return;
}
Current debug CVars in the project (for consistency):
| CVar | Console Command | Purpose |
|------|-----------------|---------|
| CVarShowDebugCamera | Sipher.ShowDebug.Camera | Camera debug |
| CVarShowDebugDamageShape | ShowDebug.DamageShape | Damage hitbox visualization |
| CVarDebugParryEnable | Sipher.DebugParry.Enable | Parry system debug |
| CVarDebugLockOn | Sipher.Debug.LockOn | Lock-on targeting debug |
| CVarDebugGrappleHook | Sipher.Debug.GrappleHook | Grapple hook debug |
| CVarDebugRetribution | Sipher.DebugRetribution | Retribution system debug |
| CVarShowDebugProjectile | Sipher.Debug.Projectile | Projectile debug |
| CVarDebugInteractionLadder | Sipher.Debug.Interaction.Ladder | Ladder interaction debug |
S2ConsoleVariables.h#if UE_BUILD_DEBUG or always-on debug codeWhen adding debug functionality:
S2ConsoleVariables.hSipher.Debug.{Feature} patternfalse (debug off by default)GetValueOnGameThread() before executingRemind users how to toggle in-game:
~ (tilde) to open console
Sipher.Debug.{Feature} 1 // Enable
Sipher.Debug.{Feature} 0 // Disable
ECVF_Default unless specific flags neededskill: debug-cvar-prompt
invoke: /dev-workflow:debug-cvar-prompt
type: proactive
category: cpp-development
scope: project-wide
development
This skill should be used when implementing features in isolation using git worktrees. Triggers on "create worktree", "isolated workspace", "parallel development", or when starting implementation that should not affect main workspace.
testing
Manage VFX team issues on GitHub Projects - timeline scheduling, status updates, member commit checks, bulk assign. Use when managing VFX team project board, adding issues to timeline, checking member progress, or bulk-updating issue fields.
tools
Generate C++ validation rules from JSON definitions. Use when team updates ValidationRules.json or asks to add/modify validation rules.
development
Check codebase for Microsoft Xbox XR (Xbox Requirements) compliance issues. Scans for account picker, cloud saves, achievements, Quick Resume, and Xbox certification requirements. Use before console submission or when preparing for Microsoft certification. Triggers on "XR", "Xbox certification", "Microsoft compliance", "Xbox cert", "Xbox requirements", "GDK compliance".