modscode JA

modscode / Gallery / wrapped

wrapped

Spotify Wrapped for your Claude Code life: prompts, tool calls, lines written, streaks, your coding persona, and a share card you can copy.

Code you can checkTerminal + desktopPaneToastBoxButtonText

What it does

  • Draws a pane, toasts
  • Adds /wrapped
  • Watches tool calls
  • Hooks prompt.submit, session.end, session.start, turn.complete
  • Keeps its own state between turns

Good points

  • No network calls
  • Starts no processes
  • Written in TypeScript
  • Handles errors

Code to start from

Two kinds: a starter modscode writes from the design above, and the lines of the mod's own code that draw it.

Starter (register.tsx)

register.tsx
import type { Register } from 'claude-code'

// Drawn like wrapped by awesome-claude-mods (pane, toast), as modscode read it from the mod's code:
// https://modscode.com/gallery/singh-ap-wrapped/
// Written by modscode from that reading, not copied from the mod: use it as you like.
// Each value below stands for one the mod works out at run time; put in your own.
export const register: Register = on => {
  // the pane: open it with $.ui.open({ id: 'my-pane', title: "Wrapped" })
  on('ui.render', { component: 'Pane', requestId: 'my-pane' }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const label = '…'
    const emoji = '…'
    const title = '…'
    const blurb = '…'
    const value = '…'
    const value2 = '…'
    const value3 = '…'
    const name = '…'
    const name2 = '…'
    const name3 = '…'
    const value4 = '…'
    const value5 = '…'
    const value6 = '…'
    const name4 = '…'
    const name5 = '…'
    const name6 = '…'
    const value7 = '…'
    const value8 = '…'
    const value9 = '…'
    const name7 = '…'
    const name8 = '…'
    const name9 = '…'
    const name10 = '…'
    const bar = '…'
    const num = '…'
    const name11 = '…'
    const bar2 = '…'
    const num2 = '…'
    const name12 = '…'
    const bar3 = '…'
    const num3 = '…'
    const fact = '…'
    const fact2 = '…'
    const fact3 = '…'
    return (
      <Box flexDirection="column">
        <Text bold color="#c084fc">
          {"✦ "}
          {label}
          {" ✦"}
        </Text>
        <Text>
          {" "}
        </Text>
        <Box flexDirection="row" gap={1}>
          <Text>
            You are
          </Text>
          <Text bold color="#fbbf24">
            {emoji}
            {" "}
            {title}
          </Text>
        </Box>
        <Text dimColor wrap="wrap">
          {blurb}
        </Text>
        <Text>
          {" "}
        </Text>
        <Box flexDirection="column" marginBottom={1}>
          <Box flexDirection="row">
            <Box>
              <Text bold color="#34d399">
                {value}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value2}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value3}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row">
            <Box>
              <Text dimColor>
                {name}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name2}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name3}
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column" marginBottom={1}>
          <Box flexDirection="row">
            <Box>
              <Text bold color="#34d399">
                {value4}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value5}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value6}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row">
            <Box>
              <Text dimColor>
                {name4}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name5}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name6}
              </Text>
            </Box>
          </Box>
        </Box>
        <Box flexDirection="column" marginBottom={1}>
          <Box flexDirection="row">
            <Box>
              <Text bold color="#34d399">
                {value7}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value8}
              </Text>
            </Box>
            <Box>
              <Text bold color="#34d399">
                {value9}
              </Text>
            </Box>
          </Box>
          <Box flexDirection="row">
            <Box>
              <Text dimColor>
                {name7}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name8}
              </Text>
            </Box>
            <Box>
              <Text dimColor>
                {name9}
              </Text>
            </Box>
          </Box>
        </Box>
        <Text bold>
          Top tools
        </Text>
        <Box flexDirection="row" gap={1}>
          <Box>
            <Text>
              {name10}
            </Text>
          </Box>
          <Text color="#60a5fa">
            {bar}
          </Text>
          <Text dimColor>
            {num}
          </Text>
        </Box>
        <Box flexDirection="row" gap={1}>
          <Box>
            <Text>
              {name11}
            </Text>
          </Box>
          <Text color="#60a5fa">
            {bar2}
          </Text>
          <Text dimColor>
            {num2}
          </Text>
        </Box>
        <Box flexDirection="row" gap={1}>
          <Box>
            <Text>
              {name12}
            </Text>
          </Box>
          <Text color="#60a5fa">
            {bar3}
          </Text>
          <Text dimColor>
            {num3}
          </Text>
        </Box>
        <Text>
          {" "}
        </Text>
        <Text wrap="truncate-end">
          {fact}
        </Text>
        <Text wrap="truncate-end">
          {fact2}
        </Text>
        <Text wrap="truncate-end">
          {fact3}
        </Text>
        <Text>
          {" "}
        </Text>
        <Box flexDirection="row" gap={2}>
          <Button label="Copy share card" hotkey="c" variant="primary" autoFocus />
          <Button label="Close" role="dismiss" hotkey="x" />
        </Box>
      </Box>
    )
  })

  on('session.start', async ($, e, next) => {
    await $.ui.toast(`Share card copied. Paste it anywhere! ✨`)
    return next(e)
  })
}

