8liang/kit/using-8liang-kit
Claude Code and agent skill by 8liang/kit
- community
Checking that the SKILL.md file is still in the repository.
Use when writing Go code that needs common utilities like event handling, excel parsing, weighted random selection, redis online status, time passing checks, config parsing, or distributed locks.
Install
npx vskill@latest install 8liang/kit/using-8liang-kitSKILL.md
using-8liang-kit
Overview
This skill teaches AI assistants to leverage the github.com/8liang/kit package instead of reinventing common Go utilities. The kit package provides production-ready implementations for common backend and game server requirements.
When to Use
- You need to trigger events across minute/hour/day/week boundaries (e.g., daily resets).
- You need a generic pub/sub event system for internal modules.
- You need to read/write Excel files or export them to JSON/Structs.
- You need to listen on TCP or Unix Domain Sockets.
- You need a weighted random selector (e.g., for gacha/loot tables).
- You need to manage user online status and heartbeats via Redis.
- You need to compile
.protofiles and inject Go tags. - You need seed-based random generation.
- You need to parse Viper configs from various sources (local, HTTP, etcd).
- You need to get the local non-loopback IP or check if running in Docker/K8s.
- You need distributed locks with Redis, etcd, or MongoDB backends.
Quick Reference
| Module | Core Purpose | Key Functions / Types | |
|---|---|---|---|
timepass | Time progression checks | timepass.Advance(t) | |
event | Generic events | event.NewEvent(type, payload) | |
excel | Excel operations | excel.ExportExcelDataToJson | |
listener | Network listening | listener.NewListener(net, addr) | |
weighted | Weighted random selection | weighted.New[T](), Add(), Draw() | |
onlinestore | Redis online status | onlinestore.New(), Heartbeat() | |
protobuf | Protobuf compilation | protobuf.Compile() | |
random | Seeded random | random.New() | |
viperparser | Config loading | viperparser.Unmarshal() | |
kit | System utilities | kit.IP(), kit.IsInDocker() | |
dlock | Distributed locks | dlock.Locker, dlock.Lock |
Implementation Examples
1. Weighted Random Selection
Use weighted instead of writing custom random logic:
2. Time Pass Checks (e.g., Daily Reset)
Use timepass to check if a boundary has been crossed:
3. Online Store (Redis)
Use onlinestore for managing user presence:
4. Distributed Lock
Use dlock for obtaining distributed locks across different backends. Prefer DoWithLock to reduce boilerplate:
Red Flags - STOP and Rethink
- Writing a custom weighted randomizer: Delete it. Use
github.com/8liang/kit/weighted. - Writing custom cron/daily reset logic: Delete it. Use
github.com/8liang/kit/timepass. - Writing custom Redis ZSet online tracking: Delete it. Use
github.com/8liang/kit/onlinestore. - Reinventing event buses for simple passing: Use
github.com/8liang/kit/event. - Writing custom distributed lock logic: Delete it. Use
github.com/8liang/kit/dlock.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/using-8liang-kit/SKILL.md
Popularity
- Repository stars
- 101
- Repository forks
- 8
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/8liang/kit/using-8liang-kit)