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:
| Card | Metric | Source |
|---|---|---|
| Total Executions | Count of all skill execution records | skillExecution.summary |
| Completion Rate | Percentage of executions in completed status | skillExecution.summary |
| Avg Duration | Mean duration of completed executions | skillExecution.summary |
| Recent Failures (24h) | Count of failed executions in the last 24 hours | skillExecution.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:
| Column | Content |
|---|---|
| Skill | Skill name, linked to the detail page (/admin/skill-executions/{id}) |
| Status | Color-coded badge |
| Plan | Linked plan name (links to /admin/research-plans/{planId}), or dash if unlinked |
| Started | Relative time (e.g., "5m ago", "2h ago") |
| Duration | Human-readable duration (ms/s/m) |
| Session | Truncated Claude Code session ID |
| Error | Truncated 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:
| Card | Content |
|---|---|
| Status | Color-coded badge |
| Duration | Formatted duration with clock icon |
| Started | Start timestamp |
| Completed | Completion 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:
| Column | Content |
|---|---|
| Event | Badge with event type |
| Step | Truncated step ID |
| Data | Expandable JSON details |
| Time | Timestamp |
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)
Related Pages
- Admin Dashboard Overview -- all admin views and shared patterns
- Research Plans View -- linked from the plan card on execution details
- Authorization -- Router Enforcement -- CASL checks on
ResearchPlansubject