contributing-guide について
オープンソースプロジェクトの貢献者向けドキュメントを作成するスキルです。環境構築、Gitの規約、レビュー、コミュニティ指針を扱い、CONTRIBUTING.mdの構成例を提供します。
主な機能
- 01CONTRIBUTING.mdの構成
- 02開発環境設定の例
- 03Gitブランチとコミットの規約
- 04プルリクエストと課題のテンプレート
- 05コードレビューとスタイル指針
活用シーン
- 01貢献ガイドの作成
- 02環境設定とテスト手順の文書化
- 03プルリクエストと課題の形式統一
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ dengineproblem/ agents-monorepo --skill contributing-guideインストール後、Claude Code で/contributing-guideを入力して読み込まれたか確認します。
詳細
コントリビューションガイドのエキスパート
オープンソースのコントリビューター向けドキュメントのエキスパートです。
CONTRIBUTING.md の構成
# Contributing to Project Name
Thank you for your interest in contributing! 🎉
## Table of Contents
- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Setup](#development-setup)
- [How to Contribute](#how-to-contribute)
- [Pull Request Process](#pull-request-process)
- [Style Guide](#style-guide)
- [Community](#community)
クイックスタートセクション
## Quick Start
1. Fork the repository
2. Clone your fork:
```bash
git clone https://github.com/YOUR_USERNAME/project-name.git
cd project-name
- 依存関係をインストールします:
npm install - ブランチを作成します:
git checkout -b feature/your-feature-name - 変更を加えてテストします:
npm test - PR を提出します!
## Development Environment
```markdown
## Development Setup
### Prerequisites
- Node.js 18+ ([download](https://nodejs.org))
- npm 8+ or yarn 1.22+
- Git 2.28+
- Docker (optional, for integration tests)
### Installation
```bash
# Clone repository
git clone https://github.com/org/project.git
cd project
# Install dependencies
npm install
# Copy environment file
cp .env.example .env
# Run setup script
npm run setup
# Verify installation
npm test
利用可能なスクリプト
| コマンド | 説明 |
|---|---|
npm run dev | 開発サーバーを起動します |
npm test | すべてのテストを実行します |
npm run test:watch | ウォッチモードでテストを実行します |
npm run lint | ESLint を実行します |
npm run lint:fix | lint の問題を修正します |
npm run typecheck | TypeScript のチェックを実行します |
npm run build | 本番用にビルドします |
## Git Workflow
```markdown
## Git Workflow
### Branch Naming Convention
/
**Types:**
- `feature/` - New features
- `fix/` - Bug fixes
- `docs/` - Documentation only
- `refactor/` - Code refactoring
- `test/` - Adding tests
- `chore/` - Maintenance tasks
**Examples:**
- `feature/user-authentication`
- `fix/login-redirect-loop`
- `docs/api-examples`
### Commit Messages
We follow [Conventional Commits](https://conventionalcommits.org):
():
[optional body]
[optional footer(s)]
**Types:**
- `feat`: New feature
- `fix`: Bug fix
- `docs`: Documentation
- `style`: Formatting (no code change)
- `refactor`: Code refactoring
- `test`: Adding tests
- `chore`: Maintenance
**Examples:**
feat(auth): add OAuth2 support fix(api): handle null response from server docs(readme): update installation steps
プルリクエストのテンプレート
## Pull Request Guidelines
### Before Submitting
- [ ] I have read the [Contributing Guide](CONTRIBUTING.md)
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review
- [ ] I have added tests for my changes
- [ ] All new and existing tests pass
- [ ] I have updated documentation if needed
- [ ] My commits follow conventional commit format
### PR Template
```markdown
## Description
## Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change
- [ ] Documentation update
## How Has This Been Tested?
## Screenshots (if applicable)
## Checklist
- [ ] Tests pass
- [ ] Lint passes
- [ ] Documentation updated
## Issue Templates
### Bug Report
```markdown
---
name: Bug Report
about: Report a bug to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---
## Bug Description
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. See error
## Expected Behavior
## Actual Behavior
## Environment
- OS: [e.g., macOS 14.0]
- Node version: [e.g., 18.17.0]
- Project version: [e.g., 1.2.3]
## Screenshots
## Additional Context
機能リクエスト
---
name: Feature Request
about: Suggest a new feature
title: '[FEATURE] '
labels: enhancement
assignees: ''
---
## Problem Statement
## Proposed Solution
## Alternatives Considered
## Additional Context
コードスタイルガイド
## Style Guide
### General Principles
- Write self-documenting code
- Prefer explicit over implicit
- Keep functions small and focused
- DRY (Don't Repeat Yourself)
### TypeScript/JavaScript
```typescript
// ✅ Good
function calculateTotalPrice(items: CartItem[]): number {
return items.reduce((sum, item) => sum + item.price * item.quantity, 0);
}
// ❌ Bad
function calc(i: any[]): any {
let t = 0;
for (let x of i) t += x.p * x.q;
return t;
}
命名規則
| 種類 | 規則 | 例 |
|---|---|---|
| 変数 | camelCase | userName |
| 関数 | camelCase | getUserById |
| クラス | PascalCase | UserService |
| 定数 | UPPER_SNAKE | MAX_RETRIES |
| ファイル | kebab-case | user-service.ts |
| インターフェース | PascalCase + I prefix | IUserService |
ファイル構成
src/
├── components/ # UI components
├── hooks/ # Custom React hooks
├── services/ # Business logic
├── utils/ # Helper functions
├── types/ # TypeScript types
└── __tests__/ # Test files
## Code Review Process
```markdown
## Code Review
### Review Checklist
**Functionality:**
- [ ] Code works as intended
- [ ] Edge cases handled
- [ ] Error handling adequate
**Code Quality:**
- [ ] Readable and maintainable
- [ ] No unnecessary complexity
- [ ] Follows project conventions
**Testing:**
- [ ] Adequate test coverage
- [ ] Tests are meaningful
- [ ] Edge cases tested
**Security:**
- [ ] No hardcoded secrets
- [ ] Input validation present
- [ ] No SQL injection risks
### Response Times
- First response: within 48 hours
- Follow-up reviews: within 24 hours
- Merge after approval: within 24 hours
### Approval Requirements
- 1 maintainer approval required
- All CI checks must pass
- No unresolved conversations
コミット前フック
// package.json
{
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
},
"lint-staged": {
"*.{ts,tsx}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md}": [
"prettier --write"
]
}
}
表彰プログラム
## Recognition
### Contributors
All contributors are added to our [CONTRIBUTORS.md](CONTRIBUTORS.md) file.
### Badges
| Badge | Criteria |
|-------|----------|
| 🥇 First Contribution | Merged first PR |
| 🔥 Frequent Contributor | 10+ merged PRs |
| 📚 Documentation Hero | 5+ docs PRs |
| 🐛 Bug Hunter | 5+ bug fixes |
| ⭐ Core Contributor | Significant impact |
### Rewards
- Stickers and swag for active contributors
- Shoutouts in release notes
- Conference ticket opportunities
- LinkedIn recommendations
コミュニティガイドライン
## Community
### Communication Channels
- **Discord**: [Join our server](https://discord.gg/xxx)
- **GitHub Discussions**: For questions and ideas
- **Twitter**: [@project](https://twitter.com/project)
### Response Time Expectations
- Issues: 48 hours
- PRs: 72 hours
- Questions: 24-48 hours
### Getting Help
1. Check existing issues and discussions
2. Read the documentation
3. Ask in Discord #help channel
4. Create a GitHub Discussion
### Code of Conduct
We follow the [Contributor Covenant](https://contributor-covenant.org).
Be respectful, inclusive, and constructive.
ベストプラクティス
- 段階的な情報開示 — 簡単な内容から複雑な内容へ
- 明確な例 — 実際のコード例
- 最新の状態を保つ — 変更時に更新します
- 歓迎する姿勢 — 親しみやすい言葉遣い
- 複数の入り口 — さまざまな種類のコントリビューション向け
- 自動チェック — PR を検証する CI
コメント
Markdown 対応