/context-load-testing-go
Load comprehensive Go testing documentation with adaptive project analysis and framework detection
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/context-load-testing-go
Context preview
What this command does when you run it.
Load comprehensive Go testing documentation with adaptive project analysis and framework detection
Command definition
context-load-testing-go.mdallowed-tools: Read, Write, Bash(fd:*), Bash(rg:*), Bash(git:*), Bash(gdate:*), Bash(jq:*), Bash(wc:*), WebFetch, Task, mcp__context7__resolve-library-id, mcp__context7__get-library-docs
name: "Context Load Testing Go"
description: "Load comprehensive Go testing documentation with adaptive project analysis and framework detection"
author: "wcygan"
tags: ["context","testing"]
version: "1.0.0"
created_at: "2025-07-14T00:00:00Z"
updated_at: "2025-07-14T00:00:00Z"
Context
- Session ID: !`gdate +%s%N`
- Current directory: !`pwd`
- Go modules detected: !`fd go.mod . -d 3 | wc -l | tr -d ' ' || echo "0"`
- Test files count: !`fd "_test\.go$" . | wc -l | tr -d ' ' || echo "0"`
- Benchmark functions: !`rg "func Benchmark" . --type go | wc -l | tr -d ' ' || echo "0"`
- Example functions: !`rg "func Example" . --type go | wc -l | tr -d ' ' || echo "0"`
- Testing frameworks: !`rg "(testify|ginkgo|gomega|goconvey)" go.mod 2>/dev/null | head -3 || echo "standard"`
- Module path: !`rg "^module " go.mod 2>/dev/null | head -1 | cut -d' ' -f2 || echo "no-module"`
- Go version: !`rg "^go " go.mod 2>/dev/null | head -1 | cut -d' ' -f2 || go version 2>/dev/null | cut -d' ' -f3 || echo "unknown"`
- Test coverage files: !`fd "coverage\.(out|html|txt)$" . | wc -l | tr -d ' ' || echo "0"`
- Build constraints: !`rg "//go:build" . --type go | wc -l | tr -d ' ' || echo "0"`
- Git repository: !`git rev-parse --is-inside-work-tree 2>/dev/null && echo "Yes" || echo "No"`
- Recent test changes: !`git log --oneline --since="1 week ago" -- "*_test.go" 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
Your Task
STEP 1: Initialize comprehensive Go testing context session
- CREATE session state file: `/tmp/go-testing-context-$SESSION_ID.json`
- SET initial state:
{
"sessionId": "$SESSION_ID",
"timestamp": "ISO_8601_TIMESTAMP",
"phase": "initialization",
"performance_metrics": {
"start_time": "ISO_8601_TIMESTAMP",
"phase_timings": {},
"agent_completion_times": {},
"total_duration": null
},
"go_project_analysis": {
"modules_count": "auto-detect",
"test_files_count": "auto-detect",
"testing_frameworks": [],
"go_version": "auto-detect",
"complexity_level": "unknown"
},
"documentation_sources": {},
"focus_areas": [],
"context_optimization": {},
"checkpoints": {},
"error_recovery": {
"failed_operations": [],
"recovery_attempts": [],
"partial_completions": []
}
}- CREATE context workspace: `/tmp/go-testing-context-$SESSION_ID/`
- INITIALIZE Go project structure analysis
STEP 2: Go project structure analysis and testing framework detection
Think deeply about the optimal context loading strategy based on the detected Go project characteristics and testing patterns.
IF complexity appears high (>50 test files OR multiple frameworks):
- Think harder about enterprise Go testing architecture patterns and optimal sub-agent coordination strategies
- ANALYZE project structure from Context section
- DETERMINE testing complexity and framework usage patterns
- IDENTIFY testing scope and specialization requirements
- ASSESS current testing maturity and coverage level
IF Test files > 50 AND multiple frameworks detected:
- SET complexity_level = "enterprise"
- ENABLE comprehensive testing guidance with advanced patterns
- FOCUS on testing architecture, performance optimization, and CI/CD integration
ELSE IF Test files > 10 AND testify or other frameworks detected:
- SET complexity_level = "moderate"
- USE focused testing framework guidance with best practices
- PRIORITIZE framework-specific patterns and integration testing
ELSE:
- SET complexity_level = "basic"
- PROCEED with foundational Go testing guidance
- EMPHASIZE standard library testing patterns and basic best practices
STEP 3: Adaptive documentation loading strategy
TRY:
IF complexity_level == "enterprise":
- USE Task tool for comprehensive parallel documentation loading:
1. **Standard Library Deep Dive Agent**: Core testing package, subtests, benchmarks
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/stdlib-deep-dive.json`
- CHECKPOINT: Standard library analysis complete
2. **Framework Mastery Agent**: Testify, Ginkgo, GoMock advanced patterns
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/framework-mastery.json`
- CHECKPOINT: Framework analysis complete
3. **Performance Testing Agent**: Benchmarking, profiling, performance testing
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/performance-testing.json`
- CHECKPOINT: Performance analysis complete
4. **Testing Architecture Agent**: Test organization, CI/CD, coverage strategies
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/testing-architecture.json`
- CHECKPOINT: Architecture analysis complete
5. **Advanced Patterns Agent**: Integration testing, mocking, race detection
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/advanced-patterns.json`
- CHECKPOINT: Advanced patterns analysis complete
- COORDINATE: Wait for all agents to complete before synthesis
- VALIDATE: Ensure all checkpoint files exist before proceeding
ELSE IF complexity_level == "moderate":
- EXECUTE focused documentation loading with Context7 and WebFetch:
1. **Go Testing Package Documentation**
- USE Context7: resolve-library-id for "golang testing"
- FETCH: Core testing functions, table-driven patterns, subtests
- FOCUS: t.Run, testing.TB, test organization, benchmarks
- EXTRACT: Best practices for test structure and naming
2. **Testify Framework Documentation**
- URL: `https://github.com/stretchr/testify`
- FETCH: Assertions, mocks, suites, test organization
- FOCUS: assert vs require, mock patterns, test suites
- EXTRACT: Framework integration and advanced usage patterns
3. **Table-Driven Testing Patterns**
- URL: `https://go.dev/wiki/TableDrivenTests`
-
Read more
allowed-tools: Read, Write, Bash(fd:*), Bash(rg:*), Bash(git:*), Bash(gdate:*), Bash(jq:*), Bash(wc:*), WebFetch, Task, mcp__context7__resolve-library-id, mcp__context7__get-library-docs name: "Context Load Testing Go" description: "Load comprehensive Go testing documentation with adaptive project analysis and framework detection" author: "wcygan" tags: ["context","testing"] version: "1.0.0" created_at: "2025-07-14T00:00:00Z" updated_at: "2025-07-14T00:00:00Z"
Context
- Session ID: !`gdate +%s%N`
- Current directory: !`pwd`
- Go modules detected: !`fd go.mod . -d 3 | wc -l | tr -d ' ' || echo "0"`
- Test files count: !`fd "_test\.go$" . | wc -l | tr -d ' ' || echo "0"`
- Benchmark functions: !`rg "func Benchmark" . --type go | wc -l | tr -d ' ' || echo "0"`
- Example functions: !`rg "func Example" . --type go | wc -l | tr -d ' ' || echo "0"`
- Testing frameworks: !`rg "(testify|ginkgo|gomega|goconvey)" go.mod 2>/dev/null | head -3 || echo "standard"`
- Module path: !`rg "^module " go.mod 2>/dev/null | head -1 | cut -d' ' -f2 || echo "no-module"`
- Go version: !`rg "^go " go.mod 2>/dev/null | head -1 | cut -d' ' -f2 || go version 2>/dev/null | cut -d' ' -f3 || echo "unknown"`
- Test coverage files: !`fd "coverage\.(out|html|txt)$" . | wc -l | tr -d ' ' || echo "0"`
- Build constraints: !`rg "//go:build" . --type go | wc -l | tr -d ' ' || echo "0"`
- Git repository: !`git rev-parse --is-inside-work-tree 2>/dev/null && echo "Yes" || echo "No"`
- Recent test changes: !`git log --oneline --since="1 week ago" -- "*_test.go" 2>/dev/null | wc -l | tr -d ' ' || echo "0"`
Your Task
STEP 1: Initialize comprehensive Go testing context session
- CREATE session state file: `/tmp/go-testing-context-$SESSION_ID.json`
- SET initial state:
{
"sessionId": "$SESSION_ID",
"timestamp": "ISO_8601_TIMESTAMP",
"phase": "initialization",
"performance_metrics": {
"start_time": "ISO_8601_TIMESTAMP",
"phase_timings": {},
"agent_completion_times": {},
"total_duration": null
},
"go_project_analysis": {
"modules_count": "auto-detect",
"test_files_count": "auto-detect",
"testing_frameworks": [],
"go_version": "auto-detect",
"complexity_level": "unknown"
},
"documentation_sources": {},
"focus_areas": [],
"context_optimization": {},
"checkpoints": {},
"error_recovery": {
"failed_operations": [],
"recovery_attempts": [],
"partial_completions": []
}
}- CREATE context workspace: `/tmp/go-testing-context-$SESSION_ID/`
- INITIALIZE Go project structure analysis
STEP 2: Go project structure analysis and testing framework detection
Think deeply about the optimal context loading strategy based on the detected Go project characteristics and testing patterns.
IF complexity appears high (>50 test files OR multiple frameworks):
- Think harder about enterprise Go testing architecture patterns and optimal sub-agent coordination strategies
- ANALYZE project structure from Context section
- DETERMINE testing complexity and framework usage patterns
- IDENTIFY testing scope and specialization requirements
- ASSESS current testing maturity and coverage level
IF Test files > 50 AND multiple frameworks detected:
- SET complexity_level = "enterprise"
- ENABLE comprehensive testing guidance with advanced patterns
- FOCUS on testing architecture, performance optimization, and CI/CD integration
ELSE IF Test files > 10 AND testify or other frameworks detected:
- SET complexity_level = "moderate"
- USE focused testing framework guidance with best practices
- PRIORITIZE framework-specific patterns and integration testing
ELSE:
- SET complexity_level = "basic"
- PROCEED with foundational Go testing guidance
- EMPHASIZE standard library testing patterns and basic best practices
STEP 3: Adaptive documentation loading strategy
TRY:
IF complexity_level == "enterprise":
- USE Task tool for comprehensive parallel documentation loading:
1. **Standard Library Deep Dive Agent**: Core testing package, subtests, benchmarks
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/stdlib-deep-dive.json`
- CHECKPOINT: Standard library analysis complete
2. **Framework Mastery Agent**: Testify, Ginkgo, GoMock advanced patterns
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/framework-mastery.json`
- CHECKPOINT: Framework analysis complete
3. **Performance Testing Agent**: Benchmarking, profiling, performance testing
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/performance-testing.json`
- CHECKPOINT: Performance analysis complete
4. **Testing Architecture Agent**: Test organization, CI/CD, coverage strategies
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/testing-architecture.json`
- CHECKPOINT: Architecture analysis complete
5. **Advanced Patterns Agent**: Integration testing, mocking, race detection
- SAVE findings to: `/tmp/go-testing-context-$SESSION_ID/advanced-patterns.json`
- CHECKPOINT: Advanced patterns analysis complete
- COORDINATE: Wait for all agents to complete before synthesis
- VALIDATE: Ensure all checkpoint files exist before proceeding
ELSE IF complexity_level == "moderate":
- EXECUTE focused documentation loading with Context7 and WebFetch:
1. **Go Testing Package Documentation**
- USE Context7: resolve-library-id for "golang testing"
- FETCH: Core testing functions, table-driven patterns, subtests
- FOCUS: t.Run, testing.TB, test organization, benchmarks
- EXTRACT: Best practices for test structure and naming
2. **Testify Framework Documentation**
- URL: `https://github.com/stretchr/testify`
- FETCH: Assertions, mocks, suites, test organization
- FOCUS: assert vs require, mock patterns, test suites
- EXTRACT: Framework integration and advanced usage patterns
3. **Table-Driven Testing Patterns**
- URL: `https://go.dev/wiki/TableDrivenTests`
-
A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.
Repo: kiliczsh/claude-cmd
Other commands on claude-cmd.
- /agent-browser-automation
Automate browser interactions for development testing using Puppeteer MCP
Open command - /agent-prep-merge
Prepare branches for merging across multiple worktrees and coordinate integration
Open command - /agent-persona-accessibility-expert
Transform into accessibility expert for WCAG compliance and inclusive design
Open command - /agent-persona-api-designer
Transform into an API design specialist who creates well-structured, developer-friendly APIs
Open command - /agent-persona-backend-specialist
Transform into backend specialist for scalable API and system design
Open command - /agent-persona-cloud-architect
Cloud architect persona for designing scalable, secure cloud infrastructure using modern cloud-native technologies
Open command

