dyad:pr-push

Commits changes, runs checks, pushes branches, and creates GitHub pull requests.

21.4k|2.6k|Updated Apr 11, 2025
One-click install
npx skills add https://github.com/dyad-sh/dyad --skill dyad-pr-push
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dyad:pr-push
Source: https://github.com/dyad-sh/dyad/tree/main/.claude/skills/pr-push
Command: npx skills add https://github.com/dyad-sh/dyad --skill dyad-pr-push

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Publishing local work to GitHub involves many repetitive steps—staging files, writing commit messages, running formatters and linters, pushing branches, and drafting PR descriptions. This Skill automates that entire publish flow so a branch ends up pushed with a reviewer-useful PR in one operation.

Core Features & Use Cases

  • Automated publish pipeline: Stages relevant changes while ignoring secrets and artifacts, commits with a descriptive message, runs npm run fmt, npm run lint:fix, and npm run ts, then pushes to the correct remote.
  • PR creation and refresh: Creates a PR against dyad-sh/dyad:main with a validated ## Summary section, or refreshes stale agent-authored text on existing PRs while preserving human-written notes.
  • Safety guardrails: Refuses to push main/master directly, creates a feature branch when needed, handles fork remotes and bot accounts, and retries pushes with fallback remotes on permission errors.
  • Use Case: After finishing a coding session, invoke the skill to capture session learnings, run checks, push the branch, and open a PR with a reviewer-focused summary—without manually running any git or gh commands.

Quick Start

Ask the agent to publish the current work to GitHub using the pr-push skill, and it will commit, check, push, and open or update the pull request.

Frequently Asked Questions about dyad:pr-push

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I push a branch and create a GitHub PR automatically?

Run the pr_push.sh script with PR_PUSH_COMMIT_MESSAGE, PR_PUSH_PR_TITLE, and PR_PUSH_PR_BODY_FILE set. It stages changes, runs fmt, lint:fix, and typecheck, pushes to the appropriate remote, and creates the PR with gh pr create.

How to push changes when working on the main branch?

The script refuses to push main or master directly. It automatically creates a timestamped feature branch based on the changed files, commits the work there, and pushes that branch instead.

Does the script run unit tests before pushing?

No, the script only runs npm run fmt, npm run lint:fix, and npm run ts. The agent decides separately whether to run npm test for broad changes or a targeted test command; GitHub CI runs the full suite.

What happens if the push fails with a permission error?

The script retries without GitHub token environment variables, then falls back to the default remote or an upstream remote if one exists. It only fails after exhausting these fallback options.

Can a bot account create the pull request?

No. When the active GitHub account is a bot, the script skips PR creation and instead outputs a PR creation link along with the suggested title and body for manual submission.

Why does the script discard my package-lock.json changes?

It treats package-lock.json modifications as spurious when package.json is unchanged, restoring the lockfile to avoid noise commits. Lockfile changes are kept only when package.json is also modified.