Pw Claude Usage Widget
Description
Always-on-top Windows widget showing your Claude Code usage — 5h, weekly & per-model limits with reset timers
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
Claude Usage Widget (Windows)
by **[piyorotw](https://github.com/piyorotw)**
วิดเจ็ตเล็ก ๆ ลอยชิดเหนือ taskbar โชว์การใช้งาน **Claude Code** แบบเรียลไทม์ — โลโก้ + 3 แถว: **5h** (รอบ 5 ชม.), **Wk** (สัปดาห์ ทุกโมเดล), **Fb** (สัปดาห์ เฉพาะโมเดล) แต่ละแถวมีแถบ เปอร์เซ็นต์ (เขียว/เหลือง/แดง) + เวลานับถอยหลังรอบ reset. รองรับหลายจอ · ปรับขนาด/ตำแหน่งสดได้

แหล่งข้อมูล (เรียงตามความแม่นยำ)
- API (กดโลโก้) →
GET https://api.anthropic.com/api/oauth/usageด้วย access token ของ Claude Code (~/.claude/.credentials.json) แบบ read-only — ได้เลขจริง. ใช้ได้เมื่อ token ในไฟล์ยังสด คือช่วงที่ใช้ Claude Code ใน terminal อยู่ (use_api: falseเพื่อปิด) - status line →
~/.claude/last-statusline.json(Claude Code เขียนให้ตอน render status line ใน terminal) = เลขจริง 5h/Wk โดยไม่ต้องแตะ token เลย — แนะนำ ถ้าใช้ terminal - ประมาณจาก token (
~) → เมื่อ 1+2 ใช้ไม่ได้ (คร่าวๆ ไม่แม่น)
**`auto_refresh_token`** (default `false`) — ถ้าใช้ Claude Code **แบบ App เป็นหลัก** (ไม่ค่อย login terminal) token ในไฟล์จะเก่าเรื่อยๆ ตั้ง **`"auto_refresh_token": true`** ให้วิดเจ็ต **ต่ออายุ token เอง** (refresh + เขียนกลับ `.credentials.json`, เก็บ `.bak` ให้) → ใช้ได้ยาวโดย ไม่ต้อง login ซ้ำ. **เปิดเฉพาะตอนใช้ App** (App เก็บ token คนละที่กับ CLI จึงไม่กระทบกัน) — ต้อง `/login` ใน terminal ให้สำเร็จ **1 ครั้งแรก** เพื่อให้มี refresh token ที่ยังไม่หมดอายุ
ถ้า `false` = read-only ล้วน (ปลอดภัยสุด) — เลขจริงจะมาเฉพาะช่วง token ยังสด (เพิ่ง login/ใช้ CLI)
**`api_poll_minutes`** (default `10`, `0` = ปิด) — ดึงเลขจริงจาก API เองทุกกี่นาที เพื่อให้ 3 แถว **อัปเดตเองไม่ต้องกดโลโก้**. ใช้คู่กับ `auto_refresh_token: true` จะได้เลขสดตลอดแบบไม่ต้องแตะเลย (endpoint มี rate-limit — อย่าตั้งต่ำกว่า ~5 นาที)
token ถูกส่งไปที่ **api.anthropic.com เท่านั้น** ไม่ log/ไม่ส่งที่อื่น (เขียนกลับ `.credentials.json` เฉพาะตอนเปิด `auto_refresh_token`). ไอเดียจาก widget เพื่อน (macOS): github.com/PanithanNanti/claude-usage-
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Awesome Llm Apps
100+ AI Agents, Agent Skills and RAG Apps - Free and Open Source.
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agen
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI