Contributing to CC Switch banner
farion1231 farion1231

Contributing to CC Switch

Development community intermediate

Description

> [中文版本](#贡献指南) Thank you for your interest in contributing to CC Switch! Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) before participating.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

Repository README

This is the README for farion1231/cc-switch, shared by 2 entries in this directory. It describes the repository, not this entry specifically.

Contributing to CC Switch

[中文版本](#贡献指南)

Thank you for your interest in contributing to CC Switch! Please read our [Code of Conduct](./CODE_OF_CONDUCT.md) before participating.

How to Contribute

There are many ways to contribute:

  • Report bugs — Found something broken? Open a bug report.
  • Suggest features — Have an idea? Submit a feature request.
  • Improve docs — Spot a typo or missing info? Report a doc issue.
  • Contribute code — Fix bugs or implement features via pull requests.
  • Translate — Help us improve translations for English, Chinese, and Japanese.

**Security vulnerabilities**: Please do NOT use public issues. See our [Security Policy](./SECURITY.md) instead.

Development Setup

Prerequisites

Quick Start

# Install dependencies
pnpm install

# Start development server with hot reload
pnpm dev

Useful Commands

Command Description
pnpm dev Start dev server (hot reload)
pnpm build Production build
pnpm typecheck TypeScript type checking
pnpm test:unit Run unit tests
pnpm lint ESLint check
pnpm format Format code (Prettier)
pnpm format:check Check code formatting

For Rust backend:

cd src-tauri
cargo fmt        # Format Rust code
cargo clippy     # Run linter
cargo test       # Run tests

Code Style

  • Frontend: Prettier for formatting, ESLint for linting, strict TypeScript (pnpm typecheck)
  • Backend: cargo fmt for formatting, cargo clippy for linting
  • Tauri 2.0: Command names must use camelCase

Run all checks before submitting:

pnpm typecheck && pnpm format:check && pnpm test:unit
cd src-tauri && cargo fmt --check && cargo clippy && cargo test

Pull Request Guidelines

  1. Open an issue first for new features — PRs for features that are not a good fit may be closed.
  2. Fork and branch — Create a feature branch from main (e.g., feat/my-feature or fix/issue-123).
  3. Keep PRs focused — One feature or fix per PR. Avoid unrelated changes.
  4. Follow the PR template — Fill in the summary, related issue, and checklist.

PR Checklist

  • pnpm typecheck passes
  • pnpm format:check passes
  • cargo clippy passes (if Rust code changed)
  • Updated i18n files if user-facing text changed

Commit Convention

We use [Conventional Commits](https://www.conventionalcommits.org/):

feat(provider): add support for new provider
fix(tray): resolve menu not updating after switch
docs(readme): update installation instructions
ci: add format check workflow
chore(dep