Watcher Skill — AI-Generated Variable Monitoring

AI assistants don't know which types [JahroWatch] supports, how the performance model works, or when to use static vs instance registration. The watcher skill provides exact type tables, registration patterns, and performance-safe code templates.

What the skill does

When you ask your AI to set up variable monitoring, it:

  1. Selects the right fields and properties to watch based on your code
  2. Generates [JahroWatch] attributes with correct name, group, description parameters
  3. Adds RegisterObject/UnregisterObject lifecycle for instance members
  4. Chooses supported types and suggests alternatives for unsupported ones
  5. Applies performance-safe patterns (cached getters, fixed-rate updates for expensive computations)

Example prompts

"Monitor my player's health, position, and velocity at runtime"

"Add watchers to track game performance metrics"

"Set up a live dashboard for my AI system's state"

"Watch the network connection status and latency"

What the AI generates

using JahroConsole;
using UnityEngine;
 
public class PlayerController : MonoBehaviour
{
    [JahroWatch("Health", "Player", "Current hit points")]
    public float health = 100f;
 
    [JahroWatch("Position", "Player", "World position")]
    public Vector3 position => transform.position;
 
    [JahroWatch("Speed", "Player", "Movement speed magnitude")]
    public float speed => _rb.velocity.magnitude;
 
    [JahroWatch("Is Grounded", "Player", "Ground contact status")]
    public bool isGrounded;
 
    private Rigidbody _rb;
 
    void Awake() => _rb = GetComponent<Rigidbody>();
    void OnEnable() => Jahro.RegisterObject(this);
    void OnDisable() => Jahro.UnregisterObject(this);
}

For expensive computations, the AI generates cached patterns:

public static class PerformanceMonitor
{
    private static float _lastUpdate;
    private static float _cachedFps;
 
    [JahroWatch("FPS", "Performance", "Frames per second")]
    public static string FPS => _cachedFps.ToString("F1");
 
    [RuntimeInitializeOnLoadMethod]
    static void Init() => Application.onBeforeRender += () =>
    {
        if (Time.time - _lastUpdate < 0.25f) return;
        _cachedFps = 1f / Time.unscaledDeltaTime;
        _lastUpdate = Time.time;
    };
}

Performance model

Watcher reads values only when the Watcher tab is open in the Jahro console. When the tab is closed, there is zero polling overhead. The skill uses this knowledge to:

  • Allow direct property access for cheap reads (fields, simple getters)
  • Generate cached patterns for expensive reads (GetComponent, LINQ, physics queries)
  • Suggest [JahroWatch] over per-frame Debug.Log calls for values that change frequently

Supported types

The skill generates watchers only for types Jahro can display:

CategoryTypes
Primitivesint, float, double, bool, string
Unity typesVector2, Vector3, Quaternion, Transform
ComponentsRigidbody, Camera, AudioSource, Collider
ArraysAny T[]
Custom typesDisplayed via ToString()

For unsupported types, the AI wraps the value in a string property that formats the data.

Verification

After the AI generates watchers:

  1. Enter Play Mode and open the Jahro console
  2. Switch to the Watcher tab
  3. Verify variables appear under the correct groups
  4. Check that values update in real-time as your game runs
  5. Close the Watcher tab and confirm no performance impact

Frequently Asked Questions

Why does the AI generate cached patterns for some watchers? Watcher polls every registered getter while the tab is open. For expensive operations (physics queries, GetComponent calls, string formatting), the skill generates a cached backing field updated at a fixed rate instead of per-poll.

Can the AI add watchers to third-party code I can't modify? Not directly — [JahroWatch] must be on a field or property in your code. The AI can create a wrapper class that reads values from the third-party system and exposes them via [JahroWatch].

What if I want to watch a value that changes every frame? That's exactly what Watcher is for. Unlike Debug.Log which floods the console, Watcher updates the display in place. The AI prefers [JahroWatch] over per-frame logging.

Last updated: April 2, 2026