Agent Skillsstella/stella › open-pr

open-pr

GitHub

用于准备当前分支以创建 Pull Request。流程包括验证隔离分支、安装工具链、变基到远程 main、对照规范自我审查并修复、运行 lint/typecheck/test 等质量检查、执行安全审计,最后推送代码并以草稿形式创建 PR。

.ai/local-skills/open-pr/SKILL.md stella/stella

Trigger Scenarios

用户请求准备 PR 需要自动化代码审查和质量检查 希望将功能分支推送到远程并创建草稿 PR

Install

npx skills add stella/stella --skill open-pr -g -y
More Options

Non-standard path

npx skills add https://github.com/stella/stella/tree/main/.ai/local-skills/open-pr -g -y

Use without installing

npx skills use stella/stella@open-pr

指定 Agent (Claude Code)

npx skills add stella/stella --skill open-pr -a claude-code -g -y

安装 repo 全部 skill

npx skills add stella/stella --all -g -y

预览 repo 内 skill

npx skills add stella/stella --list

SKILL.md

Frontmatter
{
    "name": "open-pr",
    "description": "Prepare the current worktree branch for a pull request: rebase, self-review, quality checks, and open a draft PR."
}

Open PR

Prepare the current worktree branch for a pull request: rebase, self-review, quality checks, and open a draft PR.

Instructions

  1. Verify you are on an isolated feature branch:

    CURRENT=$(git branch --show-current)
    if [ "$CURRENT" = "main" ] || [ "$CURRENT" = "master" ]; then
      echo "Error: /open-pr must not run from the default branch."
      exit 1
    fi
    

    If on main, abort and ask the user which feature branch to use.

    Check whether the current checkout is safe to use for PR prep:

    git status --short
    

    If the checkout is the user's shared root checkout, has unrelated local changes, or the work spans multiple repos or submodules, stop and move to clean worktree(s) before rebasing or committing. Create the worktree from the current feature branch and continue the rest of this skill there; do not rewrite history in the dirty root checkout.

  2. Bootstrap the worktree before trusting failures:

    Before running lint, typecheck, tests, or hooks, verify that the worktree actually has the repo toolchain available (bun, workspace dependencies, turbo, oxlint, project bins, and env links if the repo expects them).

    If the worktree is missing the toolchain, run the repo's normal install/setup flow first, then rerun the same command. Do not treat missing-bin or module-resolution failures as product-code regressions. Keep setup-only churn such as accidental lockfile changes out of the PR unless the task explicitly requires them.

  3. Rebase onto remote main:

    git fetch origin main
    git rebase origin/main
    

    If conflicts arise, resolve them. After resolving, continue the rebase. If a conflict is ambiguous, ask the user.

  4. Self-review against CLAUDE.md conventions:

    Get the full diff against main:

    git diff origin/main --name-only
    

    Read every changed file in full. Review against the conventions in CLAUDE.md (TypeScript strictness, error handling, security, naming, i18n, patterns). Fix any violations directly; don't just list them. Commit fixes separately with fix: address self-review findings.

  5. Run all quality checks:

    bun run lint \
      && bun run format \
      && bun run typecheck \
      && bun run test
    

    If any check fails, fix the issue and re-run. Commit fixes with fix: lint/format/type errors.

  6. Security audit:

    Run /security-audit. Fix any critical or high findings in files changed in this PR before opening it. Commit fixes with fix: address security audit findings.

  7. Open the PR as draft:

    Push the branch and create the PR as a draft:

    git push --force-with-lease -u origin HEAD
    gh pr create --fill --draft
    

    If --fill produces a poor title/body, write a proper one following Conventional Commits (feat:, fix:, etc.) with a very concise summary. Do not add a separate test plan unless the user explicitly asks for one. Do not mention deployment choices or attribute the motivation for the PR to a specific person's feedback, request, or experience.

    This repository is public. Never include marketing language, internal business context, pricing, competitive analysis, user identities, conversation specifics, deployment specifics, or security architecture beyond what the diff obviously shows. Do not add details that would help a motivated attacker exploit the code, especially a vulnerable previous version being fixed. Assume the PR may be read by hostile adversaries, not only friendly collaborators. When sensitive context would improve readability, omit it by default; ask the user only if omission would make the PR hard to review.

Version History

  • 85792bd Current 2026-07-24 16:12

Same Skill Collection

.agents/skills/click-around/SKILL.md
.agents/skills/conventions-ai/SKILL.md
.agents/skills/conventions-db/SKILL.md
.agents/skills/conventions-i18n/SKILL.md
.agents/skills/conventions-ingestion/SKILL.md
.agents/skills/conventions-perf/SKILL.md
.agents/skills/conventions-scale/SKILL.md
.agents/skills/conventions-security/SKILL.md
.agents/skills/conventions-use-effect/SKILL.md
.agents/skills/conventions-ux/SKILL.md
.agents/skills/dev/SKILL.md
.agents/skills/finish-pr/SKILL.md
.agents/skills/new-handler/SKILL.md
.agents/skills/open-pr/SKILL.md
.agents/skills/plan/SKILL.md
.agents/skills/product-deep-think/SKILL.md
.agents/skills/product-think/SKILL.md
.agents/skills/rabbit-round/SKILL.md
.agents/skills/regression-hunt/SKILL.md
.agents/skills/security-audit/SKILL.md
.agents/skills/update-deps/SKILL.md
.ai/local-skills/click-around/SKILL.md
.ai/local-skills/conventions-ai/SKILL.md
.ai/local-skills/conventions-db/SKILL.md
.ai/local-skills/conventions-i18n/SKILL.md
.ai/local-skills/conventions-ingestion/SKILL.md
.ai/local-skills/conventions-perf/SKILL.md
.ai/local-skills/conventions-scale/SKILL.md
.ai/local-skills/conventions-security/SKILL.md
.ai/local-skills/conventions-use-effect/SKILL.md
.ai/local-skills/conventions-ux/SKILL.md
.ai/local-skills/dev/SKILL.md
.ai/local-skills/new-handler/SKILL.md
.ai/local-skills/plan/SKILL.md
.ai/local-skills/product-deep-think/SKILL.md
.ai/local-skills/rabbit-round/SKILL.md
.ai/local-skills/security-audit/SKILL.md
.ai/local-skills/update-deps/SKILL.md
packages/cli/skills/stella-cli/SKILL.md
packages/skills/blueprints/answer-from-sources/SKILL.md
packages/skills/blueprints/blank/SKILL.md
packages/skills/blueprints/check-against-rules/SKILL.md
packages/skills/blueprints/intake-to-draft/SKILL.md
.agents/skills/conventions-testing/SKILL.md
.ai/local-skills/conventions-testing/SKILL.md

Metadata

Files
0
Version
85792bd
Hash
eb342a75
Indexed
2026-07-24 16:12

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-16 20:11
浙ICP备14020137号-1 $mapa de visitantes$