> Sourced from [willswire/trivy-plugin-zarf](https://github.com/willswire/trivy-plugin-zarf) โ [Apache-2.0](https://github.com/willswire/trivy-plugin-zarf/blob/20ac201614249f121b13dbe93d97a4abfc816c69/CLAUDE.md). # Trivy Plugin Zarf - Development Guidelines ## Development Philosophy: The Cycles of Creation Software, like nature, follows eternal cycles of creation and decay. Our approach embraces these truths: - **Embrace Simplicity**: All efforts eventually return to dust; create systems that are simple and focused on serving immediate needs rather than speculative futures. - **Value Clarity Over Novelty**: There is "nothing new under the sun" in software patterns; prefer established patterns that are well-understood. - **Build for Impermanence**: Code is transient; optimize for maintainability and readability rather than cleverness or premature optimization. - **Seek Essential Truth**: Strip away complexity to reveal the core purpose of each component. The eye is never satisfied with seeing more features. - **Remember History**: Learn from past solutions; most problems have been solved before in different contexts. ## Build & Test Commands - Build: `go build` - Run locally: `go run main.go <zarf-package.tar>` - CI release: Uses GoReleaser to build and package for multiple platforms ## Zarf Commands that get used to do relevant things - Pull a zarf package from OCI: `zarf package pull oci://<image>:<tag>` - Extract a zarf package: `zarf tools archiver decompress <zarf-package.tar>` ## Code Style Guidelines - Go version: 1.21+ - Error handling: Use idiomatic Go error handling with detailed error messages - Imports: Group standard library imports first, followed by third-party imports - Naming: Use descriptive camelCase for variables, functions, and PascalCase for exported types - Types: Define clear types for structured data (e.g., OCIIndex, Manifest) - Functions: Keep functions focused on single responsibility with clear error returns - Comments: Document exported types and complex functionality - Error wrapping: Use fmt.Errorf with %w for error context - Formatting: Use gofmt/goimports for consistent code formatting - Line length: Prefer lines under 100 characters - Logging: Use `logger.Default().<level>` for user feedback and progress reporting
Add to your project
Paste into your project's CLAUDE.md or ~/.claude/CLAUDE.md for global rules.
More for Go
Go Backend Development
by @Claude Rules
Building robust, idiomatic Go services with clean architecture and proper error handling.
Mindx CLAUDE.md
by @DotNetAge
ไธไธชๅฏ่ชไธป่ฟๅ็ๆฐๅญๅๅ่บซ
Graphgrc CLAUDE.md
by @engseclabs
Build security program documentation using Git and Markdown
Go Util CLAUDE.md
by @mzzsfy
ไธไบ่ช็จ็goๅทฅๅ ท
Fog CLAUDE.md
by @ArjenSchwarz
Tool for managing your CloudFormation
Helm Charts CLAUDE.md
by @christianhuth
Helm Charts for various Applications
MCP servers for Go
github/github-mcp-server
๐ โ๏ธ - Official GitHub server for integration with repository management, PRs, issues, and more.
googleapis/genai-toolbox
๐๏ธ โ๏ธ - Open source MCP server specializing in easy, fast, and secure tools for Databases.
mickaelkerjean/filestash
๐๏ธ โ๏ธ - Remote Storage Access: SFTP, S3, FTP, SMB, NFS, WebDAV, GIT, FTPS, gcloud, azure blob, sharepoint, etc.
Browse by Tag
Get the Claude Code Starter Pack
Top CLAUDE.md rules for Next.js, TypeScript, Python, Go, and React โ free.
