har-replay
仓库创建 2021年3月19日最近提交 6 天前SkillHot 收录 6 天前
▸ 精选理由
无需真实后端或数据库即可用真实流量复现问题,调试效率高。
▸ 风险提示
HAR 文件可能包含敏感数据,使用前需脱敏或审查。
这个 Skill 做什么
用 HAR 文件模拟后端响应以复现场景,便于调试前端渲染与性能问题。
把一个 .har 文件当作假后端来回放,让前端在本地用和生产一模一样的流量渲染页面,方便重现渲染或性能问题。适合要复现某个仪表盘、接口交互或用真实流量做性能诊断时使用。过程不需要数据库或鉴权,只要提供 har 文件路径就能分析并回放请求/响应。
▸ 展开 SKILL.md 英文原文
Replay a HAR file as a mock backend to reproduce frontend performance issues with production data. Use when asked to replay a HAR file, reproduce a dashboard with a HAR, or test frontend performance with captured traffic.
6.0k
Stars
750
Forks
21
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/lightdash/lightdash/main/.claude/skills/har-replay/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/lightdash/lightdash/main/.claude/skills/har-replay/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# HAR Replay
Replay a HAR file as a mock Lightdash backend so the frontend renders with exact production data. No database, warehouse, or authentication needed.
The user must provide a path to a `.har` file. If not provided as `$ARGUMENTS`, ask for it.
## Step 1: Analyze the HAR file
Run a Python script to extract key information from the HAR:
```python
import json, sys, re
from collections import Counter
from urllib.parse import urlparse
har_path = "$HAR_FILE_PATH"
with open(har_path) as f:
har = json.load(f)
entries = har['log']['entries']
# Extract the page URL from the HAR pages section
page_path = None
pages = har['log'].get('pages', [])
for p in pages:
title = p.get('tivia SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有