The mod's own code

Shown under the mod's licence (MIT); its text is below. Keep the notice if you copy these lines.

mods/fun/wrapped/hooks/register.tsx lines 210–316 · Pane
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {
    const { Box, Text, Button } = $.ui.resolve(e)
    const shown = await read($, summary)
    const width = Math.max(24, Math.min(e.props.bodyColumns, 72))

    if (shown === null || shown.isEmpty) {
      return (
        <Box flexDirection="column" gap={1} width={width}>
          <Text bold color="#c084fc">
            ✦ {shown?.label ?? 'Claude Code Wrapped'} ✦
          </Text>
          <Text>Nothing counted yet. wrapped keeps score from the day it was installed: come back after a few turns.</Text>
          <Button key="close" label="Close" role="dismiss" hotkey="x" onPress={() => $.ui.close({ id: PANE })} />
        </Box>
      )
    }

    const perRow = width >= 54 ? 3 : 2
    const cell = Math.floor(width / perRow)
    const headline: [string, string][] = [
      [num(shown.prompts), 'prompts'],
      [num(shown.sessions), 'sessions'],
      [duration(shown.turnMs), 'with Claude'],
      [num(shown.toolCalls), 'tool calls'],
      [num(shown.lines), 'lines written'],
      [num(shown.commits), 'commits'],
    ]
    const rows: [string, string][][] = []
    for (let i = 0; i < headline.length; i += perRow) rows.push(headline.slice(i, i + perRow))

    const maxCount = shown.topTools[0]?.count ?? 0
    const nameWidth = Math.max(4, ...shown.topTools.map(t => t.name.length))
    const barWidth = Math.max(4, width - nameWidth - 10)
    const facts = [
      shown.streak.longest > 0 ? `🔥 ${shown.streak.current}-day streak · best ${shown.streak.longest}` : '',
      shown.busiestHour >= 0 ? `🕐 busiest hour ${hourLabel(shown.busiestHour)}` : '',
      shown.longestTurnMs > 0 ? `⏱  longest turn ${duration(shown.longestTurnMs)}` : '',
      shown.topProject !== '' ? `📁 top project ${shown.topProject}` : '',
      shown.files > 0 ? `📄 ${num(shown.files)} files touched` : '',
      shown.cost > 0 ? `💸 $${shown.cost.toFixed(2)} of tokens` : '',
    ].filter(f => f !== '')

    return (
      <Box flexDirection="column" width={width}>
        <Text bold color="#c084fc">
          ✦ {shown.label.toUpperCase()} ✦
        </Text>
        <Text> </Text>
        <Box flexDirection="row" gap={1}>
          <Text>You are</Text>
          <Text bold color="#fbbf24">
            {shown.persona.emoji} {shown.persona.title}
          </Text>
        </Box>
        <Text dimColor wrap="wrap">
          {shown.persona.blurb}
        </Text>
        <Text> </Text>
        {rows.map(row => (
          <Box flexDirection="column" marginBottom={1}>
            <Box flexDirection="row">
              {row.map(([value]) => (
                <Box width={cell}>
                  <Text bold color="#34d399">
                    {value}
                  </Text>
                </Box>
              ))}
            </Box>
            <Box flexDirection="row">
              {row.map(([, name]) => (
                <Box width={cell}>
                  <Text dimColor>{name}</Text>
                </Box>
              ))}
            </Box>
          </Box>
        ))}
        {shown.topTools.length > 0 && <Text bold>Top tools</Text>}
        {shown.topTools.map(tool => (
          <Box flexDirection="row" gap={1}>
            <Box width={nameWidth}>
              <Text>{tool.name}</Text>
            </Box>
            <Text color="#60a5fa">{bar(tool.count, maxCount, barWidth)}</Text>
            <Text dimColor>{num(tool.count)}</Text>
          </Box>
        ))}
        <Text> </Text>
        {facts.map(fact => (
          <Text wrap="truncate-end">{fact}</Text>
        ))}
        <Text> </Text>
        <Box flexDirection="row" gap={2}>
          <Button
            key="copy"
            label="Copy share card"
            hotkey="c"
            variant="primary"
            autoFocus
            onPress={press => copyCard($, press.surface)}
          />
          <Button key="close" label="Close" role="dismiss" hotkey="x" onPress={() => $.ui.close({ id: PANE })} />
        </Box>
      </Box>
    )
  })
