agentleFS
zenghurzenghur/skills/review-standards/CLAUDE.md

skills / review-standards

CLAUDE.md1 starsChanged 7 months agoMITView on GitHub

This is a coding standards skill repository containing comprehensive guidelines for Go backend and Vue 3 + TypeScript frontend development. When working in other projects, apply these standards to ensure consistency. Every code modification must: 1. Compile successfully (go build) 2. Pass golangci-lint check (golangci-lint run ./...) 3. Follow naming conventions (camelCase for interfaces) 4. Include no magic numbers or strings (use constants) 5. Have complete implementations (no placeholders) Use these standards when: - Writing new code (backend or frontend)…

  • Installs packages

The file

We split this CLAUDE.md into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Frontend (Vue 3 + TypeScript): ONLY handles presentation, receives pre-calculated data from backend

    line 37
  2. Distinctive:

    All DDL fields must have NOT NULL constraint

    line 44
  3. Very specific:

    Use struct model for gorm updates (not map[string]interface{})

    line 45
  4. Distinctive:

    No raw SQL for CRUD — use gorm model methods

    line 47
  5. Very specific:

    Never: use go keyword directly — use goroutine.SafeGo or goroutine.SafeGoWithContext

    line 48
  6. Distinctive:

    No mock data, stub functions, or TODO placeholders in production code

    line 49
  7. Very specific:

    Use errors.Is() and errors.As() for error comparison (never ==)

    line 51
  8. Very specific:

    Use Vue 3 Composition API with <script setup> syntax

    line 55
  9. Distinctive:

    No business logic or complex calculations in frontend

    line 56
  10. Distinctive:

    Every code modification must:

    line 62
  11. Distinctive:

    Follow naming conventions (camelCase for interfaces)

    line 65
  12. Distinctive:

    Use these standards when:

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Purpose

This is a coding standards skill repository containing comprehensive guidelines for Go backend and Vue 3 + TypeScript frontend development. When working in other projects, apply these standards to ensure consistency.

Key Files

  • SKILL.md — Complete coding standards documentation (46KB)
  • references/code_examples.md — Correct/incorrect code patterns demonstrating the standards
  • references/02_guidelines.md — Quick reference for LLM usage (primary)
  • references/01_foundations.md — Supplementary reading for philosophy and "why"

Development Commands

# Install golangci-lint (required for lint checks)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest

# Static analysis
go vet ./...

# Lint check (required before any PR)
golangci-lint run ./...

# Format code
gofmt -w .
goimports -w .

Core Architecture Principles

Separation of Concerns

  • Backend (Go): Handles ALL business logic, calculations, data aggregation, and database operations
  • Frontend (Vue 3 + TypeScript): ONLY handles presentation, receives pre-calculated data from backend
  • Backend trust: Frontend trusts backend to provide ready-to-display data

Key Backend Standards (Go)

  • Internal interface data uses camelCase naming
  • External system integration: use field names as-is, do not transform to camelCase. Only our own APIs follow camelCase.
  • Database fields use snake_case with explicit gorm:"column:field_name" tags
  • All DDL fields must have NOT NULL constraint
  • Use struct model for gorm updates (not map[string]interface{})
  • Timestamps use int64 (UnixMilli)
  • No raw SQL for CRUD — use gorm model methods
  • Never use go keyword directly — use goroutine.SafeGo or goroutine.SafeGoWithContext
  • No mock data, stub functions, or TODO placeholders in production code
  • Functions returning error must return zero values for other returns when error is not nil
  • Use errors.Is() and errors.As() for error comparison (never ==)
  • Cyclomatic complexity should be ≤15

Key Frontend Standards (Vue 3 + TypeScript)

  • Use Vue 3 Composition API with <script setup> syntax
  • No business logic or complex calculations in frontend
  • TypeScript strict mode, no any type
  • Pinia for global state only, no business logic in stores

Code Quality Requirements

Every code modification must:

  1. Compile successfully (go build)
  2. Pass golangci-lint check (golangci-lint run ./...)
  3. Follow naming conventions (camelCase for interfaces)
  4. Include no magic numbers or strings (use constants)
  5. Have complete implementations (no placeholders)

When Applying These Standards

Use these standards when:

  • Writing new code (backend or frontend)
  • Reviewing pull requests
  • Refactoring existing code
  • Setting up database models or DDD architecture layers

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.