Skip to content
Development
Command

/context-load-go-connectrpc

Load comprehensive Go ConnectRPC documentation context with project-specific optimization

From plugin
claude-cmd
313180 skills180 commands

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-go-connectrpc

Context preview

What this command does when you run it.

Load comprehensive Go ConnectRPC documentation context with project-specific optimization

Command definition

context-load-go-connectrpc.md
allowed-tools: Read, WebFetch, Bash(fd:*), Bash(rg:*), Bash(jq:*), Bash(gdate:*), Bash(go:*)
name: "Context Load Go Connectrpc"
description: "Load comprehensive Go ConnectRPC documentation context with project-specific optimization"
author: "wcygan"
tags: ["context","go"]
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 projects: !`fd "go\\.mod" . | head -5 || echo "No Go projects found"`
  • ConnectRPC usage: !`rg "connect-go|connectrpc\\.com" . --type go | wc -l | tr -d ' ' || echo "0"`
  • Protocol buffers: !`fd "\\.proto$" . | head -5 || echo "No .proto files found"`
  • Generated code: !`fd ".*\\.pb\\.go$" . | head -5 || echo "No generated Go files found"`
  • Buf configuration: !`fd "(buf\\.yaml|buf\\.yml|buf\\.gen\\.yaml)" . | head -3 || echo "No Buf config found"`
  • Technology stack: !`fd "(deno\\.json|package\\.json|Cargo\\.toml)" . | head -3 || echo "Go-only project"`
  • Git status: !`git status --porcelain | head -3 || echo "Not a git repository"`

Your Task

STEP 1: Initialize context loading session

  • CREATE session state file: `/tmp/go-connectrpc-context-$SESSION_ID.json`
  • SET initial state:
  {
    "sessionId": "$SESSION_ID",
    "phase": "discovery",
    "context_sources": [],
    "loaded_topics": [],
    "project_specific_focus": [],
    "documentation_cache": {},
    "go_features_detected": []
  }

STEP 2: Project-specific context analysis

  • ANALYZE project structure from Context section
  • DETERMINE specific ConnectRPC features in use
  • IDENTIFY documentation priorities based on project needs

IF Go projects with ConnectRPC usage found:

  • FOCUS on project-specific implementation patterns
  • PRIORITIZE relevant service definitions and client patterns
  • INCLUDE deployment and testing contexts

ELSE:

  • LOAD general ConnectRPC foundation and getting-started guides
  • EMPHASIZE setup, configuration, and basic service implementation
  • INCLUDE project setup and code generation workflows

STEP 3: Strategic documentation loading

TRY:

  • EXECUTE systematic context loading from prioritized sources
  • USE WebFetch tool for each documentation URL
  • PROCESS and organize information by functional area
  • SAVE loaded context to session state

**Core Documentation Sources:**

FOR EACH priority source:

1. **ConnectRPC Official Documentation**

  • URL: `https://connectrpc.com/docs/`
  • FETCH: Core concepts, getting started, service implementation
  • FOCUS: Protocol definition, code generation, streaming patterns
  • EXTRACT: Implementation examples and best practices

2. **ConnectRPC Go Implementation**

  • URL: `https://connectrpc.com/docs/go/`
  • FETCH: Go-specific implementation patterns and client libraries
  • FOCUS: Service handlers, client creation, middleware integration
  • EXTRACT: Go code examples and configuration patterns

3. **Buf Schema Registry Documentation**

  • URL: `https://buf.build/docs/`
  • FETCH: Schema management, code generation, breaking change detection
  • FOCUS: Buf CLI usage, module system, code generation
  • EXTRACT: Workflow automation and CI/CD integration patterns

4. **Protocol Buffers Language Guide**

  • URL: `https://protobuf.dev/programming-guides/proto3/`
  • FETCH: Proto3 syntax, message definitions, service declarations
  • FOCUS: Field types, message composition, service design
  • EXTRACT: Schema design best practices and optimization patterns

5. **ConnectRPC Examples Repository**

  • URL: `https://github.com/connectrpc/examples-go`
  • FETCH: Practical implementation examples and patterns
  • FOCUS: Real-world service implementations and client usage
  • EXTRACT: Complete example applications and integration patterns

6. **gRPC Go Integration Guide**

  • URL: `https://grpc.io/docs/languages/go/`
  • FETCH: gRPC compatibility and migration patterns
  • FOCUS: Interceptors, error handling, streaming patterns
  • EXTRACT: Advanced patterns and performance optimization

CATCH (documentation_fetch_failed):

  • LOG failed sources to session state
  • CONTINUE with available documentation
  • PROVIDE manual context loading instructions
  • SAVE fallback documentation references

STEP 4: Context organization and optimization

  • ORGANIZE loaded context by functional area:
  • Service definition and Protocol Buffers design
  • Code generation and build workflows
  • Server implementation and handler patterns
  • Client implementation and connection management
  • Streaming patterns (unary, server, client, bidirectional)
  • Interceptors and middleware chains
  • Error handling and status codes
  • Testing strategies and mock generation
  • Performance optimization and monitoring
  • SYNTHESIZE project-specific guidance:
  • Integration with existing Go codebase
  • Migration strategies from gRPC or REST APIs
  • Best practices for detected use cases
  • Security considerations for RPC services

STEP 5: Session state management and completion

  • UPDATE session state with loaded context summary
  • SAVE context cache: `/tmp/go-connectrpc-context-cache-$SESSION_ID.json`
  • CREATE context summary report
  • MARK completion checkpoint

FINALLY:

  • ARCHIVE context session data for future reference
  • PROVIDE context loading summary
  • CLEAN UP temporary session files

Context Loading Strategy

**Adaptive Loading Based on Project Type:**

CASE project_context: WHEN "existing_connectrpc_services":

  • PRIORITIZE: Service implementation patterns, client usage, interceptors
  • FOCUS: Advanced streaming, error handling, performance optimization
  • EXAMPLES: Service composition, client connection pooling

WHEN "grpc_migration":

  • PRIORITIZE: Migration guides, compatibility patterns, feature parity
  • FOCUS: gRPC to ConnectRPC migration, interceptor conversion
  • EXAMPLES: Gradual migration strategies, dual-protocol support

WHEN "new_rpc_project":

  • PRIORITIZE: Getting started, project setup, basic service implementati
Read more
Ships withclaude-cmd

A lightweight (~46kB) and comprehensive CLI tool for managing Claude commands, configurations, and workflows.

Get the whole plugin