Skill

From diegopacheco/ai-playground · View interactive version

Skill is an AI agent skill from the GitHub repository diegopacheco/ai-playground. Reads every Claude Code session in the user's config directory and renders a self-contained light-theme website with a GitHub-style contribution grid, visual metrics, and 5-10 written insights about the user's agent coding habits and what they are building. Use when the user runs /habit-tracker or a

How to use this skill

Skill file

Coding Habit Tracker

When invoked, you read every past Claude Code session stored under the user's config directory, aggregate the activity, and produce a light-theme report with a GitHub-style contribution grid, summary metrics, charts, and a set of written insights about how and when the user codes and what they are building. Every number is read from the session logs — nothing is estimated.

Global Context

What it reads

Each session line carries a timestamp, the working directory, the git branch, the model, and the message content. The engine counts user prompts and assistant turns per day, hour, and weekday; every tool_use by tool name; sessions and their duration; projects by working-directory name and their git branches; and classifies prompts as building, fixing, refactoring, testing, or exploring from their wording.

What it produces

Rules

Step 1 — Run the engine

Invoke it by its installed absolute path. It writes habit-report/ into the current working directory:

node "$HOME/.claude/skills/habit-tracker/scripts/analyze.mjs" habit-report

It scans the session files, computes the aggregates, picks the insights, and writes the report. It prints a summary to stdout. If no session files are found it says so — relay that instead of producing an empty report.

Step 2 — Report back

Relay the stdout summary in your own words: total interactions and sessions, active days and the date span, the current and longest streak, the busiest hour and weekday, and the top project. Read a couple of the generated insights from habit-report/data.json and mention them. Point the user at the site:

habit-report/index.html

Offer to open it. The page is self-contained — the grid, cards, charts, and insight cards are all inline, with no server or network needed.

What the numbers mean

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.