Network Request Debugging HAR mitmproxy
When to use
Use this skill when intercept, inspect, and replay HTTP/S traffic using HAR files and mitmproxy debugging proxies. This applies across software engineering lifecycles, team code reviews, production debugging, prompt design, and architectural documentation.
Core principles
- Clarity Over Cleverness: Code, prompts, and technical documentation must prioritize clarity, predictability, and long-term maintainability over obscure shortcuts.
- Evidence-Based Engineering: Every decision, bug resolution, and architectural choice must be supported by empirical data, minimal reproductions, or benchmark traces.
- Cognitive Load Minimization: Design interfaces, APIs, and documents to minimize mental parsing overhead for future engineers and autonomous agents.
- Continuous Feedback Loops: Incorporate automated verification, peer reviews, and post-task retrospectives to drive iterative improvement.
Step-by-step workflow
- Define the objective and constraints: State the exact technical outcome, acceptance criteria, and operational boundaries.
- Gather baseline telemetry and context: Inspect relevant codebases, stack traces, system architecture diagrams, or log files.
- Execute structured analysis or implementation: Apply domain-specific techniques (e.g., minimal reproduction, refactoring transforms, prompt templates).
- Validate against automated test assertions: Run unit tests, linters, or schema validation parsers to verify behavioral correctness.
- Document rationale and trade-offs: Record the 'why' behind choices, documenting rejected alternatives and operational considerations.
- Conduct retrospective review: Share findings with stakeholders or record lessons learned in the team knowledge base.
Specifics & examples
# mitmproxy inline script to log slow API response timings
from mitmproxy import http
def response(flow: http.HTTPFlow) -> None:
duration = flow.response.timestamp_end - flow.request.timestamp_start
if duration > 1.0:
print(f'[SLOW] {flow.request.method} {flow.request.url} took {duration:.2f}s')
- Primary Focus Area: Debugging & troubleshooting principles designed to elevate engineering precision and team psychological safety.
Common mistakes & pitfalls
- Jumping directly into speculative fixes or complex rewrites before isolating the root cause.
- Introducing premature abstractions that increase indirection and cognitive complexity.
- Failing to document context and architectural trade-offs for subsequent maintainers.
Verification checklist
[ ] The technical deliverable or fix is validated with reproducible test assertions.
[ ] Changes preserve backwards compatibility and maintain existing contract invariants.
[ ] Documentation or commit logs clearly explain the rationale and trade-offs.
Related skills
- git-bisect-automated-bug-hunting
- stack-trace-analysis-symbolication-source-maps
- root-cause-analysis-5-whys-fishbone-diagram
- incident-postmortem-blameless-rca-authoring
1---2name: network-request-debugging-har-mitmproxy3description: Use this skill when intercept, inspect, and replay HTTP/S traffic using HAR files and mitmproxy debugging proxies.4metadata:5 source: https://skillmd.com/skills/nextboxis/network-request-debugging-har-mitmproxy6---78# Network Request Debugging HAR mitmproxy910## When to use11Use this skill when intercept, inspect, and replay HTTP/S traffic using HAR files and mitmproxy debugging proxies. This applies across software engineering lifecycles, team code reviews, production debugging, prompt design, and architectural documentation.1213## Core principles14- **Clarity Over Cleverness**: Code, prompts, and technical documentation must prioritize clarity, predictability, and long-term maintainability over obscure shortcuts.15- **Evidence-Based Engineering**: Every decision, bug resolution, and architectural choice must be supported by empirical data, minimal reproductions, or benchmark traces.16- **Cognitive Load Minimization**: Design interfaces, APIs, and documents to minimize mental parsing overhead for future engineers and autonomous agents.17- **Continuous Feedback Loops**: Incorporate automated verification, peer reviews, and post-task retrospectives to drive iterative improvement.1819## Step-by-step workflow201. **Define the objective and constraints**: State the exact technical outcome, acceptance criteria, and operational boundaries.212. **Gather baseline telemetry and context**: Inspect relevant codebases, stack traces, system architecture diagrams, or log files.223. **Execute structured analysis or implementation**: Apply domain-specific techniques (e.g., minimal reproduction, refactoring transforms, prompt templates).234. **Validate against automated test assertions**: Run unit tests, linters, or schema validation parsers to verify behavioral correctness.245. **Document rationale and trade-offs**: Record the 'why' behind choices, documenting rejected alternatives and operational considerations.256. **Conduct retrospective review**: Share findings with stakeholders or record lessons learned in the team knowledge base.2627## Specifics & examples28```python29# mitmproxy inline script to log slow API response timings30from mitmproxy import http31def response(flow: http.HTTPFlow) -> None:32 duration = flow.response.timestamp_end - flow.request.timestamp_start33 if duration > 1.0:34 print(f'[SLOW] {flow.request.method} {flow.request.url} took {duration:.2f}s')35```36- **Primary Focus Area**: Debugging & troubleshooting principles designed to elevate engineering precision and team psychological safety.3738## Common mistakes & pitfalls39- Jumping directly into speculative fixes or complex rewrites before isolating the root cause.40- Introducing premature abstractions that increase indirection and cognitive complexity.41- Failing to document context and architectural trade-offs for subsequent maintainers.4243## Verification checklist44[ ] The technical deliverable or fix is validated with reproducible test assertions.45[ ] Changes preserve backwards compatibility and maintain existing contract invariants.46[ ] Documentation or commit logs clearly explain the rationale and trade-offs.4748## Related skills49- git-bisect-automated-bug-hunting50- stack-trace-analysis-symbolication-source-maps51- root-cause-analysis-5-whys-fishbone-diagram52- incident-postmortem-blameless-rca-authoring