New to Claude Skills? Learn how to install them โ†’

martian-engineering on GitHub

Lossless PR Landing

Free

Safely manage lossless-claw pull requests with confidence.

Get this skill

Free ยท Opens the source repo

What Lossless PR Landing does

Lossless PR Landing is a specialized skill designed for developers who need to handle pull requests within the lossless-claw repository effectively. This skill guides users through the entire process of landing a pull request, ensuring that all necessary checks and balances are in place to maintain the integrity of the codebase. It emphasizes the importance of following repository-specific instructions and adheres to best practices for data preservation and compatibility.

The workflow begins with a thorough review of the repository's guidelines, particularly the AGENTS.md file, which outlines critical rules regarding changesets, command reporting, and more. The skill then assists in identifying the pull request head, fetching essential metadata to ensure that the correct version is being worked on. Users are prompted to verify the readiness of the pull request, checking for mergeability and successful completion of all required CI checks before proceeding.

Once the pull request is confirmed as ready, the skill facilitates a final review process, ensuring that all findings are addressed before merging. This includes searching for related open issues and ensuring that no unresolved actionable findings exist. The merging process itself is designed to be deterministic, with clear instructions on how to merge safely while preserving the commit history. After merging, the skill guides users through post-merge verification steps and encourages proper communication with contributors.

Lossless PR Landing is ideal for maintainers and contributors within the lossless-claw project who want to ensure that their pull requests are handled with care and precision. By following the structured approach provided by this skill, users can avoid common pitfalls associated with merging, such as overlooking critical checks or failing to address related issues.

When to use it

Use this skill whenever you need to land a pull request in the lossless-claw project, especially when verifying its readiness and compliance with repository standards.

When not to use it

This skill is not suitable for repositories outside of lossless-claw or for scenarios where pull requests do not require strict adherence to specific merging protocols.

What you can build with it

Merging a Pull Request

Use this skill to safely merge a pull request after verifying all checks and ensuring no unresolved issues remain.

Final Review Process

Leverage this skill to conduct a thorough final review of a pull request before merging, ensuring compliance with repository standards.

Post-Merge Actions

Utilize this skill to perform necessary post-merge actions, such as closing related issues and thanking contributors.

How to install Lossless PR Landing

View source

1. Install with the skills CLI

npx skills add martian-engineering/lossless-claw/land-pr --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by martian-engineering

Lossless PR Landing

Use this skill when landing a lossless-claw pull request or answering whether it is ready to merge.

Workflow

  1. Read repository instructions first.

    • Follow AGENTS.md, especially data-preservation, changeset, compatibility, and command-reporting rules.
    • If a deterministic merge wrapper exists for this repo, prefer it. Otherwise use the manual fallback below.
  2. Identify and pin the PR head.

    • Fetch the real PR metadata:
      gh pr view <PR> --json number,title,state,isDraft,baseRefName,headRefName,headRefOid,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,author,files,closingIssuesReferences,url
      
    • Treat headRefOid as the merge pin. Re-read it immediately before merge.
  3. Verify readiness.

    • PR must be open, non-draft, mergeable, and clean.
    • All required/current checks must be complete and successful on the pinned head:
      gh pr checks <PR> --json name,state,bucket,workflow,link,startedAt,completedAt
      
    • If checks are pending, failing, missing, or tied to a different head SHA, do not merge.
    • If the PR changes package-visible behavior, user-facing behavior, docs-visible behavior, compatibility metadata, config surface, or release behavior, answer the changeset question before merge.
    • Do not expect external contributors to add Changesets metadata. Maintainers own it.
  4. Run or confirm final review.

    • Prefer the repo's actual PR base:
      head=$(gh pr view <PR> --json headRefOid --jq .headRefOid)
      base=$(gh pr view <PR> --json baseRefName --jq .baseRefName)
      gh pr checkout <PR>
      test "$(git rev-parse HEAD)" = "$head"
      /Users/phaedrus/Projects/prompts/skills/autoreview/scripts/autoreview --mode branch --base "origin/$base"
      
    • Run branch review only from a checkout whose HEAD exactly matches the pinned PR headRefOid.
    • Verify every accepted finding against the code before acting on it.
    • Do not merge with unresolved actionable findings.
  5. Search open issues before merge closeout.

    • Inspect explicit closing references:
      gh pr view <PR> --json closingIssuesReferences --jq '.closingIssuesReferences'
      
    • Search open issues for likely duplicates or covered reports using the PR title, key error strings, feature names, changed behavior, and issue numbers mentioned in commits/body:
      gh issue list --state open --limit 50 --search "<keyword terms> repo:Martian-Engineering/lossless-claw"
      
    • Read candidate issues before deciding they are covered:
      gh issue view <ISSUE> --json number,title,state,body,url,labels,comments
      
    • If an issue is clearly fixed by the PR and not auto-closed by GitHub, close it after merge with a concise comment linking the merged PR.
    • If unsure, leave a comment on the issue noting the PR may help and ask for confirmation instead of closing.
  6. Merge deterministically.

    • Preferred wrapper, if present:
      scripts/pr-merge verify <PR>
      scripts/pr-merge run <PR>
      
    • Manual fallback:
      head=$(gh pr view <PR> --json headRefOid --jq .headRefOid)
      title=$(gh pr view <PR> --json title --jq .title)
      gh pr merge <PR> --squash --match-head-commit "$head" --subject "$title"
      
    • Never use --auto for this workflow.
    • Do not merge if the head SHA changed between verification and merge.
  7. Post-merge verification and maintainer follow-through.

    • Confirm the PR is MERGED and capture the merge commit:
      gh pr view <PR> --json state,mergeCommit,mergedAt,mergedBy,url
      
    • Leave a brief thank-you comment for external contributors after merge:
      gh pr comment <PR> --body "Thanks for the contribution, @<login>. This is landed now."
      
    • Close any verified covered issues that remain open, with a comment linking the PR and merge.
    • If a required changeset was not included before merge, immediately create a small follow-up PR that adds only the missing .changeset/*.md.
  8. Final report.

    • State whether the PR was ready and whether it was merged.
    • Include PR number/title, pinned head SHA, check summary, review command/result, merge command, merge commit SHA, contributor thank-you comment URL, issue-search outcome, closed/commented issues, and changeset outcome.
    • Include the commands run and their results in a code block, per AGENTS.md.

Do Not

  • Do not delete, purge, truncate, or otherwise discard persisted user data as part of landing.
  • Do not bypass failing or pending required checks.
  • Do not merge without head-SHA pinning.
  • Do not assume no related issues exist just because the PR body lacks Fixes #....
  • Do not close ambiguous issues. Comment or report uncertainty instead.

Frequently asked questions about Lossless PR Landing

Similar skills