Skip to content

JinHanAI/open-source-contribution-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open Source Contribution Skill

A Claude Code skill that helps you contribute to open source projects without getting your PR auto-closed for format violations.

The Problem

Many open source projects have strict CI checks that automatically close PRs within 2 hours if they don't follow contributing guidelines. Common mistakes:

  • Using Related to #123 instead of Fixes #123 or Closes #123
  • Not using the official PR template
  • Missing required sections in PR description
  • Not reading CONTRIBUTING.md before submitting

This skill prevents these mistakes by checking everything before you submit.

Features

  • ✅ Reads and parses CONTRIBUTING.md automatically
  • ✅ Checks Issue linking format (Fixes # / Closes # vs Related to #)
  • ✅ Validates PR template compliance
  • ✅ Pre-submission checklist
  • ✅ Common pitfalls reference
  • ✅ Command templates for gh CLI

Installation

# Clone to your Claude Code skills directory
cd ~/.claude/skills
git clone https://github.com/JinHanAI/open-source-contribution-skill.git

Or copy the SKILL.md file to your skills directory manually.

Usage

This skill is automatically triggered when you mention:

  • "contribute to [project]"
  • "submit a PR"
  • "open source contribution"
  • "GitHub PR"

Or invoke it directly:

/open-source-contribution

What It Checks

Phase 1: Project Guidelines Check

Check Description
CONTRIBUTING.md Reads and parses contribution guidelines
PR Template Checks .github/pull_request_template.md
Issue Templates Checks .github/ISSUE_TEMPLATE/

Phase 2: Format Validation

Format Correct? Notes
Fixes #123 Auto-closes issue on merge
Closes #123 Auto-closes issue on merge
Related to #123 Does NOT trigger auto-close
#123 Incomplete format

Phase 3: Pre-submit Checklist

  • Read CONTRIBUTING.md
  • Issue created with correct format
  • PR description uses official template
  • Issue linked with Fixes # or Closes #
  • Local tests passed
  • No unrelated changes included

Real Example

❌ Wrong (PR #17757 - Auto-closed)

  • Issue link: Related issue: #17753
  • PR description: Custom format
  • Result: Auto-closed after 2 hours

✅ Correct (PR #17811 - Merged)

  • Issue link: Closes #17753
  • PR description: Official template
  • Result: All CI checks passed, merged successfully

Quick Reference

# Check PR status
gh pr view <number> --repo <owner/repo>

# Check CI status
gh pr checks <number> --repo <owner/repo>

# Update PR description
gh pr edit <number> --repo <owner/repo> --body "new content"

# View PR comments
gh pr view <number> --repo <owner/repo> --comments

File Structure

open-source-contribution-skill/
├── README.md               # This file
├── README.zh.md            # Chinese documentation
├── SKILL.md                # Skill definition for Claude Code
├── LICENSE                 # GPL 3.0
├── CHANGELOG.md            # Version history
├── CONTRIBUTING.md         # How to contribute
└── .github/
    ├── CODEOWNERS          # Code owners
    ├── PULL_REQUEST_TEMPLATE.md
    └── ISSUE_TEMPLATE/
        ├── bug_report.md
        └── feature_request.md

Contributing

See CONTRIBUTING.md for guidelines.

License

GPL 3.0

Author

Victor.Chen | GitHub


Created from a real lesson learned: PR #17757 was auto-closed, PR #17811 was merged.

About

A Claude Code skill that helps you contribute to open source projects without getting your PR auto-closed

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors