{"id":52026939,"url":"https://github.com/cyberspacesec/har-skills","last_synced_at":"2026-08-01T08:30:36.189Z","repository":{"id":120128534,"uuid":"575218507","full_name":"cyberspacesec/har-skills","owner":"cyberspacesec","description":"HAR Skills — AI-native library for HAR file analysis. Access via: Skills (CLAUDE.md), Go SDK, CLI, MCP. 23 commands, 70+ methods, progressive disclosure docs.","archived":false,"fork":false,"pushed_at":"2026-07-19T21:10:11.000Z","size":25803,"stargazers_count":23,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-07-19T22:21:43.355Z","etag":null,"topics":["ai-agent","ai-skills","cli-tool","cybersecurity","go-sdk","golang","har","har-analyzer","http-archive","mcp","performance-analysis","security-audit"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cyberspacesec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"security.go","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-07T02:31:35.000Z","updated_at":"2026-07-19T21:10:14.000Z","dependencies_parsed_at":"2024-06-12T01:18:41.994Z","dependency_job_id":null,"html_url":"https://github.com/cyberspacesec/har-skills","commit_stats":null,"previous_names":["golang-infrastructure/go-har","cyberspacesec/har-skills"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cyberspacesec/har-skills","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberspacesec%2Fhar-skills","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberspacesec%2Fhar-skills/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberspacesec%2Fhar-skills/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberspacesec%2Fhar-skills/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyberspacesec","download_url":"https://codeload.github.com/cyberspacesec/har-skills/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyberspacesec%2Fhar-skills/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36151939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-01T02:00:05.789Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agent","ai-skills","cli-tool","cybersecurity","go-sdk","golang","har","har-analyzer","http-archive","mcp","performance-analysis","security-audit"],"created_at":"2026-08-01T08:30:35.539Z","updated_at":"2026-08-01T08:30:36.173Z","avatar_url":"https://github.com/cyberspacesec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HAR Skills\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/cyberspacesec/har-skills.svg)](https://pkg.go.dev/github.com/cyberspacesec/har-skills)\n[![Go Report Card](https://goreportcard.com/badge/github.com/cyberspacesec/har-skills)](https://goreportcard.com/report/github.com/cyberspacesec/har-skills)\n[![License](https://img.shields.io/github/license/cyberspacesec/har-skills)](https://github.com/cyberspacesec/har-skills/blob/main/LICENSE)\n[![Release](https://img.shields.io/github/v/release/cyberspacesec/har-skills)](https://github.com/cyberspacesec/har-skills/releases/latest)\n[![CI](https://github.com/cyberspacesec/har-skills/actions/workflows/release.yml/badge.svg)](https://github.com/cyberspacesec/har-skills/actions)\n\n**HAR Skills is an AI-native HAR (HTTP Archive) analysis toolkit.**\n\nIt is designed for AI agents first, then exposed as a Go SDK and CLI. An agent can install one binary, inspect a HAR file, search traffic, audit security issues, score performance, redact secrets, replay requests, transform captures, diff versions, and export results in machine-readable formats.\n\n## AI Agent First\n\nHAR files are dense, noisy, and easy to mishandle in chat context. HAR Skills turns them into tool calls that agents can safely compose:\n\n- **Skill document**: [CLAUDE.md](./CLAUDE.md) is a progressive-disclosure guide written for AI agents.\n- **CLI tool surface**: `har` exposes 24 commands with text, JSON, CSV, and YAML output where supported.\n- **Go SDK surface**: the root package can be embedded into custom agent tools, workers, CI jobs, and MCP servers.\n- **Automation-safe behavior**: typed errors, nil-safe public APIs, streaming/lazy parsing, redaction, validation, and deterministic export helpers.\n- **MCP-ready direction**: the current CLI and SDK are structured so an MCP server can wrap the same capabilities without inventing a second API.\n\n### One-Prompt Agent Bootstrap\n\nGive this to an AI agent when you want it to analyze HAR files with this project:\n\n```text\nYou can use HAR Skills, an AI-native HAR (HTTP Archive) analysis toolkit.\n\nInstall:\n  go install github.com/cyberspacesec/har-skills/cmd/har@latest\n\nCore usage:\n  har -f \u003ccapture.har\u003e \u003ccommand\u003e [flags]\n  cat capture.har | har \u003ccommand\u003e\n  har -f capture.har \u003ccommand\u003e --format json\n\nStart with:\n  har -f capture.har info --format json\n  har -f capture.har security --format json\n  har -f capture.har performance --format json\n  har -f capture.har find --errors --format json\n  har -f capture.har find --slow 1000 --format json\n  har -f capture.har redact -o clean.har\n\nFull agent skill docs:\n  https://github.com/cyberspacesec/har-skills/blob/main/CLAUDE.md\n```\n\n## Capability Tree\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"./docs/assets/har-skills-feature-tree.svg\" alt=\"HAR Skills capability tree: agent access, parsing, inspection, analysis, operations, comparison, and export capabilities\" width=\"100%\"\u003e\n\u003c/p\u003e\n\nThe diagram is generated by [`scripts/render_feature_tree.py`](./scripts/render_feature_tree.py), so capability changes can be reviewed as code and re-rendered deterministically.\n\n## Access Methods\n\n| Access | Status | Best For | Entry Point |\n|--------|--------|----------|-------------|\n| **AI Agent Skill** | Ready | Claude, ChatGPT, coding agents, local automation | [CLAUDE.md](./CLAUDE.md) + `har` CLI |\n| **CLI** | Ready | Terminal, shell scripts, CI, agent tool execution | `go install github.com/cyberspacesec/har-skills/cmd/har@latest` |\n| **Go SDK** | Ready | Native Go apps and custom agent tool servers | `go get github.com/cyberspacesec/har-skills` |\n| **MCP** | Planned | MCP-compatible desktops and IDE agents | Wrap the SDK/CLI today; built-in server planned |\n\n## What Agents Can Do\n\n| Task | Recommended Tool Call |\n|------|------------------------|\n| Understand a HAR file | `har -f capture.har info --format json` |\n| Find failing requests | `har -f capture.har find --errors --format json` |\n| Find slow requests | `har -f capture.har find --slow 1000 --format json` |\n| Inspect security posture | `har -f capture.har security --format json` |\n| Score frontend/network performance | `har -f capture.har performance --format json` |\n| Remove secrets before sharing | `har -f capture.har redact -o clean.har` |\n| Compare before/after captures | `har diff before.har after.har --format json` |\n| Export reproduction commands | `har -f capture.har export curl` |\n| Replay captured traffic | `har -f capture.har replay --timeout 10s` |\n| Validate malformed captures | `har -f capture.har validate --format json` |\n\n## Install\n\n### Go Install\n\n```bash\ngo install github.com/cyberspacesec/har-skills/cmd/har@latest\nhar --version\n```\n\n### Prebuilt Binary\n\nDownload the latest build from [GitHub Releases](https://github.com/cyberspacesec/har-skills/releases/latest).\n\nSupported release targets include Linux, macOS, Windows, and FreeBSD on common x86 and ARM architectures.\n\n### Build From Source\n\n```bash\ngit clone https://github.com/cyberspacesec/har-skills.git\ncd har-skills\ngo build -o har ./cmd/har/\n./har --help\n```\n\n## CLI Quick Start\n\n```bash\nhar -f capture.har info                              # Overview\nhar -f capture.har list --limit 20                   # List entries\nhar -f capture.har find \"api/users\"                  # Search URL text\nhar -f capture.har find --errors                     # 4xx/5xx requests\nhar -f capture.har find --slow 1000                  # Requests slower than 1s\nhar -f capture.har find --response-header \"X-Debug\"  # Response header search\nhar -f capture.har headers --response --name server  # Inspect headers\nhar -f capture.har timing --summary                  # Timing breakdown\nhar -f capture.har waterfall                         # Request timeline\nhar -f capture.har security                          # Security audit\nhar -f capture.har performance                       # Performance score\nhar -f capture.har cache                             # Cacheability analysis\nhar -f capture.har cookie                            # Cookie security analysis\nhar -f capture.har connections                       # Connection reuse analysis\nhar -f capture.har content                           # Content type and size analysis\nhar -f capture.har extract --index 0 -o body.bin     # Extract response body\nhar -f capture.har redact -o clean.har               # Redact sensitive data\nhar -f capture.har transform --help                  # Rewrite URLs, headers, schemes\nhar -f capture.har export curl                       # Export as cURL commands\nhar -f capture.har export postman -o collection.json # Export Postman collection\nhar diff before.har after.har                        # Compare captures\nhar merge a.har b.har -o merged.har                  # Merge captures\nhar -f capture.har split --by domain                 # Split captures\nhar -f capture.har dedup --remove -o dedup.har       # Remove duplicate requests\nhar -f capture.har index --pattern \"api\"             # Build/query index\nhar -f capture.har validate                          # Validate HAR spec\nhar -f capture.har replay                            # Replay HTTP requests\n```\n\n## Command Reference\n\n| Command | Capability |\n|---------|------------|\n| `info` | File overview, request counts, status codes, domains, content types |\n| `list` | Entry listing with filters, sorting, and limits |\n| `find` | Search by URL, regex, status, method, domain, headers, cookies, size, speed |\n| `headers` | Request/response header inspection |\n| `timing` | DNS/connect/SSL/send/wait/receive timing analysis |\n| `waterfall` | Timeline and waterfall-style request sequencing |\n| `extract` | Response body extraction and decoding |\n| `content` | MIME type, body size, and content distribution analysis |\n| `domains` | Per-domain request and timing statistics |\n| `connections` | Connection reuse analysis |\n| `security` | Security audit for headers, cookies, CORS, mixed content, leakage |\n| `cookie` | Cookie inventory and security posture |\n| `cache` | Cache-Control and cacheability analysis |\n| `performance` | Lighthouse-style scoring and recommendations |\n| `redact` | Sensitive data redaction for passwords, tokens, API keys, IPs |\n| `transform` | URL, host, scheme, header, query, cookie, and body transformations |\n| `replay` | Re-execute captured HTTP requests |\n| `validate` | HAR format and strict validation |\n| `diff` | Compare two HAR files |\n| `merge` | Merge multiple HAR files |\n| `split` | Split by domain, page, time, size, status, or method |\n| `dedup` | Detect and remove duplicate or near-duplicate requests |\n| `index` | Build an in-memory index for fast lookup |\n| `export` | Export to curl, wget, Python, Postman, CSV, Markdown, HTML, JSON, JSONL, YAML, XML |\n\n## Go SDK\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\thar \"github.com/cyberspacesec/har-skills\"\n)\n\nfunc main() {\n\th, err := har.ParseHarFile(\"capture.har\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tstats := h.Statistics()\n\tfmt.Printf(\"requests=%d avg=%.1fms\\n\", stats.TotalRequests, stats.AvgTime)\n\n\tsecurity := h.SecurityAudit()\n\tfmt.Printf(\"security=%d/100\\n\", security.Score)\n\n\tperf := h.PerformanceScore()\n\tfmt.Printf(\"performance=%s %.1f/100\\n\", perf.Grade(), perf.OverallScore)\n\n\tredacted := h.Redact(har.DefaultRedactOptions())\n\tif err := redacted.SaveToFile(\"clean.har\", true); err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n\n## SDK Capability Areas\n\n- **Parsing**: files, bytes, readers, gzip-compressed input, stdin-friendly workflows.\n- **Large files**: standard, optimized, lazy, and streaming parsing models.\n- **Creation**: build HAR files programmatically and save formatted JSON.\n- **Search/filter**: methods, status codes, domains, content types, URL patterns, timing, size.\n- **Statistics**: global summaries, timing percentiles, domains, status codes, content distribution.\n- **Security**: headers, cookies, CORS, mixed content, sensitive data exposure.\n- **Performance**: TTFB, total load time, request count, transfer size, cache, compression.\n- **Privacy**: redaction of credentials, tokens, API keys, cookies, headers, IP addresses.\n- **Operations**: validate, transform, replay, extract, deduplicate, index.\n- **Interop**: diff, merge, split, export to common developer and report formats.\n\n## Project Layout\n\n```text\n.\n├── *.go                 # Root Go SDK package\n├── cmd/har/             # Cobra CLI used by humans and agents\n├── CLAUDE.md            # Progressive AI Agent Skill documentation\n├── docs/assets/         # Generated README diagrams and static assets\n├── scripts/             # Documentation generation helpers\n├── examples/            # SDK examples\n├── testdata/            # HAR fixtures\n└── doc/                 # Additional human documentation\n```\n\n## For Agent Tool Authors\n\nIf you are wrapping HAR Skills for another agent runtime:\n\n1. Use the CLI first when you need a stable process boundary.\n2. Prefer `--format json` for model-readable outputs.\n3. Run `redact` before sending HAR-derived content to external systems.\n4. Use `validate` before deeper analysis when the capture source is unknown.\n5. Use the Go SDK when you need long-running workers, custom filters, or embedded policy.\n\n## Contributing\n\nContributions are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## License\n\n[MIT License](LICENSE)\n\n---\n\n## 简体中文\n\n**HAR Skills 是一个 AI 原生的 HAR（HTTP Archive）分析工具集。**\n\n它优先面向 AI Agent 设计，同时提供 CLI 和 Go SDK。Agent 可以通过一个 `har` 命令完成 HAR 文件的解析、搜索、安全审计、性能评分、脱敏、重放、转换、对比、合并拆分和多格式导出。\n\n### AI Agent 接入方式\n\n| 接入方式 | 状态 | 适用场景 | 入口 |\n|----------|------|----------|------|\n| **AI Agent Skill** | 可用 | Claude、ChatGPT、编码 Agent、本地自动化 | [CLAUDE.md](./CLAUDE.md) + `har` CLI |\n| **CLI** | 可用 | 终端、脚本、CI、Agent 工具调用 | `go install github.com/cyberspacesec/har-skills/cmd/har@latest` |\n| **Go SDK** | 可用 | Go 应用、自定义 Agent 工具服务 | `go get github.com/cyberspacesec/har-skills` |\n| **MCP** | 规划中 | MCP 兼容的桌面端和 IDE Agent | 当前可先包装 CLI/SDK |\n\n### 给 Agent 的一键提示词\n\n```text\n你可以使用 HAR Skills 分析 HAR（HTTP Archive）文件。\n\n安装：\n  go install github.com/cyberspacesec/har-skills/cmd/har@latest\n\n基础用法：\n  har -f \u003ccapture.har\u003e \u003ccommand\u003e [flags]\n  cat capture.har | har \u003ccommand\u003e\n  har -f capture.har \u003ccommand\u003e --format json\n\n优先从这些命令开始：\n  har -f capture.har info --format json\n  har -f capture.har security --format json\n  har -f capture.har performance --format json\n  har -f capture.har find --errors --format json\n  har -f capture.har find --slow 1000 --format json\n  har -f capture.har redact -o clean.har\n\n完整 Skill 文档：\n  https://github.com/cyberspacesec/har-skills/blob/main/CLAUDE.md\n```\n\n### 能力概览\n\n- **读入与解析**：文件、字节、Reader、stdin、gzip、标准/优化/懒加载/流式解析。\n- **检索与洞察**：概要、列表、URL/正则搜索、状态码、Header、Cookie、域名、耗时、瀑布流。\n- **安全与隐私**：安全响应头、Cookie 安全、CORS、混合内容、敏感信息泄露、数据脱敏。\n- **性能分析**：TTFB、总加载耗时、请求数量、传输体积、缓存、压缩和优化建议。\n- **操作与修复**：验证、转换 URL/Header/Scheme、重放请求、提取响应体、去重、索引。\n- **协作与导出**：diff、merge、split，导出 curl、wget、Python、Postman、CSV、Markdown、HTML、JSON、JSONL、YAML、XML。\n\n### 常用命令\n\n```bash\nhar -f capture.har info --format json          # 文件概要\nhar -f capture.har find --errors --format json # 失败请求\nhar -f capture.har find --slow 1000            # 慢请求\nhar -f capture.har security                    # 安全审计\nhar -f capture.har performance                 # 性能评分\nhar -f capture.har redact -o clean.har         # 脱敏\nhar -f capture.har export curl                 # 导出复现命令\nhar diff before.har after.har                  # 对比两个 HAR\nhar merge a.har b.har -o merged.har            # 合并 HAR\nhar -f capture.har validate                    # 规范校验\n```\n\n### Go SDK 示例\n\n```go\nimport har \"github.com/cyberspacesec/har-skills\"\n\nh, err := har.ParseHarFile(\"capture.har\")\nif err != nil {\n\tpanic(err)\n}\n\nstats := h.Statistics()\nsecurity := h.SecurityAudit()\nperformance := h.PerformanceScore()\n\n_, _, _ = stats, security, performance\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberspacesec%2Fhar-skills","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyberspacesec%2Fhar-skills","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyberspacesec%2Fhar-skills/lists"}