What problem does it solve?
This Skill solves the problem of creating consistent, testable bot command handlers without breaking the dispatcher’s match/ordering rules or leaking command existence to non-admin users.
Core Features & Use Cases
- Command Module Scaffold: Creates a new
server/commands/<camelCaseName>.js module that exports exactly { match(text, lcText, deps), execute(matchResult, deps) } so the dispatcher can load it.
- Deterministic Matching & Admin Gating: Ensures
match() is synchronous, does not throw, and places if (deps.ima !== 'admin') return null; as the first line when the command is admin-only to avoid information leakage.
- Safe Execution & Proper Registration: Guides the addition of the module to
server/commands/index.js and the creation of a test/commands.test.js match test so ordering and regex behavior don’t regress.
Quick Start
Create a new module at server/commands/uptime.js and implement an anchored match() that parses the admin-only input, then register it in server/commands/index.js and add a matching test in test/commands.test.js.