admin-badge

Automate admin sidebar badges with permission-filtered pending-work counts via WebSocket updates.

Updated Apr 14, 2026
One-click install
npx skills add https://github.com/weiloon1234/Forge-Starter --skill admin-badge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: admin-badge
Source: https://github.com/weiloon1234/Forge-Starter/tree/main/.claude/skills/admin-badge
Command: npx skills add https://github.com/weiloon1234/Forge-Starter --skill admin-badge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Admin badges provide a live, permission-filtered count of pending admin work items shown in the admin sidebar, ensuring admins see only relevant queues and act on items that require attention.

Core Features & Use Cases

  • Live, debounced recomputation of badge counts triggered by watched-model mutations.
  • Permission-filtered visibility and automatic UI updates via the shared admin:badges channel.
  • Supports multiple admin work queues (e.g., top ups, KYC, unreviewed withdrawals) with consistent frontend wiring.

Quick Start

Define the badge in src/domain/badges/<snake_case_name>.rs, export the module, register it with the badge service provider, and attach its key to the admin sidebar menu item.

Frequently Asked Questions about admin-badge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I show live counts of pending admin work items in the sidebar?

Live admin sidebar badges display real-time, permission-filtered counts of pending work items. They use a backend model watch and a status enum to track actionable queues, publishing updates via WebSocket on a debounced latch.

What is a debounced latch for real-time badge updates?

A debounced latch batches rapid model mutations to prevent excessive recomputation of badge counts. It ensures the frontend menu receives consolidated WebSocket updates, maintaining UI stability during high-volume admin work queue changes.

How do I set up permission-filtered visibility for admin sidebar badges?

Permission-filtered visibility is enforced by a backend permission gate integrated into the badge system. It ensures admins only see sidebar counts for work queues matching their access level, with updates published via the shared admin:badges channel.

Can I track multiple admin work queues like KYC and withdrawals with one badge system?

Yes, the badge system supports multiple admin work queues such as top ups, KYC, and unreviewed withdrawals. Each queue is defined individually and wired to the frontend with consistent sidebar menu integration and live count updates.

How do I register a new admin badge in the backend?

Define the badge in the src/domain/badges/ directory using a snake case name, export the module, and register it with the badge service provider. Finally, attach its key to the target admin sidebar menu item.

Do I need WebSocket to update sidebar badge counts in real time?

Yes, WebSocket is required for automatic frontend UI updates. The backend badge system publishes debounced count recomputations through the WebSocket admin:badges channel to keep sidebar menu items synchronized.