jahro-commands
Analyzes C# classes and generates [JahroCommand] attributes with correct syntax, RegisterObject patterns, and group organization. Use when the user wants to add runtime commands, cheats, or debug actions to Unity classes, or mentions JahroCommand, console commands, runtime cheats, or debug actions. --- # Jahro Commands Help users add runtime-callable debug commands to Unity code using Jahro's `[JahroCommand]` attribute system. ## Workflow 1. **Analyze** the user's code — identify methods that are good command candidates 2. **Generate** correct `[JahroCommand]` attributes with proper syntax 3. **Add registration** if needed (instance methods require `RegisterObject`) 4. **VERIFY** — "Enter Play Mode, press ~, check the Commands tab" ## Analyzing Code for Command Candidates When the user shares a class, identify methods worth exposing as commands: **Good candidates:** - Public methods that change game state (damage, heal, spawn, teleport, reset) - Methods used for testing and tuning (set difficulty, add currency, skip level) - Diagnostic methods (print stats, dump state, force GC) - Methods with simple parameter types (int, float, bool, string, Vector2, Vector3, enum) **Skip these:** - Unity lifecycle methods (Update, Start, Awake, OnEnable, OnDisable, OnDestroy) - Private implementation details the developer wouldn't want to call manually - Methods with complex parameter types (custom classes, interfaces, delegates) - Property getters/setters (use `[JahroWatch]` for monitoring instead) ## Attribute Syntax ```csharp [JahroCommand("command-name", "GroupName", "Short description of what it does")] ```
Changelog: Source: GitHub https://github.com/jahro-console/unity-agent-skills
No comments yet. Be the first one!