К основному содержанию
скилл CX Codex

OSS Contribution Best Practices — скилл для Claude Code

Скилл для работы с опенсорсными проектами: подсказывает, как вести себя с мейнтейнерами, писать описания PR и отвечать на ревью.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add costajohnt/oss-autopilot --skill oss-contribution -a claude-code
Открыть на GitHub

Что делает OSS Contribution Best Practices

Скилл задаёт правила, по которым агент ведёт ваши контрибуции. Главный файл служит индексом: общие принципы работы с чужими репозиториями плюс ссылки на два соседних скилла, которые подгружаются по требованию. pr-etiquette отвечает за ответы на код-ревью, описания PR и напоминания по залежавшимся пулл-реквестам. contribution-ethics разбирает атрибуцию ИИ в коммитах и то, когда лучше передать дело человеку.

Отдельный блок посвящён минимальному диффу. Каждая строка в патче должна относиться к исправлению: перестановка импортов, смена кавычек и прочая косметика в чужих файлах раздражают ревьюеров. Если форматтер всё же нужно прогнать, скилл советует потом просмотреть его вывод через git diff. Ещё одно требование — регрессионный тест обязан падать на ветке без фикса. Иначе это шум, а не защита от бага.

Скилл не делает коммиты за вас. Он держит рамку: код пишется до комментария «я взялся за issue», а не после. Когда задача не поддалась, он велит молча двигаться дальше. Поставить его стоит тому, кто открывает PR в чужие репозитории: без такой рамки агент легко накидает правок сверх задачи.

Какие задачи решает

  • написать описание PR без лишних подробностей
  • ответить на замечания мейнтейнера в код-ревью
  • проверить, что тест падает без исправления
  • убрать из диффа случайные правки форматтера
  • дожать залежавшийся пулл-реквест или закрыть его

Примеры запросов агенту

  • Проверь мой дифф перед PR: нет ли тут изменений, не связанных с issue
  • Помоги ответить на ревью в этом пулл-реквесте
  • Напиши тело PR со ссылкой на issue

Как установить OSS Contribution Best Practices

1Через Skills CLI (Vercel)

npx skills add costajohnt/oss-autopilot --skill oss-contribution -a claude-code

2Вручную: положить файлы

~/.claude/skills/oss-contribution/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/oss-contribution/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о OSS Contribution Best Practices

Как установить OSS Contribution Best Practices в Claude Code?

Выполните npx skills add costajohnt/oss-autopilot --skill oss-contribution -a claude-code. Файл скилла окажется по пути ~/.claude/skills/oss-contribution/SKILL.md.

Что делает этот скилл?

Задаёт агенту правила вклада в open source: этикет общения с мейнтейнерами, чистые диффы, тесты, которые действительно ловят регрессию, и порядок работы над issue.

Нужно ли писать комментарий, что я взялся за issue?

Нет. Скилл требует сначала сделать исправление и открыть PR со ссылкой на issue, а комментарий оставлять только при неясной задаче или для уточнения.

Исходный текст

SKILL.md · MIT
---
name: OSS Contribution Best Practices
description: This skill should be used when the user is working on open source contributions, responding to maintainer feedback, writing PR descriptions, working on issues, following up on dormant PRs, or needs guidance on open source etiquette and best practices.
version: 2.0.0
---

# Open Source Contribution Best Practices

