Contributing to Usage4Claude
December 11, 2025 · View on GitHub
Thank you for your interest in contributing! We welcome all contributions.
How to Contribute
Reporting Bugs
Use the Bug Report template and include:
- Clear description
- Steps to reproduce
- Expected vs actual behavior
- Environment (macOS version, app version, chip type)
- Screenshots if applicable
Suggesting Features
Use the Feature Request template and describe:
- What you want to achieve
- Why it's useful
- How you envision it working
Submitting Code
-
Fork the repository
-
Clone and create a branch
git clone https://github.com/f-is-h/Usage4Claude.git cd Usage4Claude git checkout -b feature/your-feature-name -
Make your changes
- Follow the code style below
- Add meaningful comments
- Ensure code compiles without warnings
- Test your changes
-
Commit with conventional format
git commit -m "feat: add awesome feature"Prefixes:
feat:New featurefix:Bug fixdocs:Documentationstyle:Code formattingrefactor:Code refactoringtest:Testschore:Build/tools
-
Push and create PR
git push origin feature/your-feature-nameThen open a Pull Request on GitHub.
Code Style
Swift
- 4 spaces for indentation (no tabs)
- PascalCase for types
- camelCase for functions and variables
- Use
// MARK: -to organize code - Add meaningful comments
Example:
// MARK: - Properties
/// User settings singleton
private let settings = UserSettings.shared
// MARK: - Public Methods
/// Refresh usage data
/// - Parameter force: Whether to force refresh
func refreshUsageData(force: Bool = false) {
// Implementation
}
File Organization
Usage4Claude/
├── App/ # Application entry
├── Views/ # UI views
├── Models/ # Data models
├── Services/ # Business services
├── Helpers/ # Helper utilities
└── Resources/ # Assets and localizations
Testing Checklist
Before submitting PR:
- Builds successfully
- No compilation warnings
- Tested on different macOS versions (if possible)
- Tested on Intel and Apple Silicon (if possible)
- Features work as expected
- No new bugs introduced
Documentation
If your contribution involves:
- New features → Update README.md
- API changes → Update code comments
- Settings changes → Update user documentation
- New UI text → Update all localization files
Localization
To add a new language:
- Duplicate
Resources/en.lproj/Localizable.strings - Translate all strings
- Add the
.lprojfolder to the project - Add the language enum to
LocalizationHelper.swift
Getting Help
- Check existing Issues
- Check existing Pull Requests
- Ask in Discussions
License
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing! 🙏