Skip to content
Back to skills

Oss Contribute

ASecurity

Find open-source issues you can actually take, fix them under each repo's own contribution rules, and open one PR per issue after you approve it. Use when asked to contribute to open source, pick up or fix GitHub issues or bugs in someone else's repo, or open external PRs.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 29, 2026
ai-agentspythongobashreactnodegitapidocumentation

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned November 29, 2026

npx -y skills add umi008/dev-agent-setup --skill oss-contribute --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Oss Contribute?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Oss Contribute
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/umi008-oss-contribute/badge)](https://www.skillsdirectory.com/skills/umi008-oss-contribute)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: oss-contribute
description: Find open-source issues you can actually take, fix them under each repo's own contribution rules, and open one PR per issue after you approve it. Use when asked to contribute to open source, pick up or fix GitHub issues or bugs in someone else's repo, or open external PRs.
---

# oss-contribute

Turn a request like "find 3 issues in Go repos, one easy and two medium" into real, mergeable PRs.
The project's rules decide everything: a repo that bans AI, an issue someone already took, or a fix
nobody can verify is a **skip** with a stated reason, never a PR. Ten honest skips beat one PR that gets
you on a ban list.

The user's GitHub account opens these PRs, and they answer the maintainers afterwards. Every step
serves a PR that the user can defend line by line.

## Inputs

Read these from the request. Ask once, in one message, for anything missing:

- **Source**: `owner/repo` list, or a search spec (language, topic, labels). When neither is given,
  ask which language or topic to search.
- **N** and the **difficulty mix**, for example `N=3: low=2 medium=1`. Use the scale in
  [`references/triage.md`](references/triage.md#difficulty).
- **Workspace**: `$OSS_WORKSPACE` if set, else `~/oss`. Repos live at `<workspace>/<owner>/<repo>`.

Caps that hold on every run, whatever N says: **at most 5 new PRs per run** and **one new PR per
repo**. A repo where the user already has an open PR awaiting review is a skip. These caps keep the
account clear of the spam pattern that gets accounts suspended.

## Steps

### 1. Preflight

Run `gh auth status` and `git config --global user.name`. The commit identity is the global git one.
Commit as that identity, and stop and ask the user if it is unset.

Done when gh is authenticated and you know the GitHub login (`gh api user --jq .login`).

### 2. Collect candidates

- Repos given: list open, unassigned issues in each one
  (`gh issue list --repo R --state open --search "no:assignee" --limit 50 --json number,title,labels,updatedAt,comments`).
- Search spec: `gh search issues --state open --no-assignee --archived=false` with `--language`,
  `--updated ">YYYY-MM-DD"` (last 90 days) and `--limit 50`. Search every difficulty the mix asks for,
  one search per label, because `--label` given twice means both labels at once:
  - low: `--label "good first issue"`, `--label "help wanted"`, `--label documentation`
  - medium and high: `--label bug`, `--label enhancement`, `--label "help wanted"`, and one search
    with no label, sorted by `--sort reactions`, for confirmed issues nobody labelled

- Topic spec ("AI repos", "MCP tools"): issue search cannot filter by repo topic, and keyword search
  returns toy repos. Find repos first: `gh search repos --topic <t> --language <l> --stars 200..30000
  --updated ">YYYY-MM-DD" --archived=false`, one search per topic and language, then list each repo's
  open unassigned issues. Mid-size repos get fewer drive-by PRs than the 50k-star ones. Keep search
  text to single words: a query mixing `OR` with quoted phrases returned nothing, with no error.

Labels only seed the pool. Difficulty comes from reading the issue and the code, never from the label.

Popular repos, AI ones above all, often get a competing PR within hours of an issue opening. Before
any per-issue gating, drop the obvious losers in bulk: pipe `owner/repo number` lines into
`scripts/prefilter-issues.py`, which asks GraphQL about 20 issues per call and marks each one `free`,
`open-pr`, `assigned`, `claimed` or `closed`, with the author's association. Gate only the `free` ones.

Done when you hold a pool of about 4×N `free` candidates spread over the requested difficulties, or
every source is exhausted.

### Parallelize steps 2 and 3 with subagents

For a search spec, run collection and gating as parallel read-only subagents (Sonnet or Haiku),
launched in one message, instead of one long sequential loop in the parent. Slice by language,
topic or difficulty, at most 3 to 4 at once, because they share GitHub's search limit of 30 calls a
minute. Give each subagent:

- the goal: language, topic, difficulty mix and the machine limits (CPU only, OS, toolchains, no paid
  API keys, so fixes and tests must run offline)
- the paths to `references/triage.md`, `scripts/repo-signals.sh`, `scripts/issue-status.sh` and
  `scripts/prefilter-issues.py`, with the instruction to read and apply triage.md strictly
- a skip list: repos already decided, and repos where the user has an open PR
  (`gh search prs --author @me --state open`)
- read-only limits: no comments, forks or PRs; shallow clones only into a named scratch directory,
  whose paths it reports back
- a budget: stop at 3 takes or about 40 repos scanned. An open-ended hunt ran 25 minutes; gating a
  fixed list of 10 issues took 6. Hunt in one slice, gate a named list in another.
- the output shape: takes with issue URL, difficulty and reason, files the fix touches, the offline
  test command, the toolchain it needs (Python or Node version range, extra services), AI rule class
  with file:line, CLA/DCO/changelog flags, claim rule with a draft claim comment when one is
  required, and human external merges; then one line per skip with gate and evidence. Cap it at
  about 1500 words.

The parent merges the reports, re-runs `scripts/prefilter-issues.py` on the picks right before the
shortlist (subagent runs take minutes, and issues get taken meanwhile), and spot-checks one claim per
pick with `scripts/issue-status.sh`.

### 3. Gate each repo, then each issue

For every distinct repo in the pool, run `scripts/repo-signals.sh owner/repo`, then read in full every
contribution, AI-policy and PR-template file it lists. Apply the **repo gates**. For each issue in a
repo that passed, run `scripts/issue-status.sh owner/repo NUMBER`, read the issue body, and apply the
**issue gates**. Both gate lists live in [`references/triage.md`](references/triage.md). Read it
before gating.

Record a verdict for every candidate: `take` or `skip: <gate> — <evidence>`. The evidence is a file
and line, a linked PR URL, or a comment. Write evidence you have seen, never an expected reason.

Done when every candidate in the pool has a verdict with evidence.

### 4. Shortlist and claim

Pick N `take` issues that match the difficulty mix, at most one per repo. When fewer than N survive,
keep what survived and say how many slots stayed empty and why.

Show the user one table: picks (repo, issue, difficulty, why it is workable, the repo's AI rule) and
every skip with its reason. If **nothing** survived, that table is the final answer: report the
dominant reasons (all taken, AI banned, no external merges, needs design) and suggest a different
source. Stop there.

If a repo requires asking for assignment or commenting before work, draft those comments and get the
user's approval before posting any of them. An issue whose required claim gets no assignment stays
unworked. Start on it only when the repo's rules allow working without assignment.

Done when the shortlist is shown and every required claim is posted or the issue is dropped.

### 5. Set up each repo

```bash
me="$(gh api user --jq .login)"
dir="${OSS_WORKSPACE:-$HOME/oss}/owner/repo"
gh repo view "$me/repo" >/dev/null 2>&1 || gh repo fork owner/repo --clone=false
[ -d "$dir/.git" ] || gh repo clone "$me/repo" "$dir"   # sets the upstream remote to owner/repo
git -C "$dir" fetch upstream
```

An existing clone with uncommitted work stays untouched: report it and skip that repo. Check out a new
branch from `upstream/<default branch>`, named by the repo's convention if CONTRIBUTING gives one, else
`fix/<issue>-<slug>`.

Done when each picked issue has a clean branch off the current upstream default branch.

### 6. Fix each issue

Follow the repo's own development docs for setup, build, test, lint and format commands. They beat
your defaults.

1. **Reproduce red**: write the failing test, or the exact reproduction, that shows the bug. A bug you
   cannot reproduce is a skip, and the reason goes in the report.
2. **Fix** with the smallest change that makes it green, in the code's existing style.
3. **Run what CI runs**: the repo's tests, linters and formatters, scoped to what changed when the full
   suite is slow. Read the CI workflow files to know what that is.
4. **Add what the repo requires**: changelog entry, changeset, news fragment, docs, or a regenerated
   file.
5. **Commit** by the repo's message convention, with DCO sign-off (`-s`) when required and the AI
   disclosure the repo asks for (see [`references/pr.md`](references/pr.md#ai-disclosure)).

Toolchain: read `requires-python`, `engines`, `.nvmrc` or `.python-version` before installing. Get a
matching interpreter with `uv python install <ver>` or nvm when the system one is out of range, and
install only the extras the change needs: an `--all-extras` sync can pull GPU-sized ML wheels.

With two or more picked issues, fix them in parallel: one writer subagent per repo, launched in one
message, after the parent has posted the claims and set up each clone and branch. Each brief names
the issue URL, the repo directory as the only edit surface, the repo's rule files (CONTRIBUTING,
AGENTS.md, PR template), the red-green steps above, the checks CI runs, and the toolchain notes from
triage. Writers do not commit or push: they report the diff stat, each check with its real result,
and any decision they had to make. The parent reviews each diff, then commits with the repo's
convention, sign-off and AI disclosure.

Stop an issue that grows past its difficulty estimate, needs a design decision, or breaks tests you
cannot explain after two attempts. Mark it `abandoned: <reason>`, then take the next `take` candidate
from step 3 if one fits the mix.

Done when every picked issue is either green with all repo checks passing or abandoned with a reason.

### 7. Checkpoint with the user

For each ready issue, show:

- the issue link and a three-line summary of the cause and the fix, plus the approach you planned
  for a medium or high issue
- `git diff --stat` and the full diff
- each check you ran and its real result
- the PR title and body, filled from the repo's template (see [`references/pr.md`](references/pr.md))
- the compliance list: AI rule, disclosure, CLA or DCO, changelog, linked issue, template sections

Wait for approval of each PR. Apply the user's edits. When the repo says "write in your own voice" or
requires that the human understands every line, say so plainly and have the user rewrite or confirm the
PR text and the explanation.

Done when each PR is approved, edited and approved, or dropped by the user.

### 8. Open the PRs

```bash
git push -u origin <branch>
gh pr create --repo owner/repo --base <default branch> --head "$me:<branch>" \
  --title "<title>" --body-file <body file>
```

Before pushing, `git fetch upstream` and rebase onto the default branch when it moved since the fix,
then rerun the checks: the checkpoint can sit for hours. After `gh pr create`, rename any changelog
fragment the repo names by PR number (a `+<slug>` placeholder becomes `<PR>.<category>.md`) in a
follow-up commit, and update the PR body to match.

Use `--draft` when the repo asks for drafts first. When a CLA bot comments, tell the user the CLA link:
only they can sign it.

Done when every approved PR is open and its URL is recorded.

### 9. Report

One table: opened PRs (URL, issue, difficulty), abandoned issues with reasons, and skips grouped by
reason. Add the human follow-ups: CLAs to sign, review comments to answer, CI to watch.

Files in this skill

  • SKILL.md7.5 KB
  • references/pr.md2.1 KB
  • references/triage.md4.2 KB
  • scripts/issue-status.sh1.9 KB
  • scripts/repo-signals.sh2.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.