pr-review-ci-fix
它能做什么
这个技能帮助 AI 智能体审阅拉取请求,阅读失败的构建日志,并提出或进行修复。适合希望在审阅和持续集成之间实现更快循环的开发者。
适用场景
- ✓当拉取请求需要结构化审阅,并在具体代码行添加评论时。
- ✓当持续集成检查显示失败,你希望智能体阅读日志并找出原因时。
- ✓当你希望智能体不断重复修复、推送和重新检查的循环,直到检查通过时。
技能链接
https://github.com/composio-community/awesome-codex-skills/blob/master/pr-review-ci-fix/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“这个拉取请求的 CI 失败了。请帮我阅读日志、修复问题,并重新检查。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会通过 Composio 工具获取拉取请求的差异和失败的任务日志。它会审阅修改、提出修复方案、推送提交,并重新运行检查,直到通过或需要你提供意见。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
PR Review + CI Auto-Fix
Drive GitHub/GitLab PR reviews and CI triage from the shell using the Composio CLI. No tab-switching between browser, terminal, and chat.
When to Use
- A PR needs a structured review (correctness, style, risks) with inline comments.
- CI is red and you want the agent to read the logs, patch the code, and recheck.
- You want a single command that cycles: fetch diff → critique → fix → push → rerun.
Prereqs
curl -fsSL https://composio.dev/install | bash
composio login
composio link github # or: composio link gitlab
Optional env for non-interactive runs: COMPOSIO_API_KEY.
Core Toolkits
Discover slugs with search, then pin them for reuse:
composio search "list pull request files" --toolkits github
composio search "download workflow logs" --toolkits github
composio search "create pr comment" --toolkits gitlab
Common slugs you'll reuse:
GITHUB_GET_A_PULL_REQUESTGITHUB_LIST_PULL_REQUESTS_FILESGITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUESTGITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORYGITHUB_DOWNLOAD_WORKFLOW_RUN_LOGSGITLAB_GET_SINGLE_MERGE_REQUESTGITLAB_LIST_MERGE_REQUEST_DISCUSSIONSGITLAB_CREATE_NEW_MERGE_REQUEST_NOTE
Always confirm via composio execute <SLUG> --get-schema before first use.
Review Workflow
- Pull the PR metadata + diff:
composio execute GITHUB_GET_A_PULL_REQUEST \ -d '{"owner":"acme","repo":"app","pull_number":482}' composio execute GITHUB_LIST_PULL_REQUESTS_FILES \ -d '{"owner":"acme","repo":"app","pull_number":482}' - Summarize risk areas (auth, migrations, public APIs, tests) into a review body.
- Post the review with inline comments:
composio execute GITHUB_CREATE_A_REVIEW_FOR_A_PULL_REQUEST -d '{ "owner":"acme","repo":"app","pull_number":482, "event":"COMMENT", "body":"Overall LGTM with 2 blocking notes.", "comments":[ {"path":"src/auth.ts","line":42,"body":"Missing null check on session"}, {"path":"src/auth.ts","line":88,"body":"Token TTL is hardcoded; move to config"} ] }'
CI Auto-Fix Loop
- Find the red run:
composio execute GITHUB_LIST_WORKFLOW_RUNS_FOR_A_REPOSITORY \ -d '{"owner":"acme","repo":"app","branch":"feat/billing","status":"failure"}' - Pull logs:
composio execute GITHUB_DOWNLOAD_WORKFLOW_RUN_LOGS \ -d '{"owner":"acme","repo":"app","run_id":123456}' - Parse failure → patch locally (the agent writes the fix into the working tree).
- Commit + push via local
git, then re-poll step 1 untilconclusion=success. - Post a PR comment describing each fix commit so the human reviewer sees what changed.
One-Shot Workflow File
Save as scripts/review-and-fix.ts and run with composio run --file ./scripts/review-and-fix.ts -- --pr 482:
const pr = process.argv.includes("--pr")
? Number(process.argv[process.argv.indexOf("--pr") + 1])
: null;
const meta = await execute("GITHUB_GET_A_PULL_REQUEST", {
owner: "acme", repo: "app", pull_number: pr
});
const files = await execute("GITHUB_LIST_PULL_REQUESTS_FILES", {
owner: "acme", repo: "app", pull_number: pr
});
console.log(JSON.stringify({ meta, files }, null, 2));
GitLab Variant
Swap slugs and param names:
composio execute GITLAB_GET_SINGLE_MERGE_REQUEST \
-d '{"id":"acme/app","merge_request_iid":482}'
composio execute GITLAB_CREATE_NEW_MERGE_REQUEST_NOTE \
-d '{"id":"acme/app","merge_request_iid":482,"body":"CI fix pushed as commit deadbeef"}'
Troubleshooting
Connection required for github→composio link github- Unknown input shape →
composio execute <SLUG> --get-schema - Log download huge → stream via
composio proxyagainst the raw API andgreplocally - Rate limits → serialize calls or lower poll frequency; avoid
--parallelfor the same repo
Full CLI reference: docs.composio.dev/docs/cli
常见问题
它也支持 GitLab 吗?
支持。该技能通过 Composio 工具同时涵盖 GitHub 和 GitLab。
智能体在使用工具名称前会检查吗?
会。它在首次使用前会确认每个工具的架构。
我可以停止这个循环吗?
可以。你可以随时停止循环,智能体会报告停在了哪里。
详情
作者的原始描述
Automated PR review and CI auto-fix for GitHub and GitLab using the Composio CLI. Pulls diffs, fetches failing job logs, posts review comments, and loops fix commits until checks go green.
热度
- GitHub 星标
- 17k
- 排名
- #10758
- 许可证
- —
- 更新时间
- 2026/7/25
评论
- …
同一仓库的更多技能
agent-deep-links
17k帮你的智能体制作可点击的链接,直接在 Codex 或 Cursor 等应用中打开某个线程、文件、文件夹或设置。
brand-guidelines
17k帮你的智能体使用 OpenAI 风格的品牌颜色和字体来设计作品,使其与 Codex 的外观和感觉保持一致。
codebase-migrate
17k帮你的智能体规划并执行涉及数百个文件的大型代码迁移,例如框架升级或 API 重命名。
connect-apps
17k让你的智能体在 Gmail、Slack 和 GitHub 等应用中执行真实操作,例如发送邮件或创建问题单。