Licence text (MIT)
MIT License

Copyright (c) 2026 Amrit Preet Singh

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

What its code calls

tool callsremembers

The design, read from code

Drawn from the mod's source at the commit read, not from a run: a list is drawn three times, a condition takes its first branch that draws in the desktop app, and a value only the run time knows is shown as a made-up sample (dotted underline) or left out. Colours and type are this site's.

What its code shows

Read from the source at commit bb9cd3a02f1e on 2026-10-06. The first group decides whether a mod is listed; the rest is for you to weigh. A later commit is not read until the next crawl.

Decides the listing: code you can check
Entry readEvery module hooks/hooks.json names was read.mods/fun/wrapped/hooks/register.tsx
ParsesEvery file parses as TypeScript or JavaScript.2 files parsed
All its code is in the modEvery import is a file of the mod or the engine's own module; no packages, no require.all its code is in the mod
ReadableNo minified lines, no eval or new Function, no import of a computed path, no encoded blobs.no minified code, no eval, no encoded blobs
Calls in the openNetwork and programs are reached as $.http.fetch and $.process.run in place, never passed around.every call outside goes through $ in the open
For you to weigh before installing
Where it drawsThe terminal, the desktop app, both, or nothing (hooks only: a guard or a prompt rewriter), as its code says. Shown, never a reason to leave a mod out.draws in the terminal and the desktop app, the same in both
Install lineWhether its repository's own .claude-plugin/marketplace.json lists it, so it installs from that marketplace with the lines on its page.listed in its repository's .claude-plugin/marketplace.json: installs from there
Programs on WindowsWhether every program it starts through $.process exists on Windows (tail, date, open, osascript, /usr/… do not).runs no program a Windows PC lacks
NetworkWhether every fetch names its https host in the code.no network
ProgramsWhether every program it starts is named in the code and is not a shell, an interpreter or a network tool.starts no programs
Reads and sendsWhether it both reads files or environment variables and reaches the network.reaches no network
Keys in the sourceWhether the source holds what looks like an API key or a private key.no keys in the source
LicenceAn open licence (MIT, Apache-2.0, BSD, ISC, Unlicense, 0BSD, CC0) with its text lets modscode show its code; otherwise the code is linked.MIT

This is a reading of the code text, not a security review: it does not run the mod, and it cannot see what a program the mod starts does. The check before installing is yours. How mods are chosen

Install it

Check it yourself before you install it. Mods run unsandboxed, with your permissions, and modscode does not vouch for what this code does. Read the code below (or run claude plugin validate . in its folder), weigh what it reaches, and install the commit you read.

Its repository is its marketplace. Add that marketplace (in the terminal with these commands, or in the desktop app's plugin settings) and install the mod from it:

/plugin marketplace add Singh-AP/awesome-claude-mods
/plugin install wrapped@awesome-claude-mods

This installs the marketplace's latest commit, which may not be the one read here (bb9cd3a02f1e). Compare them before you install.

Ask Claude about it

With the modscode connector added, Claude can read this design, what its code reaches and its code, and build on them. Ask it like this:

Read the modscode design "singh-ap-wrapped" with its code and make me a pane like it

Search them from Claude: the MCP connector

Similar designs