Agent skill
add-httparchive-metric-report
Add new metrics to HTTPArchive reports config. USE FOR adding performance metrics, adoption/percentage metrics, or custom metric analysis from crawl data. Chooses timeseries vs histogram based on data type.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/add-httparchive-metric-report
SKILL.md
Adding Metrics to HTTPArchive Reports
Documentation
See reports.md for complete guide including:
- Architecture and processing details
- Quick Decision Guide table
- Required SQL patterns checklist
- SQL pattern reference (adoption, percentiles, binning)
- Complete examples
- Troubleshooting
Quick Start
- Open
includes/reports.js, findconfig._metrics(line ~42) - Choose type: Timeseries (adoption/percentiles) or Histogram (distributions)
- Add metric with required patterns:
date,is_root_page,${params.lens.sql},${params.devRankFilter},${ctx.ref('crawl', 'pages')},GROUP BY client - Run
get_errorsto verify
Key Rules
- Boolean/adoption metrics: Timeseries ONLY (histogram meaningless for 2 states)
- Continuous metrics: Both histogram + timeseries
- Use safe functions:
SAFE_DIVIDE(),SAFE.BOOL()for custom metrics - Filter zeros: Add
AND metric > 0before percentile calculations
Minimal Example
metricName: {
SQL: [
{
type: "timeseries", // or 'histogram'
query: DataformTemplateBuilder.create(
(ctx, params) => `
SELECT client, /* your calculations */
FROM ${ctx.ref("crawl", "pages")}
WHERE date = '${params.date}' AND is_root_page
${params.lens.sql} ${params.devRankFilter}
GROUP BY client ORDER BY client
`,
),
},
];
}
See reports.md for complete patterns and examples.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?