skills/go-hystrix/SKILL.md
Audit and optimize Hystrix circuit breaker implementations in Go services for scaling, performance, and availability
npx skillsauth add stevefeldman/agents-skills go-hystrixInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit a Go service's Hystrix circuit breaker implementation across 7 dimensions: configuration tuning, error handling, code patterns, observability, naming conventions, testing, and fallback patterns. Produces a tiered report with quick-win code fixes and recommendations requiring team decisions.
Go services using github.com/afex/hystrix-go implement circuit breakers to protect downstream dependencies. Common patterns include:
hystrix.ConfigureCommand() in main.go to set timeouts, concurrency, and error thresholdshystrix.Go() with a channel+select pattern for async executionhystrix.GetCircuit() in instrumenting middleware for Prometheus metricshystrix.NewStreamHandler() for real-time circuit monitoring$ARGUMENTS contains file paths or a subdirectory: scoped audit — only audit hystrix usage in those files$ARGUMENTS is empty: full repo audit — audit the entire service in the current working directoryFor scoped audits, skip dimensions where no relevant findings exist and produce a condensed report.
go.mod for github.com/afex/hystrix-go dependency*.go files for "github.com/afex/hystrix-go/hystrix" importshystrix.ConfigureCommand() calls (typically in main.go)Timeout value and whether it's hardcoded or config-drivenMaxConcurrentRequests valueErrorPercentThreshold valueSleepWindow or RequestVolumeThreshold are set (note if using defaults)Build the Command Inventory Table:
| Command | Timeout | MaxConcurrent | ErrorThreshold | SleepWindow | ReqVolumeThreshold | File:Line | |---------|---------|---------------|----------------|-------------|-------------------|-----------|
hystrix.Go() and hystrix.Do() calls across *.go fileshystrix.GetCircuit() calls — these indicate monitoring/metrics integrationgetCircuitStatus() helper)hystrix.Go()/hystrix.Do() closure to identify what external service or resource it protectsOutput: A command map linking each command to its configuration, execution site, and protected dependency. This map is the foundation for all 7 dimension audits.
For each dimension (1-7), read the corresponding reference file under references/, then run its checklist against the command map and source code. For each finding:
Dimension order:
references/configuration-tuning.mdreferences/error-handling.mdreferences/code-patterns.mdreferences/observability.mdreferences/naming-conventions.mdreferences/testing-patterns.mdreferences/fallback-patterns.mdProduce the audit report in this format. For dimensions with no findings, include the heading with "No issues found."
# Hystrix Audit Report: {service-name}
## Executive Summary
- **Commands audited:** {count}
- **Dependencies protected:** {list}
- **Overall health:** {Critical: N | Warning: N | Info: N}
### Quick Wins (ready to apply)
| # | Finding | Dimension | Severity | File:Line |
|---|---------|-----------|----------|-----------|
| 1 | ... | ... | ... | ... |
### Recommendations (team decision needed)
| # | Finding | Dimension | Severity | Effort |
|---|---------|-----------|----------|--------|
| 1 | ... | ... | ... | S/M/L |
---
## Command Inventory
| Command | Timeout | MaxConcurrent | ErrorThreshold | Protected Dependency | File:Line |
|---------|---------|---------------|----------------|---------------------|-----------|
---
## Dimension 1: Configuration Tuning
### Findings
{findings with severity badges}
### Quick Win Code
{before/after diffs for fixable items}
## Dimension 2: Error Handling
### Findings
{error filtering analysis, swallowed errors}
### Quick Win Code
{fixes where applicable}
## Dimension 3: Code Patterns
### Findings
{deviations from standard boilerplate}
### Quick Win Code
{normalization diffs}
## Dimension 4: Observability
### Findings
{metrics integration, stream handler, alerting gaps}
### Quick Win Code
{missing metrics registration, etc.}
## Dimension 5: Naming Conventions
### Findings
{inconsistent or non-traceable names}
### Quick Win Code
{renames where safe}
## Dimension 6: Testing
### Findings
{missing circuit breaker test coverage}
### Recommendations
{test patterns to add}
## Dimension 7: Fallback Patterns
### Findings
{flag missing fallbacks — no prescriptive fixes, defer to team}
Severity definitions:
Effort sizing for recommendations:
development
Use when reviewing Dependabot alerts, npm audit findings, govulncheck output, or CVE reports on a JavaScript/Node.js or Go project — especially when triaging multiple alerts across direct and transitive dependencies to assess real-world risk and produce a remediation plan.
development
Use when a code review finding needs proof — write a focused test in JavaScript or Go that either confirms the issue is real or exposes it as over-engineering hyperbole. Trigger after code-review or code-review-skill findings are presented and evidence is requested.
development
Produce data-driven software delivery estimates by analyzing historical JIRA tickets, git activity, and engineer track records, then matching the new work against the most similar past tickets. Use this skill whenever the user asks "how long will this take", wants to estimate a piece of work, scope an epic, plan a sprint, or estimate delivery for JIRA stories or a Figma design. Also use whenever the user wants developer-to-work assignment recommendations based on history, wants to optimize an estimate by adding or reallocating engineers, or asks "what's the fastest way to ship this" or "who should work on this". Especially trigger when the user provides JIRA ticket IDs, JIRA story links, or Figma designs together with any indication of a team that will execute the work.
tools
Use when auditing an existing test suite for quality and coverage gaps, evaluating Playwright migration readiness, scoring automation against a world-class e-commerce standard, or guiding the creation of new tests. Applicable to Selenium, WebdriverIO, and Playwright suites.