collect-prs
Collect GitHub PRs into the per-language `{lang}_pr_ids.txt` files that `legoflow-curator create` consumes. Wraps…
от LegoX★ 45 звёзд на GitHub
Установить collect-prs в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
/curator:collect-prs
Collect qualifying GitHub PRs per language. This is the first pipeline
stage; /curator:create-tasks (task generation) consumes its output. Run only from
blocks/curator/.
Step 0 - Orient
Validate:
- Current directory is
blocks/curator/. config.yamlparses and hasmeta_info.name == "curator".repos/legoflow-curator/tools/collect_prs_wo_image.pyexists (submodule initialized; if missing, tell the user to run/curator:setup).scripts/collect_all_bg.shandscripts/load_runtime_env.shexist.
Read config.yaml -> runtime_info.input.pr_collection and CLAUDE.md
("PR collection configuration") before launching.
Step 1 - Resolve collection tokens
scripts/load_runtime_env.sh reads the TXT path from
runtime_info.input.github_token and exports the token variables. Explicit
token environment variables remain overrides.
source scripts/load_runtime_env.sh
load_runtime_env
test -s "$COLLECT_GITHUB_TOKEN_FILE" || \
test -n "${GITHUB_TOKENS:-}${GITHUB_TOKEN:-}"
If neither the file nor environment channels contain a token, stop and ask the
user to provide one. Never print token values. COLLECT_TOKEN_LIMIT (from
pr_collection.token_limit) caps the combined, deduplicated token set
(0 = all).
Step 2 - Refuse duplicate live collectors
BLOCK_DIR="$(pwd -P)"
pgrep -af 'collect_prs_wo_image.py|scripts/collect_all_bg.sh' \
| grep -F "$BLOCK_DIR" || true
If a collector is already alive for this block, refuse to start another;
report the PID and the log under artifacts/logs/collect_all_*.log.
Step 3 - Choose scope
| Scope | Use when | How |
|---|---|---|
sample |
First run, "quick", "just a few", smoke before a full pass. | One language, small repo_num (e.g. 2) and max_prs_per_repo (e.g. 10) via env overrides. This creates a small block-local pool; /curator:create-tasks smoke uses a different bundled sample file. |
single-language |
User names one language. | LANGUAGES=<lang> override; other knobs from config. |
full |
All languages / no narrower scope. | Everything from config.yaml -> pr_collection. |
Any per-run change to repo_num, max_prs_per_repo, languages, or filter
thresholds should be shown as an explicit env override (below) and confirmed,
not written into config.yaml silently.
Step 4 - Hydrate config and show the plan
source scripts/load_runtime_env.sh
load_runtime_env
This exports, from config.yaml -> runtime_info.input.pr_collection:
LEGOFLOW_CURATOR_COLLECT_LANGUAGES,LEGOFLOW_CURATOR_COLLECT_REPO_NUM,LEGOFLOW_CURATOR_COLLECT_MAX_PRS_PER_REPO,LEGOFLOW_CURATOR_COLLECT_OUTPUT_DIR,COLLECT_TOKEN_LIMIT- global filters:
LEGOFLOW_CURATOR_PR_MIN_STARS,LEGOFLOW_CURATOR_PR_MIN_MERGED_PRS,LEGOFLOW_CURATOR_PR_MIN_LANGUAGE_PERCENTAGE,LEGOFLOW_CURATOR_PR_MAX_DAYS_SINCE_PUSH,LEGOFLOW_CURATOR_PR_MIN_ISSUE_BODY_LENGTH,LEGOFLOW_CURATOR_PR_MIN_FILES_CHANGED,LEGOFLOW_CURATOR_PR_MAX_FILES_CHANGED,LEGOFLOW_CURATOR_PR_MAX_LINES_CHANGED
Only vars still unset after the caller environment and block .env are filled
from config.yaml; the ignored block .env intentionally overrides the
caller environment. Per-language threshold overrides live in the collector's
LANGUAGE_OVERRIDES and take precedence over the globals.
Print a compact summary and get explicit confirmation before a full or single-language run:
legoflow-curator collect-prs plan
scope : <sample|single-language|full>
languages : <LEGOFLOW_CURATOR_COLLECT_LANGUAGES>
repo_num : <LEGOFLOW_CURATOR_COLLECT_REPO_NUM>
max_prs/repo : <LEGOFLOW_CURATOR_COLLECT_MAX_PRS_PER_REPO>
output_dir : <LEGOFLOW_CURATOR_COLLECT_OUTPUT_DIR>
token_limit : <COLLECT_TOKEN_LIMIT> (of <N> unique file + env tokens)
filters : stars>=.. merged>=.. lang%>=.. files<=.. lines<=..
logs : artifacts/logs/collect_all_<stamp>.log
Full and single-language passes are long-running and consume GitHub API quota; never launch either without a "yes".
Step 5 - Launch
Full / single-language / config-driven — use the wrapper, which reads the
LEGOFLOW_CURATOR_COLLECT_* env (with direct env vars still winning):
# full: languages from config
bash scripts/collect_all_bg.sh
# single language: override just the language list
LANGUAGES=python bash scripts/collect_all_bg.sh
Sample — small foreground pass for a first check, overriding only the knobs that make it small (thresholds still come from config/defaults):
source scripts/load_runtime_env.sh && load_runtime_env
python3 repos/legoflow-curator/tools/collect_prs_wo_image.py \
--languages python \
--repo_num 2 \
--max_prs_per_repo 10 \
--output_dir artifacts/collected_prs \
--disable_progress_bar
Output is <output_dir>/{language}_pr_ids.txt, one owner/repo:pr-NUMBER
per line. /curator:create-tasks consumes these files automatically only w
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл collect-prs?
Collect GitHub PRs into the per-language `{lang}_pr_ids.txt` files that `legoflow-curator create` consumes. Wraps `repos/legoflow-curator/tools/collect_prs_wo_image.py` driven by `config.yaml -> runtime_info.input.pr_collection` (languages, repo_num, max_prs_per_repo, output_dir, token_limit, and the global filter thresholds), which `scripts/load_runtime_env.sh` exports as `LEGOFLOW_CURATOR_COLLECT_*` / `LEGOFLOW_CURATOR_PR_*` / `COLLECT_TOKEN_LIMIT`. The collector combines tokens from its token file with `GITHUB_TOKENS` / `GITHUB_TOKEN`; tokens never come from `config.yaml`. Long-running for a full multi-language pass; supports a small first-run sample. This is the PR-collection stage that precedes `/curator:create-tasks`. Triggers on phrases like "collect PRs", "gather PRs", "run PR collection", "collect github prs for legoflow-curator", "refresh pr_ids".
Как установить скилл collect-prs?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл collect-prs запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…