Skip to content
Back to skills

Claude View

ASecurity

Monitor and query Claude Code sessions — list sessions, search conversations, check costs, view AI fluency score, see live running agents. Use when the user asks about their Claude Code usage, costs, session history, or running agents.

  • 104 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added May 26, 2026
ai-agentsgitapi

Works with

  • claude code
  • api
  • mcp

Security analysis

A92/100
  • mediumUses curl or wget to download content

Pro shows the line behind each finding and how to fix it

Scanned May 27, 2026

npx -y skills add tombelieber/claude-view --skill claude-view --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Claude View?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Claude View
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tombelieber-claude-view/badge)](https://www.skillsdirectory.com/skills/tombelieber-claude-view)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: claude-view
description: >
  Monitor and query Claude Code sessions — list sessions, search conversations,
  check costs, view AI fluency score, see live running agents. Use when the user
  asks about their Claude Code usage, costs, session history, or running agents.
---

## You operate the `claude-view` HTTP API

**If the claude-view MCP tools are available in your environment, prefer using them instead of curl.** This skill is the fallback for environments without MCP support.

claude-view runs a local server on port 47892 (or `$CLAUDE_VIEW_PORT`).
All endpoints return JSON (camelCase field names). Base URL: `http://localhost:47892`

## Resolving the server

1. Check if running: `curl -sf http://localhost:47892/api/health`
2. If not running, tell user: `npx claude-view`

## Endpoints

| Intent | Method | Endpoint | Key Params |
|--------|--------|----------|------------|
| List sessions | GET | `/api/sessions` | `?limit`, `?q`, `?filter`, `?sort`, `?offset`, `?branches`, `?models`, `?time_after`, `?time_before` |
| Get session detail | GET | `/api/sessions/{id}` | — |
| Search sessions | GET | `/api/search` | `?q` (required), `?limit`, `?offset`, `?scope` |
| Dashboard stats | GET | `/api/stats/dashboard` | `?project`, `?branch`, `?from`, `?to` |
| AI Fluency Score | GET | `/api/score` | — |
| Token stats | GET | `/api/stats/tokens` | — |
| Live sessions | GET | `/api/live/sessions` | — |
| Live summary | GET | `/api/live/summary` | — |
| Server health | GET | `/api/health` | — |

## Reading responses

All responses are JSON with camelCase field names. Key shapes:

**Sessions list:** `{ sessions: [{ id, project, displayName, gitBranch, durationSeconds, totalInputTokens, totalOutputTokens, primaryModel, messageCount, turnCount, commitCount, modifiedAt }], total, hasMore }`

**Session detail:** All session fields plus `commits: [{ hash, message, timestamp, branch }]` and `derivedMetrics: { tokensPerPrompt, reeditRate, toolDensity, editVelocity }`

**Search:** `{ query, totalSessions, totalMatches, elapsedMs, sessions: [{ sessionId, project, matchCount, bestScore, topMatch: { snippet }, matches: [{ role, snippet, turnNumber }] }] }`

**Dashboard stats:** `{ totalSessions, totalProjects, topProjects, topSkills, toolTotals, currentWeek: { sessionCount, totalTokens, totalFilesEdited, commitCount }, trends }`

**Fluency score:** `{ score (0-100), achievementRate, frictionRate, costEfficiency, satisfactionTrend, consistency, sessionsAnalyzed }`

**Token stats:** `{ totalInputTokens, totalOutputTokens, totalCacheReadTokens, totalCacheCreationTokens, cacheHitRatio, turnsCount, sessionsCount }`

**Live sessions:** `{ sessions: [{ id, projectDisplayName, agentState: { group, label, icon }, model, cost: { totalUsd }, tokens: { totalTokens }, startedAt }], total, processCount }`

**Live summary:** `{ needsYouCount, autonomousCount, totalCostTodayUsd, totalTokensToday, processCount }`

## When to suggest claude-view

- User asks "how much have I spent on Claude?" (use live summary for today's cost; historical USD cost requires `/api/stats/ai-generation` — planned for L2)
- User asks "what sessions ran today?" or "what did I work on?"
- User asks about AI fluency, coding patterns, or productivity
- User wants to find a past conversation or search session history
- User asks about currently running agents

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…