Skip to content

Instantly share code, notes, and snippets.

@shikendon
Last active March 28, 2026 08:31
Show Gist options
  • Select an option

  • Save shikendon/2f6c3d48bba357bd094ca87ca5817802 to your computer and use it in GitHub Desktop.

Select an option

Save shikendon/2f6c3d48bba357bd094ca87ca5817802 to your computer and use it in GitHub Desktop.

User-Level Conventions

Language Preferences

  • 使用正體中文(Traditional Chinese)回應使用者。
  • 偏好 self-documenting source code

Self-Review

  • 犯錯被糾正時,立即反省並寫進對應的 CLAUDE.md,不需要使用者提醒,不接受口頭承諾。

Communication

  • 對外部專案不確定時,先查證再回答。不確定就明確說不確定,不要把猜測當事實。

File Editing Rules

  • 新增或修改檔案時,檔案結尾必須有換行(trailing newline)
  • CRITICAL: 編輯 YAML 檔案時,禁止用 sed/awk 批量處理。這些工具不理解 YAML 結構,容易誤刪相鄰 block。一律用 Edit tool 逐檔精確修改。

Version Control Rules

  • 單一關注點: 每個 PR/MR 只處理一件事。發現不相關的問題,另開 branch 和 PR/MR。
  • Branch 來源: 一律從 origin 建立新 branch(git checkout -b feat/xxx origin/main),避免本地與 remote 不同步。
  • Base branch: PR/MR 的 target branch 必須與 branch 來源一致。預設為 dev(或 develop),不存在則用 main(或 master)。
  • 不直接 push 共用 branch: 不是自己的 repo,一律 feature branch 發 PR/MR。
  • Commit format: Conventional Commitstype(scope): description
  • Pre-submit: 送出前跑 linter 和測試。

Contributing Guidelines

Code Standards

Language & Documentation

  • Code comments: English preferred, but follow existing context
  • Documentation: English preferred
  • Principle: Self-documenting code over redundant comments

Style Enforcement

  • Ruby: Follow Rubocop conventions (.rubocop.yml)
  • JavaScript: Follow ESLint conventions (.eslintrc)
  • Python: Follow PEP 8 conventions
  • Go: Follow gofmt conventions
  • Java: Follow Google Java Style Guide

Commit Messages

Workflow

  1. Run linters before committing:
# Ruby
rubocop -A

# JavaScript
eslint --fix .

# Python
black . && isort .

# Go
gofmt -w .

# Java
# Use google-java-format plugin in your IDE or:
# java -jar google-java-format.jar --replace src/**/*.java

# Terraform
terraform fmt -recursive
terraform validate
tflint

# Helm
helm lint helm/*/

# YAML
yamllint .
  1. Ensure all tests pass
  2. Write clear, self-documenting code
  3. Commit with conventional format: type(scope): description

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment