Agent Skillsdyad-sh/dyad › dyad:pr-push

dyad:pr-push

GitHub

自动将本地工作发布至GitHub,包括提交、运行检查、推送分支及创建或刷新PR。流程涵盖学习记忆保存、本地测试决策、生成高质量PR描述及执行发布脚本,确保变更被完整记录并通知审查者。

.claude/skills/pr-push/SKILL.md dyad-sh/dyad

Trigger Scenarios

用户要求发布代码到GitHub 需要创建或更新Pull Request 完成开发任务后的代码提交流程

Install

npx skills add dyad-sh/dyad --skill dyad:pr-push -g -y
More Options

Non-standard path

npx skills add https://github.com/dyad-sh/dyad/tree/main/.claude/skills/pr-push -g -y

Use without installing

npx skills use dyad-sh/dyad@dyad:pr-push

指定 Agent (Claude Code)

npx skills add dyad-sh/dyad --skill dyad:pr-push -a claude-code -g -y

安装 repo 全部 skill

npx skills add dyad-sh/dyad --all -g -y

预览 repo 内 skill

npx skills add dyad-sh/dyad --list

SKILL.md

Frontmatter
{
    "name": "dyad:pr-push",
    "description": "Publish local work by committing changes, running checks, pushing the branch, and creating or refreshing a GitHub PR with a reviewer-useful description."
}

PR Push

Use this skill to publish the current work to GitHub. It must complete autonomously and push by the end unless GitHub auth or permissions block the operation.

Workflow

  1. Run /remember-learnings first. This captures session learnings before any push or PR creation, so any resulting AGENTS.md or rules/ changes are included in the same publish flow.

  2. Decide whether to run unit tests locally before publishing. For broad or cross-cutting changes, run npm test. For targeted changes, run the narrowest relevant test command, such as npm test -- path/to/file.test.ts. For docs, agent-config, or other low-risk changes, it is acceptable to skip local unit tests because GitHub CI will run the full suite.

  3. Review the complete branch diff and commit range against the base branch. Write:

    • A descriptive commit message for newly staged work.
    • A concise PR title describing the user-visible outcome or engineering purpose.
    • A reviewer-useful PR body with a ## Summary section.

    Start the summary with a 1-2 sentence overview of the purpose and outcome, then add bullets for the decisions that deserve reviewer attention. Focus those bullets on subjective choices, trade-offs, assumptions, intentional exclusions, behavior boundaries, and questions a reviewer should verify. Use as many bullets as the change needs; optimize for helping a reviewer decide whether the approach is right, not for terseness or narrating the diff.

    Do not add a routine ## Testing section. Report verification commands and results in the final handoff instead. Stay close to the user's original intent, and do not use changed filenames as a summary, merely restate commit subjects, or rely on an automated reviewer to explain the change later.

  4. Save the PR body to an ignored file under .claude/tmp/, then run the bundled script from the repository root with all three publishing inputs:

    PR_PUSH_COMMIT_MESSAGE="<descriptive commit message>" \
    PR_PUSH_PR_TITLE="<descriptive PR title>" \
    PR_PUSH_PR_BODY_FILE=".claude/tmp/pr-body.md" \
    bash .agents/skills/pr-push/scripts/pr_push.sh
    
  5. If the script reports a fixable failure, fix it and rerun the script. When fixing issues, do not run git pull from fork remotes; only pull from the upstream repo configured by PR_PUSH_BASE_REPO (default dyad-sh/dyad) if needed. Do not manually replay the full workflow unless the script itself is broken.

  6. If the PR already existed, inspect its current title and body after the push. Refresh stale or generic agent-authored text to reflect the complete branch, while preserving human-written notes and sections added by review tools. Do not overwrite the entire body blindly.

  7. Summarize the script's final output, including the branch, committed files, ignored files, checks, pushed remote, and PR URL or bot-account PR creation link. Also report the local unit-test decision and any test command that was run.

Script Behavior

The script handles the mechanical workflow:

  • Refuses to push main/master; creates a feature branch if needed.
  • Stages relevant changes while ignoring obvious secrets/artifacts and spurious package-lock.json changes without package.json.
  • Commits changes with a generated message, unless PR_PUSH_COMMIT_MESSAGE is set.
  • Runs npm run fmt, npm run lint:fix, and npm run ts.
  • Does not run unit tests. The agent decides whether to run npm test for broad changes or a targeted npm test -- ... command for narrow changes; GitHub CI runs the full suite.
  • Amends automated formatting/lint changes into the commit it created.
  • Pushes to the tracked upstream, an existing PR head remote, or origin with the documented fallback behavior.
  • Creates the PR against dyad-sh/dyad:main, unless the active GitHub account is a bot. Existing PR branches are pushed without blindly overwriting their descriptions.
  • Removes needs-human:review-issue when a PR exists.

Optional environment overrides:

  • PR_PUSH_COMMIT_MESSAGE: commit message for newly staged work.
  • PR_PUSH_PR_TITLE: PR title.
  • PR_PUSH_PR_BODY_FILE: path to the prepared PR body; required when creating a PR.
  • PR_PUSH_PR_BODY: inline PR body override; useful when shell quoting is known to be safe.
  • PR_PUSH_BASE_REPO: default dyad-sh/dyad.
  • PR_PUSH_BASE_BRANCH: default main.
  • PR_PUSH_REMOTE: default fallback remote origin.

Version History

  • 7158f6f Current 2026-08-20 16:43

Same Skill Collection

.claude/skills/add-models/SKILL.md
.claude/skills/check-workflows/SKILL.md
.claude/skills/debug-minified-error/SKILL.md
.claude/skills/debug-with-playwright/SKILL.md
.claude/skills/deflake-e2e-from-run/SKILL.md
.claude/skills/deflake-e2e-recent-commits/SKILL.md
.claude/skills/deflake-e2e/SKILL.md
.claude/skills/e2e-rebase/SKILL.md
.claude/skills/feedback-to-issues/SKILL.md
.claude/skills/fix-issue/SKILL.md
.claude/skills/plan-to-issue/SKILL.md
.claude/skills/pr-fix-ci/SKILL.md
.claude/skills/pr-fix-comments/SKILL.md
.claude/skills/pr-fix/SKILL.md
.claude/skills/pr-rebase/SKILL.md
.claude/skills/pr-screencast/SKILL.md
.claude/skills/promote-beta-to-stable/SKILL.md
.claude/skills/remember-learnings/SKILL.md
.claude/skills/swarm-pr-review/SKILL.md
.claude/skills/swarm-to-plan/SKILL.md
.claude/skills/multi-pr-review/SKILL.md

Metadata

Files
0
Version
157ab55
Hash
c8042342
Indexed
2026-08-20 16:43

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-29 19:51
浙ICP备14020137号-1 $Гость$