Trovella Wiki

Skill Executions View

Admin view for tracking research skill invocations, routing decisions, durations, and failure debugging.

The Skill Executions view (/admin/skill-executions) tracks every invocation of research skills (research, research-scan, research-deep). It provides a list page with summary KPIs and a detail page with execution metrics, metadata, linked plan, and an audit timeline.

List Page

Route: /admin/skill-executions

Summary KPI Cards

Four cards summarize execution health:

CardMetricSource
Total ExecutionsCount of all skill execution recordsskillExecution.summary
Completion RatePercentage of executions in completed statusskillExecution.summary
Avg DurationMean duration of completed executionsskillExecution.summary
Recent Failures (24h)Count of failed executions in the last 24 hoursskillExecution.summary

Below the cards, a breakdown row shows execution counts by skill name (e.g., research: 12, research-scan: 8).

The summary procedure runs four queries: total count, group-by-status counts, group-by-skill-name counts, average duration of completed executions, and a 24-hour failure count using gte(createdAt, oneDayAgo).

Executions Table

A paginated table (20 rows per page) with two filter dropdowns:

Filters:

  • Skill -- research, research-scan, research-deep, or all
  • Status -- started, executing, completed, failed, or all

Each row shows:

ColumnContent
SkillSkill name, linked to the detail page (/admin/skill-executions/{id})
StatusColor-coded badge
PlanLinked plan name (links to /admin/research-plans/{planId}), or dash if unlinked
StartedRelative time (e.g., "5m ago", "2h ago")
DurationHuman-readable duration (ms/s/m)
SessionTruncated Claude Code session ID
ErrorTruncated error message in red (if failed)

The skillExecution.list procedure joins skill_execution with research_plan via a left join to include the plan name and status.

Detail Page

Route: /admin/skill-executions/{executionId}

Metrics Cards

Four cards across the top:

CardContent
StatusColor-coded badge
DurationFormatted duration with clock icon
StartedStart timestamp
CompletedCompletion timestamp (or dash if still running)

Error Card

Shown only when the execution has failed status. Displays the error message in a red-bordered card.

Metadata Card

Displays the execution's metadata JSON in a formatted <pre> block. Shows "No metadata recorded." when empty.

Linked Research Plan Card

Shown when the execution has an associated planId. Displays the plan name, status badge, and research question. Includes a "View Plan" button linking to /admin/research-plans/{planId}.

Session Timeline

An audit log table filtered to the execution's Claude Code session ID. Events come from planAuditLog filtered by both planId and claudeCodeSessionId. Each row shows:

ColumnContent
EventBadge with event type
StepTruncated step ID
DataExpandable JSON details
TimeTimestamp

Session ID Card

Shown when the execution has a Claude Code session ID. Displays the full session ID in a code block for correlation with other logs.

Component Structure

skill-executions-content.tsx (list page)
  |-- SummaryCards (4 KPI cards + skill breakdown)
  |-- ExecutionsFilterBar (skill + status dropdowns)
  |-- Paginated executions table with links to detail and plan

skill-execution-detail.tsx (detail page)
  |-- ExecutionMetricsCards (4 cards)
  |-- ExecutionErrorCard (conditional)
  |-- MetadataViewer (JSON pre block)
  |-- Linked Research Plan card (conditional)
  |-- ExecutionAuditLog (session-filtered timeline)
  |-- Session ID card (conditional)

On this page