# Oss PR

Use when creating a pull request, after committing changes, or when user invokes /oss-pr.

- Repository: https://github.com/FerroxLabs/wayland (616 stars)
- Category: Git and review
- License: AGPL-3.0
- Last updated: 2026-10-31
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add FerroxLabs/wayland --skill oss-pr -g -a claude-code -y`
Codex: `npx skills add FerroxLabs/wayland --skill oss-pr -g -a codex -y`
Cursor: `npx skills add FerroxLabs/wayland --skill oss-pr -g -a cursor -y`
Gemini CLI: `npx skills add FerroxLabs/wayland --skill oss-pr -g -a gemini-cli -y`

## Description

Use when creating a pull request, after committing changes, or when user invokes /oss-pr. Covers branch management, quality checks, commit, push, and PR creation.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# OSS PR

Smart commit + PR workflow: branch management → quality checks → tests → commit → push → PR.

**Announce at start:** "Using oss-pr skill to commit and open a pull request."

## Workflow

### Step 0: Gather Info

```bash
git branch --show-current
git diff --name-only HEAD
git status --short
git config user.name
```

**Branch rules:**

- If already on a feature branch: proceed directly
- If on `main` or `master`: auto-generate a branch name, create and switch immediately - no confirmation needed

**Auto-generating a branch name:**

Analyze the changed files from `git diff --name-only HEAD` to infer:

1. **type** - pick one: `feat` / `fix` / `refactor` / `chore`
   - `feat`: new user-facing functionality
   - `fix`: bug fix
   - `refactor`: restructuring without behavior change
   - `chore`: config, scripts, skills, docs, deps
2. **slug** - 2, 3 lowercase words derived from the most relevant changed paths, joined by hyphens. Keep it short and specific.

Create branch `{username}/{type}/{slug}` directly and announce the name chosen.

**Branch naming reference:**

| Type     | Example                      |
| -------- | ---------------------------- |
| feat     | `{prefix}/feat/dark-mode`    |
| fix      | `{prefix}/fix/crash-on-open` |
| refactor | `{prefix}/refactor/settings` |
| chore    | `{prefix}/chore/update-deps` |

### Step 1: Quality Checks

| Command             | Scope                     | Skip when                   |
| ------------------- | ------------------------- | --------------------------- |
| `bun run format`    | `.ts/.tsx/.css/.json/.md` | **Never** - always run      |
| `bun run lint`      | `.ts/.tsx` only           | No `.ts/.tsx` files changed |
| `bunx tsc --noEmit` | `.ts/.tsx` only           | No `.ts/.tsx` files changed |

Run in this order: `format` → `lint` → `tsc`.

The rest: https://github.com/FerroxLabs/wayland/blob/HEAD/.claude/skills/oss-pr/SKILL.md
