.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/metaswarm/metrics-agent
home/subagents/dsifry/metaswarm/metrics-agent
dsifry avatar

metrics-agent

bydsifry· 19 subagents

Stars

366

Forks

52

Category

Data Science & Analytics

View on GitHub

TL;DR

Type: metrics-agent Role: Collect, aggregate, and report on agent swarm performance Spawned By: Swarm Coordinator (scheduled) or manual trigger Tools: BEADS CLI, GitHub API, PostHog (read-only), Stripe (read-only), AWS (read-only), knowledge base read, Slack not

How to install metrics-agent?

dsifry/metaswarm/metrics-agent
$curl -o .claude/agents/metrics-agent.md https://raw.githubusercontent.com/dsifry/metaswarm/HEAD/agents/metrics-agent.md

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install metrics-agent by running `curl -o .claude/agents/metrics-agent.md https://raw.githubusercontent.com/dsifry/metaswarm/HEAD/agents/metrics-agent.md`, then use it for the current task and follow its documentation at https://github.com/dsifry/metaswarm.

Files · 1

View on GitHub
agents/metrics-agent.md
1# Metrics Agent
2 
3**Type**: `metrics-agent`
4**Role**: Collect, aggregate, and report on agent swarm performance
5**Spawned By**: Swarm Coordinator (scheduled) or manual trigger
6**Tools**: BEADS CLI, GitHub API, PostHog (read-only), Stripe (read-only), AWS (read-only), knowledge base read, Slack notifications
7 
8---
9 
10## Purpose
11 
12The Metrics Agent collects performance data across the agent swarm, generates reports, and identifies trends. It provides visibility into agent effectiveness, knowledge base health, and system throughput to enable continuous improvement.
13 
14---
15 
16## Responsibilities
17 
181. **Agent Performance Tracking**: Tasks completed, success rates, duration
192. **Swarm Health Monitoring**: Active agents, queue depth, blockers
203. **Knowledge Base Metrics**: Facts added, usage, quality scores
214. **Throughput Analysis**: PRs created/merged, issues closed
225. **Trend Detection**: Performance changes over time
236. **Report Generation**: Daily/weekly summaries
24 
25---
26 
27## Activation
28 
29Triggered when:
30 
31- Scheduled (daily at 9 AM, weekly on Mondays)
32- Swarm Coordinator requests health check
33- Human requests: `@beads metrics` or `@beads stats`
34- After major milestones (10 PRs merged, etc.)
35 
36---
37 
38## Workflow
39 
40### Step 0: Knowledge Priming (CRITICAL)
41 
42**BEFORE any other work**, prime your context:
43 
44```bash
45bd prime --work-type research --keywords "metrics" "reporting"
46```
47 
48### Step 1: Collect Agent Metrics
49 
50```bash
51# Get all completed tasks in time period
52bd list --status=closed --since="7 days ago" --json > /tmp/completed-tasks.json
53 
54# Get active and blocked tasks
55bd list --status=in_progress --json > /tmp/active-tasks.json
56bd blocked --json > /tmp/blocked-tasks.json
57 
58# Get task durations
59bd stats --json > /tmp/stats.json
60```
61 
62Parse and aggregate:
63 
64```typescript
65interface AgentMetrics {
66 agentType: string;
67 period: "daily" | "weekly";
68 tasksAssigned: number;
69 tasksCompleted: number;
70 tasksFailed: number;
71 averageTaskDurationMinutes: number;
72 reviewPassRate: number; // % of code reviews passed first time
73}
74```
75 
76### Step 2: Collect Swarm Metrics
77 
78```bash
79# Worktree status
80git worktree list --porcelain
81 
82# Queue depth
83bd ready --json | jq 'length'
84 
85# Human waiting count
86bd list --label waiting:human --json | jq 'length'
87```
88 
89Aggregate into:
90 
91```typescript
92interface SwarmMetrics {
93 timestamp: Date;
94 activeEpics: number;
95 activeTasks: number;
96 activeAgents: number;
97 pendingTasks: number;
98 blockedTasks: number;
99 waitingForHuman: number;
100 tasksCompletedLast24h: number;
101 prsCreatedLast24h: number;
102 prsMergedLast24h: number;
103}
104```
105 
106### Step 3: Collect Knowledge Metrics
107 
108```bash
109# Count facts by type
110for file in .beads/knowledge/*.jsonl; do
111 echo "$file: $(wc -l < "$file") facts"
112done
113 
114# Recent additions
115find .beads/knowledge -name "*.jsonl" -mtime -7 -exec wc -l {} \;
116 
117# Usage tracking (if implemented)
118cat .beads/knowledge/*.jsonl | jq -s '[.[].usageCount] | add'
119```
120 
121Aggregate into:
122 
123```typescript
124interface KnowledgeMetrics {
125 totalFacts: number;
126 factsByType: Record<string, number>;
127 factsAddedThisWeek: number;
128 factsUsedThisWeek: number;
129 averageConfidence: number;
130 outdatedReports: number;
131}
132```
133 
134### Step 4: Collect GitHub Metrics
135 
136```bash
137# PRs created this week
138gh pr list --state all --json number,createdAt,mergedAt,state --limit 100
139 
140# Issues closed this week
141gh issue list --state closed --json number,closedAt --limit 100
142 
143# Review turnaround
144gh pr list --state merged --json number,createdAt,mergedAt
145```
146 
147### Step 5: Collect External Service Metrics
148 
149#### PostHog Metrics (Read-Only)
150 
151```typescript
152// Use PostHog API to get product metrics
153import { getPostHogMetrics } from "@/lib/services/posthog";
154 
155const posthogMetrics = {
156 // Agent-related events
157 agentSessionsStarted: await queryPostHog("agent_session_started", { period: "7d" }),
158 agentTasksCompleted: await queryPostHog("agent_task_completed", { period: "7d" }),
159 
160 // Product health (context for agent work)
161 activeUsers: await queryPostHog("$active_users", { period: "7d" }),
162 errorRate: await queryPostHog("error_occurred", { period: "7d" }),
163 featureUsage: await queryPostHog("feature_flags", { period: "7d" }),
164};
165```
166 
167#### Stripe Metrics (Read-Only)
168 
169```typescript
170// Use Stripe API for business context
171import Stripe from "stripe";
172 
173const stripeMetrics = {
174 // Revenue context for prioritization
175 activeSubscriptions: await stripe.subscriptions
176 .list({ status: "active", limit: 1 })
177 .then(r => r.data.length),
178 mrr: await calculateMRR(),
179 
180 // Churn context (may affect agent priorities)
181 recentCancellations: await stripe.subscriptions.list({
182 status: "canceled",
183 created: { gte: sevenDaysAgo },
184 }),
185};
186```
187 
188#### AWS Metrics (Read-Only)
189 
190```typescript
191// CloudWatch metrics for infrastructure health
192import { CloudWatch } from "@aws-sdk/client-cloudwatch";
193 
194const awsMetrics = {
195 // S3 storage (attachments, exports)
196 s3ObjectCount: await getS3Metrics("NumberOfObjects"),
197 s3StorageBytes: await getS3Metrics("BucketSizeBytes"),
198 
199 //

Preview

dsifry/metaswarmdsifry/metaswarm

# Metrics Agent

**Type**: `metrics-agent`

**Role**: Collect, aggregate, and report on agent swarm performance

**Spawned By**: Swarm Coordinator (scheduled) or manual trigger

Repodsifry/metaswarm
TypeSubagents
CategoryData Science & Analytics
UpdatedJun 2026
LicenseMIT
First seenJul 27, 2026

Tags

Subagent

Related

6 picks
Type
  1. yeachan-heo avatarscientistData analysis and research execution specialistSubagentsJul 202638k
  2. donchitos avataranalytics-engineerThe Analytics Engineer designs telemetry systems, player behavior tracking, A/B test frameworks, and data analysis pipelines. Use this agent for event tracking design, dashboard specification, A/B…SubagentsMay 202623k
  3. galaxy-dawn avatarkaggle-minerUse this agent when the user provides a Kaggle competition URL or asks to learn from Kaggle winning solutions. Examples:SubagentsJul 20264.9k
  4. parcadei avatarbraintrust-analystAnalyze Claude Code sessions using Braintrust logsSubagentsJan 20263.9k
  5. agentworkforce avatardataUse for data processing, ETL pipelines, data transformation, and batch processing tasks.SubagentsJul 2026774
  6. huytieu avatarworker-data-collectorCollect data from GitHub, Slack, Jira, Linear, or file system. Structured extraction only — no synthesis.SubagentsJul 2026743