**Reference:** Based on [opensource.guide](https://opensource.guide/how-to-contribute/)

This skill is the index. The detail topics live in two sibling skills that load on demand:

- **`pr-etiquette`** — responding to code review feedback, writing PR descriptions, dormant-PR follow-up cadence, PR quality checklist, communication etiquette.
- **`contribution-ethics`** — AI attribution rules, AI-tell avoidance in maintainer-visible writing, when to defer to a human.

Both are linked below. Use this file for the universal rules that apply to every contribution regardless of stage; jump to the sibling skills when you're at a specific stage in the cycle.

## Core Principles

**Be a good open source citizen:**

1. Respect maintainers' time — they're often unpaid volunteers
2. Read contribution guidelines before contributing
3. Communicate clearly and professionally
4. Be patient — open source moves at its own pace
5. Give back to the community when you can

## Minimal Diff Discipline

Every line in a PR diff must be directly related to the issue being fixed. Unrelated formatting changes (whitespace, quote style, trailing commas, import reordering, line breaks) make diffs noisy, harder to review, and signal carelessness. Maintainers will flag or reject PRs with formatting bloat.

**Rules:**

1. **Only touch lines the fix requires.** Don't reorder imports, change quote styles, fix whitespace, or add trailing commas in existing code — unless those changes are part of the fix itself.
2. **Scope formatter output.** If the repo's formatter must be run (e.g., CI requires it), review the formatter's changes afterward. Use `git diff` to identify formatting-only changes. Use `git checkout -- {files}` only for files where ALL changes are formatting-only. For files with mixed changes, use targeted edits to surgically remove formatting hunks. (In interactive terminal contexts, `git add -p` can also be used for hunk-level staging.)
3. **Match the repo's style, don't impose your own.** If the repo uses single quotes, use single quotes in your new code. If it uses tabs, use tabs. Never convert existing style to a different one.

**When formatting IS the fix:** If the issue itself is about formatting (e.g., "run prettier on codebase", "fix inconsistent indentation"), then formatting changes are in scope. In all other cases, they are not.

## Minimize Public API Surface

A narrow fix should not widen what the project must support forever. Prefer correcting behavior inside an existing public API over adding a new option, flag, method, or parameter. Every new surface is something maintainers have to document, test, and keep backward-compatible — reach for one only when the existing API genuinely cannot express the fix, and say so explicitly rather than defaulting to a new knob.

## Fix the Root Cause, Not a Workaround

Trace a bug to where it actually originates before patching. If the cause lives in an upstream dependency, fix or report it there rather than working around it downstream. If the maintainer rejects the root-cause fix as a known limitation, offer a documentation note that warns other users — don't submit a second local patch that papers over the same underlying problem.

## Regression Tests Must Actually Regress

A test added alongside a bug fix only earns its place if it fails without the fix. Before including it, check out the base branch (or revert your fix), run the new test, and confirm it FAILS; then restore the fix and confirm it passes. A test that passes on the unpatched base isn't guarding the bug — it's noise.

## No Tests Just to Pass a Gate

Before writing any test, name the concrete regression it catches. Can't name one? Don't write it. Adding entries to a map or registry, constants, icons, copy, or config needs no test. A test that restates data, only checks that a file exists or parses, or exercises the language or framework is filler, and maintainers notice. When an automated review agent flags a weak test, delete it unless you can name a real regression for it to catch. Never grow it to clear the finding. A human maintainer's explicit request, or a rule the repo enforces, wins over this: do what they asked, and if it looks like it calls for a filler test, raise it with the user instead of overriding it.

## Working on Issues

### Before Starting

1. Read the entire issue and all comments
2. Check if someone else is already working on it (check for linked PRs)
3. Make sure you understand the requirements
4. Verify you have the skills/time to complete it

### Work-First Approach

Do NOT comment to "claim" the issue before you have working code. The workflow is:

1. Fork/clone the repo
2. Implement the fix
3. Verify tests pass locally
4. Open a PR that references the issue (e.g., "Fixes #123")

The PR itself is the claim. A separate "I'm working on this" comment is unnecessary noise when the PR is coming soon.

### When to Comment on the Issue

Only comment on the issue itself when:

- You need clarification from the maintainer before starting
- The approach is ambiguous and you want confirmation
- The issue is old and you want to confirm it's still relevant

### If You Can't Solve It

Move on silently. Don't comment that you tried and failed. Don't mark the issue on the upstream repo in any way. Remove it from your local list and continue to the next one.

**Persistent skip (optional):** the `/oss` "Work Through Issues" workflow (`workflows/work-through-issues.md`, Phase C) can persist the skip to your local `skipped-issues.md` via the CLI's `skip-add` command so the same issue doesn't resurface in future searches. This is a local-only record — nothing is posted on GitHub.

### After Opening a PR

- Reference the issue in the PR body: "Fixes #123" or "Closes #123"
- Only comment on the issue if the PR needs additional context

## Time Management

### Sustainable Pace

- Don't over-commit
- It's okay to work on one PR at a time
- Quality over quantity
- Contribute consistently, not in bursts

### Managing Multiple PRs

- Prioritize PRs that are close to merge
- Respond to feedback within 24-48 hours
- Don't let PRs go stale
- Know when to close and move on

## Failure Protocol

When a task or approach fails, **STOP and report back to the user** with what failed and why. Don't silently switch strategies or improvise workarounds — let the user decide how to proceed.

This protocol governs **unexpected** failures: a tool crashing, an external command returning an error you weren't prepared for, a check producing output you don't know how to handle, an assumption turning out to be wrong. In those cases: stop, report what failed, ask.

It does **not** override decision points that the workflow itself documents. The `/oss` workflows surface explicit fallback choices in several places (e.g., "if retry fails, offer retry / skip / done for now"). Those branches were planned, are surfaced to the user, and are exactly the kind of "let the user decide" behavior this protocol asks for. Follow them as written.

In short:

- **Documented branch in a workflow** (a step that names its fallback options) → follow it; surface the choices to the user; do what they pick.
- **Improvised fallback** (substituting a different command, retrying with no plan, swapping in a less-specific approach because the first didn't work) → never. Stop and ask.

## See Also

- `pr-etiquette` skill — review responses, PR descriptions, dormant-PR follow-up, PR quality checklist, communication style.
- `contribution-ethics` skill — AI attribution rules, AI-tell avoidance, when to defer to a human.

## Resources

- [How to Contribute to Open Source](https://opensource.guide/how-to-contribute/)
- [Best Practices for Maintainers](https://opensource.guide/best-practices/)
- [Building Welcoming Communities](https://opensource.guide/building-community/)

© costajohnt · MIT · costajohnt/oss-autopilot

Похожие скиллы

Все скиллы по теме «Git и GitHub» →
triage Matt Pocock Скилл проводит issue и внешние PR через роли триажа, проверку и подготовку брифа для агента. Подойдёт мейнтейнеру, который разбирает очередь задач. 990 453установок code-review Matt Pocock Проверяет изменения от выбранной точки по стандартам репозитория и требованиям задачи. Нужен для ревью ветки, PR или незавершённой работы. 789 521установок implement Matt Pocock Выполняет задачу по спецификации или тикетам, ведёт работу через тесты и завершает её ревью с коммитом. Подходит для задач, где нужен дисциплинированный цикл разработки. 774 700установок git-guardrails-claude-code Matt Pocock Скилл ставит хук Claude Code, который останавливает опасные Git-команды до их запуска. Нужен, если агент не должен делать push или удалять изменения. 499 069установок setup-pre-commit Matt Pocock Скилл настраивает pre-commit для JavaScript-репозитория: Husky запускает форматирование, проверку типов и тесты перед коммитом. 489 289установок scaffold-exercises Matt Pocock Скилл создаёт структуру учебных упражнений с секциями, задачами, решениями и пояснениями. Пригодится при запуске нового раздела курса. 480 196установок

Из того же набора2

Спонсоры проекта

Компании, которые помогают держать аналитику открытой