# Skill Upstream PR

Improve an open-source GitHub skill and open a friendly suggestion PR upstream: fork...

- Repository: https://github.com/luongnv89/asm (962 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

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

## Description

Improve an open-source GitHub skill and open a friendly suggestion PR upstream: fork, run skill-creator's retrofit, attach asm eval before/after metrics. Don't use for local-only skills, authoring from scratch, bulk repos, or registry publish.

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

# Skill Upstream PR

You are contributing quality improvements to someone else's open-source skill. The workflow is: fork → clone → improve via skill-creator's retrofit loop → push to fork → open a friendly suggestion PR upstream. You do not own the target repo. Every step assumes you are a polite contributor, not a maintainer.

## Repo Sync Before Edits (mandatory)

Before any modification to the cloned fork, pull the latest from the fork's tracked branch:

```bash
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
```

If the working tree is dirty: stash, sync, pop. If `origin` is missing or conflicts occur: stop and ask the user. A stale fork that PRs yesterday's tree is worse than no PR.

## When to Use

- User shares a GitHub URL to a public skill repo and asks to "improve", "level up", or "contribute to" it
- User says "open a PR to this skill" or "suggest improvements upstream"
- The target skill scores below 85/8 on `asm eval` and the user wants the upstream author to benefit

Do **not** trigger for: editing a local skill with no upstream, authoring a brand-new skill, publishing to the ASM registry, or bulk-improving many repos in one pass. One skill → one PR.

## Prerequisites

Verify each before cloning anything. Stop and tell the user if any fails.

- `asm` on PATH (`command -v asm`)
- `gh` on PATH and authenticated (`gh auth status`)
- `git` on PATH
- Network access to GitHub
- Write access to your own GitHub account (for the fork)

## Input

The user provides a GitHub reference to a skill. Accept any of:

- `https://github.com/owner/repo`
- `https://github.com/owner/repo/tree/<branch>/<path/to/skill>`
- `github:owner/repo[#ref][:path]`

Normalize to `owner`, `repo`, optional `ref`, optional `path`. If `path` is not given and the repo has multiple `SKILL.md` files, ask the user which one.

## Workflow

Execute phases in order. Do not skip or reorder.

### Phase 0, Fork and clone

The rest: https://github.com/luongnv89/asm/blob/HEAD/skills/skill-upstream-pr/SKILL.md
