Agent Skillslangchain-ai/open-swe › bootstrap-repo-analysis

bootstrap-repo-analysis

GitHub

针对无历史反馈的新仓库,通过爬取GitHub合并PR的评论数据,提取团队审查规范并生成初始代码审查提示词,实现冷启动。

agent/skills/bootstrap-repo-analysis/SKILL.md langchain-ai/open-swe

触发场景

首次分析无历史记录的仓库 需要初始化代码审查风格配置

安装

npx skills add langchain-ai/open-swe --skill bootstrap-repo-analysis -g -y
更多选项

非标准路径

npx skills add https://github.com/langchain-ai/open-swe/tree/main/agent/skills/bootstrap-repo-analysis -g -y

不安装直接使用

npx skills use langchain-ai/open-swe@bootstrap-repo-analysis

指定 Agent (Claude Code)

npx skills add langchain-ai/open-swe --skill bootstrap-repo-analysis -a claude-code -g -y

安装 repo 全部 skill

npx skills add langchain-ai/open-swe --all -g -y

预览 repo 内 skill

npx skills add langchain-ai/open-swe --list

SKILL.md

Frontmatter
{
    "name": "bootstrap-repo-analysis",
    "description": "First-time analysis of a repository with no prior reviewer outcomes. Crawl historical merged-PR review feedback with the gh CLI (plus any preloaded samples), extract the team's review norms, and synthesize the initial per-repo review-style prompt. Use this for a cold-start repo; use continual-learning instead once the reviewer has accumulated finding outcomes."
}

Bootstrap repo analysis

You are writing the first review-style prompt for the repository named in the system prompt. There is no outcomes history yet, so your signal comes entirely from the repo's own historical PR review feedback. Do not call read_finding_outcomes in this mode — it will be empty.

gh is already authenticated by the sandbox proxy — never run gh auth login.

1. Research (required)

Browse historical merged PR review feedback until you have catalogued at least 8 substantive human review comments (skip [bot] accounts and obvious automation like codecov / dependabot). Useful commands:

gh pr list --repo <owner>/<repo> --state merged --limit 30
gh api repos/<owner>/<repo>/pulls/<PR_NUMBER>/reviews
gh api repos/<owner>/<repo>/pulls/<PR_NUMBER>/comments
gh api repos/<owner>/<repo>/issues/<PR_NUMBER>/comments

If the first batch is sparse, raise --limit or walk older PR numbers. The user message may include preloaded samples — verify and extend them with gh, don't just trust them.

Identify the top ~5 human reviewers by volume and note their phrasing, what severity they assign, and what they routinely ignore.

2. Extract concrete, repo-specific patterns

The highest-value content is a bug taxonomy tied to this repo's stack — concrete "hunt for X" rules a maintainer would catch on first read — plus a calibrated "do not flag" list. Pair each pattern with the failure mode and, where you saw it, the kind of diff that triggered it. Avoid generic advice that would apply to any repo.

Cover:

  • What the team routinely flags vs. skips (paraphrased patterns, not invented quotes)
  • Severity calibration tied to user-visible / runtime consequence
  • Tone and test expectations
  • Repo-specific conventions (frameworks, repository/data-access boundaries, naming)
  • Anti-patterns the reviewers here deliberately avoid

Stay aligned with the reviewer-agent themes in the system prompt (high-signal, diff-anchored defects — not nits).

3. Save

Only after real research, call save_review_style_prompt once with:

  • custom_prompt: 400–1200 words teaching the reviewer this repo's norms.
  • analysis_summary: 2–4 sentences for the dashboard.
  • top_reviewers (comma-separated logins), prs_sampled, reviews_sampled.

Do not save a generic guide after one or two commands. Only after ~25+ merged PRs with zero human feedback may you save a short, conservative guide — and say so in analysis_summary.

版本历史

  • 6b94413 当前 2026-08-20 03:59

    移除gh命令前的GH_TOKEN=dummy前缀,改为利用沙箱代理自动注入凭证;优化CI部署规则限制feature分支发布。

  • ed12bb8 2026-07-25 09:47

同 Skill 集合

.agents/skills/write-oep/SKILL.md
agent/bundled_skills/baby-sit/SKILL.md
agent/bundled_skills/html-artifacts/SKILL.md
agent/skills/continual-learning/SKILL.md

元信息

文件数
0
版本
0ff86e2
Hash
7923a1b6
收录时间
2026-07-25 09:47

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-22 09:26
浙ICP备14020137号-1