go-project
Analyze Go projects for onboarding. Use when exploring Go codebases, understanding project structure, analyzing go.mod dependencies, identifying architecture patterns (Clean Architecture, DDD, hexagonal), finding entry points (main.go, cmd/), understanding package organization, reviewing test structure, generating package dependency graphs in Mermaid format, and generating onboarding documentation for Go projects.
What this skill does
## Purpose
Provide comprehensive analysis of Go projects to help new team members understand the codebase quickly. This skill leverages the go-specialist agent to analyze Go-specific patterns, idioms, and best practices.
## When to Use
Use this skill when you need to:
- **Onboard to a new Go project** - Get a complete overview of the codebase structure
- **Understand project architecture** - Identify Clean Architecture, DDD, or hexagonal patterns
- **Analyze dependencies** - Review go.mod and understand external package usage
- **Find entry points** - Locate main.go files and cmd/ directory structure
- **Review package organization** - Understand internal/, pkg/, and module boundaries
- **Examine test coverage** - Analyze test file organization and testing patterns
- **Generate dependency graphs** - Create Mermaid diagrams showing package relationships
- **Document the codebase** - Generate onboarding documentation
## Key Information
### Go Project Structure Patterns
#### Standard Go Project Layout
```
project/
├── cmd/ # Main applications (entry points)
│ ├── api/
│ │ └── main.go
│ └── worker/
│ └── main.go
├── internal/ # Private application code
│ ├── domain/ # Business logic
│ ├── repository/ # Data access
│ ├── service/ # Application services
│ └── handler/ # HTTP/gRPC handlers
├── pkg/ # Public library code
├── api/ # API definitions (OpenAPI, proto)
├── configs/ # Configuration files
├── scripts/ # Build and deployment scripts
├── test/ # Additional test data
├── go.mod # Module definition
├── go.sum # Dependency checksums
└── Makefile # Build commands
```
### Analysis Checklist
When analyzing a Go project, examine:
1. **Entry Points**
- `cmd/` directory structure
- `main.go` files and their initialization
- Build tags and conditional compilation
2. **Module Structure**
- `go.mod` - module path, Go version, dependencies
- `go.sum` - verify dependency integrity
- Replace directives for local development
3. **Package Organization**
- `internal/` - private packages not importable externally
- `pkg/` - public reusable packages
- Package naming conventions and cohesion
4. **Architecture Patterns**
- Clean Architecture layers (domain, usecase, interface, infrastructure)
- DDD patterns (entities, value objects, aggregates, repositories)
- Hexagonal/Ports & Adapters pattern
5. **Code Quality**
- Concise and non-redundant implementation
- Consistent coding conventions
- Error handling patterns
- Linting configuration (golangci-lint)
### Analysis Commands
```bash
# Find all main.go files (entry points)
find . -name "main.go" -type f
# List all packages
go list ./...
# Show module dependencies
go mod graph
# Check for outdated dependencies
go list -u -m all
# Analyze test coverage
go test -cover ./...
# Find interfaces
grep -r "type.*interface" --include="*.go"
# Find structs
grep -r "type.*struct" --include="*.go"
```
### Package Dependency Graph (Mermaid)
Generate a visual dependency graph in Mermaid format to understand package relationships.
#### Generating the Dependency Graph
```bash
# Get all package dependencies in graph format
go mod graph
# List internal package imports
go list -f '{{.ImportPath}} -> {{join .Imports ", "}}' ./...
```
#### Mermaid Output Format
Create a `dependency-graph.md` file with Mermaid diagrams. Use the reference templates in the `reference/` folder:
- **Internal Dependencies**: See `reference/internal-dependencies.mmd`
- **External Dependencies**: See `reference/external-dependencies.mmd`
- **Layer Architecture**: See `reference/layer-architecture.mmd`
Example output structure:
```markdown
# Package Dependency Graph
## Internal Package Dependencies
\`\`\`mermaid
<!-- Copy and adapt from reference/internal-dependencies.mmd -->
\`\`\`
## External Dependencies
\`\`\`mermaid
<!-- Copy and adapt from reference/external-dependencies.mmd -->
\`\`\`
```
#### Analysis Script
Use this bash script to extract package dependencies:
```bash
# Extract internal package dependencies
go list -f '{{.ImportPath}}|{{range .Imports}}{{.}}|{{end}}' ./... 2>/dev/null | while IFS='|' read -r pkg imports; do
# Filter to show only internal imports
module=$(go list -m)
echo "$imports" | tr '|' '\n' | grep "^$module" | while read -r imp; do
echo " $(basename $pkg) --> $(basename $imp)"
done
done
```
#### Output File Structure
When generating the dependency graph, create:
1. **`docs/dependency-graph.md`** - Main Mermaid diagram file
2. Include sections for:
- Internal package dependencies (flowchart)
- External dependencies (list with versions)
- Layer/architecture visualization
- Circular dependency warnings (if any)
#### Layer-based Visualization
For Clean Architecture or layered projects, use the template in `reference/layer-architecture.mmd`.
This template visualizes:
- Presentation Layer (HTTP Handlers, Middleware)
- Application Layer (Use Cases, Services)
- Domain Layer (Entities, Repository Interfaces)
- Infrastructure Layer (Database, Cache, External APIs)
### Output Format
Generate an onboarding report with:
1. **Project Overview**
- Module name and Go version
- Purpose and main functionality
- Key entry points
2. **Architecture Summary**
- Identified patterns
- Layer organization
- Key abstractions
3. **Dependency Analysis**
- Critical external dependencies
- Internal package graph
- Third-party framework usage
4. **Package Dependency Graph** (Mermaid file output)
- Generate `docs/dependency-graph.md` with Mermaid diagrams
- Internal package relationships
- External dependency visualization
- Architecture layer diagram
5. **Development Guide**
- How to build and run
- Testing approach
- Configuration requirements
6. **Key Files to Read**
- Recommended reading order
- Critical files for understanding the system
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.