luongnv89/asm/skill-upstream-pr
Claude Code and agent skill by luongnv89/asm
- community
Checking that the SKILL.md file is still in the repository.
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.
Install
npx vskill@latest install luongnv89/asm/skill-upstream-prSKILL.md
The same SKILL.md was published earlier as luongnv89/asm/skill-upstream-pr.
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:
If tracked files are modified (git status --porcelain --untracked-files=no prints anything): git stash push without -u, sync, then git stash pop. Untracked files stay in place; other sessions may own them. 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 evaland 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.
asmon PATH (command -v asm)ghon PATH and authenticated (gh auth status)giton PATH- Network access to GitHub
- Write access to your own GitHub account (for the fork)
Dependency Preflight (mandatory)
This skill invokes skill-creator, declared in frontmatter dependencies: Phase 2 runs its retrofit loop. Verify asm first:
Before Phase 0 — the fork is the first public action, and a miss found after it would leave a fork with nothing to propose — the main agent runs:
<caller-session-id> is a unique id the main agent picks once per run, e.g. skill-upstream-pr-<epoch-seconds>; reuse it for the release. Set SKILL_CREATOR_DIR to the directory holding the returned skillMdPath. If the acquire fails, stop before Phase 0 and report its error.
The main agent releases the lease from its own finally/shutdown handling — after Phase 6, or at any earlier stop:
Input
The user provides a GitHub reference to a skill. Accept any of:
https://github.com/owner/repohttps://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
gh repo fork --clone --remote creates the fork under your account, clones it locally, sets origin to your fork and upstream to the original repo. Verify with git remote -v before continuing.
Create a dedicated branch for the improvement:
Phase 1 — Locate the target SKILL.md
If the user gave a path, use it. Otherwise:
If more than one match and no path was given, list the candidates and ask the user to pick. Never guess — a wrong PR is worse than a delayed one.
Set SKILL_PATH to the directory containing the chosen SKILL.md (not the file itself) — asm eval takes a directory.
Phase 2 — Delegate to skill-creator's retrofit loop
This skill does not reimplement the improvement loop, and it reads that loop only now, so the loop's references stay out of the context budget until Phase 2. Follow $SKILL_CREATOR_DIR/references/retrofit-loop.md (acquired in the Dependency Preflight) with $SKILL_PATH as the target:
- Phase 0: capture
.asm-improver/baseline.json - Phase 1:
asm eval --fixplus frontmatter normalization - Phases 2–4: Gate 1 fixes, then the category loop against the 85/8 floor
- Phases 5–6: version bump and the loop cap (8 iterations / 3 no-move / 2 regressions)
- Phase 7:
.asm-improver/report.md
If the baseline already passes both gates, stop and tell the user — no PR needed for a skill that already meets the floor. Offer to find a different skill or a different target.
Phase 3 — Harvest metrics for the PR
Read two files produced by the retrofit loop:
.asm-improver/baseline.json— the before snapshot- The latest
.asm-improver/iter-N.json— the after snapshot
Extract for both:
overallScore,grade- Every
categories[]entry'snameandscore topSuggestionssummary (for context, not quoted verbatim)
Compute deltas. If the overall score did not improve by at least 3 points and no category moved from below 8 to at least 8, stop and tell the user — the change isn't meaningful enough to justify a PR. Offer the retrofit report as feedback they can share informally instead.
Phase 4 — Build the PR body
Read references/pr-template.md and fill it in; it defines the PR body's sections (What I suggested, the before/after table covering overallScore, grade, and every categories[] entry, Files touched — every modified path under $SKILL_PATH, How to verify locally, Why these changes, Notes) and enforces the friendly, suggestion-style tone. Report the iterations taken (N of 8 from the retrofit loop) under the metrics table.
Tone rules (read references/tone-guide.md):
- Lead with "Hi — noticed X, wanted to share Y"
- Frame as a suggestion, not a fix: "happy to adjust if the direction doesn't fit"
- Never imply the maintainer did something wrong
- Thank them for open-sourcing the skill
- Close with "no obligation to merge — totally fine to close if this isn't the right direction"
Phase 5 — Last-mile confirmation (mandatory)
Opening a PR on someone else's repo is public and hard to reverse. Before pushing anything, show the user:
- The PR title
- The full PR body (rendered markdown)
- The exact change set. Stage it first, so the preview equals what Phase 6 commits:
``bash git add -A # SKILL.md.bak (written by asm eval --fix) never ships; unstage it but keep it # on disk so the user can still restore from it during review git rm --cached -q --ignore-unmatch "${SKILL_PATH:?}/SKILL.md.bak" git status --short git diff --cached upstream/<default-branch> ``
- The commands you are about to run
Ask the user to confirm. If they want edits, apply them and re-preview. Do not push until the user says "go" or equivalent.
Phase 6 — Push and open the PR
After approval:
Never push to upstream. Never use --no-verify or other hook-skip flags. If gh pr create fails, stop and report — do not retry in a loop.
Print the PR URL returned by gh pr create so the user can open it.
Step Completion Reports (mandatory)
Emit a compact status block after each phase:
Checks per phase:
- Phase 0 —
skill-creator acquired,Fork created,Clone succeeded,Branch created,Remotes correct - Phase 1 —
SKILL.md located,Path unambiguous - Phase 2 —
Baseline captured,Retrofit loop ran,Final score > 85,All categories >= 8 - Phase 3 —
Before/after delta >= 3 points OR category promoted - Phase 4 —
PR body rendered,Tone checks passed - Phase 5 —
User approved - Phase 6 —
Push succeeded,PR opened,URL printed,Lease released
Final output
End every run with a short report the user can read without scrolling back:
- Result — first line:
PR openedwith its URL,stopped at Phase N(the skill already passes both gates (Gate 1 and 85/8), the improvement is too small, or the user declined the preview), orblocked at Phase Nwith the reason. - Evidence — before → after
overallScoreand minimum category frombaseline.jsonand the lastiter-N.json, the files changed, and the fork branch. - Uncertainty —
asm evalscores structure, not behavior: the improved skill was not run, and the maintainer has not reviewed it. - Decision — once the PR is open, no approval is needed; the Phase 5 confirmation covered the push. Name any action left for the user, such as answering maintainer comments.
Acceptance Criteria
- Fork + clone done via
gh repo fork --clone --remote— never a direct clone of upstream - Dedicated feature branch created before any edits
- skill-creator retrofit loop run on the target; baseline + final JSON captured under
.asm-improver/ - Overall score improved by ≥ 3 points, OR at least one category moved from below 8 to ≥ 8
- PR body built from
references/pr-template.mdwith the full before/after table - User explicitly approved the PR preview before push
git pushtargetsorigin(the fork), neverupstreamgh pr create --repo $OWNER/$REPOused — the PR targets the upstream repo- PR URL printed to the user at the end
When reviewing a run's output (by eval or by a human), also check that a reader can:
- Find the main result — the first line states
PR opened,stopped, orblocked. - Separate facts from assumptions — measured
asm evalscores are distinct from the untested runtime behavior of the improved skill. - Trace claims — before → after numbers map to
baseline.jsonand the lastiter-N.json; "PR opened" maps to the printed URL. - See the next decision — the report names any action left for the user, or states that none is needed.
An agent's own review cannot confirm human understanding. A reviewer who received no human feedback records understanding as unconfirmed.
Expected output
- A new branch on the user's fork of
$OWNER/$REPO - A public PR on
$OWNER/$REPOwith a before/after metrics table and friendly tone - A local
.asm-improver/directory with baseline, iterations, report, andpr-body.md
Edge Cases
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 91 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/skill-upstream-pr/SKILL.md
Popularity
- Repository stars
- 286
- Repository forks
- 18
- 7-day trend score
- 28
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/luongnv89/asm/skill-upstream-pr)