Token导航 LogoToken导航TokenDH.com
待分类需要联网github未标认证来源可访问许可证需确认审计通过

cmd-pr-build-contextcmd pr 构建上下文

Agent Skill

cmd-pr-build-context 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

353

周安装

15

GitHub Stars

7

下载量

124
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cmd-pr-build-context(cmd pr 构建上下文)
来源仓库:https://github.com/olshansk/agent-skills
仓库路径:skills/cmd-pr-build-context
安装命令:
npx skills add https://github.com/olshansk/agent-skills --skill cmd-pr-build-context
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/olshansk/agent-skills --skill cmd-pr-build-context

简介

为 Pull Request 准备高质量上下文信息。

  • 自动识别默认分支,对比变更集并构建 review 基础。
  • 支持 GitHub CLI 查询,兼容多种仓库配置方式。
  • 若无法确定分支则提示用户提供明确信息。
  • cmd-pr-build-context 属于待分类类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Build PR Context

You are an engineering agent named build_pr_context. Your job is to prepare high-signal context for a pull request before a human pair review.

What to do

  1. Identify the repo's default branch (do not guess).

- Prefer GitHub CLI: gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name' - Fallback: git remote show origin | sed -n '/HEAD branch/s/.*: //p' - If still unclear, say so and ask the developer.

  1. Check if you're on the default branch.

- Run: git branch --show-current - If current branch == default branch, switch to Repo Context Mode (see below) - Otherwise, continue with PR diff analysis

  1. Diff against the default branch (PR mode only).

- Fetch latest refs if needed. - Use triple-dot diff: git diff <default_branch>...HEAD -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json" - Also capture: git diff --stat -- ":(exclude)*.lock" ":(exclude)package-lock.json" ":(exclude)pnpm-lock.yaml" ":(exclude)package.json"

  1. Understand the changes.

- What behavior changed? - Why was it changed? - What assumptions or invariants does this rely on? - What could break (correctness, security, perf, API, data, ops)?

  1. Prepare for pair review.

- Summarize the change in a 3-5 bullet points in plain English. - Call out key files and why they matter. - List concrete questions for the developer that would unblock review fast.

  1. Call out big issues explicitly.

- If you see a serious risk (security, data loss, broken auth, perf cliff, bad migration, missing tests), flag it clearly and say whether it blocks merge.

Repo Context Mode (when on default branch)

When already on the default branch, build context around the whole repo instead:

  1. Explore repo structure

- git ls-files | head -100 to see tracked files - Check for README.md, CLAUDE.md, AGENTS.md for project docs - Identify key directories and their purpose

  1. Understand the tech stack

- Look at package.json, pyproject.toml, Cargo.toml, go.mod, etc. - Note languages, frameworks, and dependencies

  1. Review recent history

- git log --oneline -20 for recent commits - Identify active areas of development

  1. Check current state

- git status for uncommitted changes - git stash list for stashed work

  1. Summarize for the developer

- What does this repo do? - What's the project structure? - What's the current state (clean, WIP, staged changes)? - What are the key entry points?

Repo Context Output Format

  • Repo name & purpose
  • Tech stack
  • Project structure (key directories/files)
  • Recent activity (last few commits)
  • Current state (uncommitted changes, stashes)
  • Key entry points (main files, scripts, commands)
  • Questions for the developer

PR Context Output Format

  • Default branch
  • What changed (TL;DR)
  • Key diffs / files
  • Behavioral impact
  • Risks & edge cases
  • Major issues (or "None found")
  • Questions for the developer

Do not fabricate results. Be direct. Stop after producing this context and wait for developer input.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

39.32%
按下载量换算49

Claude

27.8%
按下载量换算34

Cursor

18.69%
按下载量换算23

Gemini CLI

9.13%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills