OSS Contribution System
A complete system for contributing to open-source repos. Four skills work together in a learning loop --each contribution makes the next one better.
Quick Start
- 1. First time? Just say: INLINECODE0
- The system will create a profile, check repo openness, and find issues for you.
- 2. Found an issue? Say: INLINECODE1
- End-to-end: implement -> open PR -> respond to bots -> ping maintainer.
- 3. Already have a PR? Say: INLINECODE2
- Checks CI, bot comments, stale status, and takes action.
- 4. Want a quality review? Say: INLINECODE3
- Root cause analysis, diff check, description quality, bot response strategy.
How the System Works
CODEBLOCK0
Profile (./oss-pilot-data/profiles/<repo>.md): Stores repo-specific knowledge --build commands, maintainer styles, bot behavior, lessons learned. Grows with each contribution. See _template.md for the schema.
Context files (./oss-pilot-data/context/pr-<repo>-<N>.md): Track each PR's approach, bot decisions, and outcome. Archived after merge/close for future reference.
The Four Skills
oss-discover (find.md)
Find high-value issues with the highest merge probability.
- - Checks repo openness (external contributor merge rate)
- Checks issue velocity (how fast issues get claimed)
- Scans 8 sources: high-signal labels -> bugs -> CI failures -> reclaimable PRs -> merged PR gaps -> scoped modules -> area merge rate -> codebase cleanup
- Verifies bugs still exist, checks comments for signals, evaluates fix feasibility
Read: discover.md
oss-auto (auto.md)
One command from issue to opened PR. Orchestrates discover + pr.
- - Cold start: auto-creates profile for new repos
- Feasibility check -> implement -> open PR -> respond to bots -> mark ready -> ping maintainer
- Auto-detects build tooling (Node/Python/Go/Rust/Make)
- Reads CONTRIBUTING.md and CLAUDE.md for repo conventions
Read: auto.md
oss-pr (pr.md)
Quality gate for PRs. Validates before requesting review.
- - Root cause analysis (right layer? blast radius? semantic contracts?)
- Common mistake patterns and anti-patterns
- PR description with "What did NOT change" and "What I Did NOT Verify"
- Bot response strategy (accept/decline/repeat handling)
- CI failure triage template
Read: pr.md
oss-check (check.md)
Morning check-in for all pending PRs.
- - CI/bot/stale status monitoring
- Retrospective on merged/closed PRs (writes Outcome + routes lessons)
- Maintenance: prunes stale lessons, archives old context files
- Handles fork PR CI skipping (normal for external contributors)
Read: check.md
Prerequisites
- -
gh CLI installed and authenticated (gh auth status) - GitHub account with a fork of the target repo
- Optional: local clone for codebase scanning (Source 8)
Security Model
This skill instructs the agent to run build, lint, and test commands (e.g., pnpm install, make, cargo test) from the target repository. This is inherent to contribution automation --you cannot validate a fix without running the repo's toolchain.
Threat surface: If the target repo contains malicious build scripts (e.g., postinstall hooks), those commands execute on your machine. This is the same risk as manually cloning a repo and running npm install.
How risk is managed:
- - User trust boundary: You choose which repo to target. The skill never picks repos autonomously.
- Runtime gating: OpenClaw's exec approval system prompts before executing shell commands. The skill issues instructions; the runtime decides whether to run them.
- Scope checkpoint: The skill stops and asks before committing to changes >5 files or >200 lines.
Recommended hardening:
- - Run inside a container (
openclaw --container <name>) or VM when targeting unfamiliar repos. - Review the repo's
package.json scripts / Makefile targets before first run. - Use a dedicated GitHub account for automation if you prefer isolation.
Data Directories
The system creates and manages these directories:
- -
./oss-pilot-data/profiles/ --one profile per repo - INLINECODE21 --active PR context files
- INLINECODE22 --completed PR context files (for learning)
OSS 贡献系统
一个完整的开源仓库贡献系统。四个技能在学习循环中协同工作——每次贡献都会让下一次变得更好。
快速开始
- 1. 第一次使用? 只需输入:oss discover <仓库URL或名称>
- 系统将创建配置文件,检查仓库开放程度,并为你寻找问题。
- 2. 找到了问题? 输入:oss auto <仓库> #12345
- 端到端流程:实现 -> 开启PR -> 响应机器人 -> 提醒维护者。
- 3. 已有PR? 输入:oss check <仓库>
- 检查CI、机器人评论、过期状态,并采取行动。
- 4. 想要质量审查? 输入:oss pr review <仓库> #12345
- 根因分析、差异检查、描述质量、机器人响应策略。
系统工作原理
discover --> auto --> pr --> check --> retrospective
^ ^ | |
| +-------+ |
| (人工审查循环) |
| v
| 配置文件增长(经验、模式)
| |
+---- 检查存档历史 ------------------------+
(避免过去错误)
配置文件 (./oss-pilot-data/profiles/<仓库>.md):存储仓库特定知识——构建命令、维护者风格、机器人行为、经验教训。随每次贡献增长。参见 _template.md 了解架构。
上下文文件 (./oss-pilot-data/context/pr-<仓库>-.md):跟踪每个PR的方法、机器人决策和结果。合并/关闭后存档以供将来参考。
四个技能
oss-discover (find.md)
寻找具有最高合并概率的高价值问题。
- - 检查仓库开放度(外部贡献者合并率)
- 检查问题处理速度(问题被认领的速度)
- 扫描8个来源:高信号标签 -> 错误 -> CI失败 -> 可回收PR -> 已合并PR缺口 -> 限定模块 -> 区域合并率 -> 代码库清理
- 验证错误是否仍然存在,检查评论信号,评估修复可行性
阅读:discover.md
oss-auto (auto.md)
从问题到开启PR的一条命令。协调discover和pr。
- - 冷启动:为新仓库自动创建配置文件
- 可行性检查 -> 实现 -> 开启PR -> 响应机器人 -> 标记就绪 -> 提醒维护者
- 自动检测构建工具(Node/Python/Go/Rust/Make)
- 读取CONTRIBUTING.md和CLAUDE.md了解仓库约定
阅读:auto.md
oss-pr (pr.md)
PR的质量把关。在请求审查前进行验证。
- - 根因分析(正确层级?影响范围?语义契约?)
- 常见错误模式和反模式
- PR描述包含未更改内容和未验证内容
- 机器人响应策略(接受/拒绝/重复处理)
- CI失败分类模板
阅读:pr.md
oss-check (check.md)
所有待处理PR的早晨检查。
- - CI/机器人/过期状态监控
- 已合并/关闭PR的回顾(记录结果 + 传递经验)
- 维护:清理过期经验,归档旧上下文文件
- 处理fork PR的CI跳过(外部贡献者正常情况)
阅读:check.md
前置条件
- - 已安装并认证的gh CLI(gh auth status)
- 拥有目标仓库fork的GitHub账号
- 可选:用于代码库扫描的本地克隆(来源8)
安全模型
此技能指示代理运行目标仓库的构建、lint和测试命令(例如pnpm install、make、cargo test)。这是贡献自动化的固有特性——不运行仓库的工具链就无法验证修复。
威胁面:如果目标仓库包含恶意构建脚本(例如postinstall钩子),这些命令将在你的机器上执行。这与手动克隆仓库并运行npm install的风险相同。
风险管理方式:
- - 用户信任边界:你选择目标仓库。该技能从不自主选择仓库。
- 运行时门控:OpenClaw的执行审批系统在执行shell命令前会提示。技能发出指令;运行时决定是否执行。
- 范围检查点:在提交超过5个文件或200行的更改前,技能会停止并询问。
推荐加固措施:
- - 在容器(openclaw --container <名称>)或虚拟机中运行,以处理不熟悉的仓库。
- 首次运行前审查仓库的package.json脚本/Makefile目标。
- 如果偏好隔离,请使用专用的GitHub账号进行自动化操作。
数据目录
系统创建并管理以下目录:
- - ./oss-pilot-data/profiles/——每个仓库一个配置文件
- ./oss-pilot-data/context/——活跃的PR上下文文件
- ./oss-pilot-data/context/_archived/——已完成的PR上下文文件(用于学习)