PR Submit From KV Store
Use this skill to submit a pull request from artifacts stored in kv_store.
Inputs
task_id(required)base(optional)head(optional)
Data Contract
Read these keys first:
pr:{task_id}:title(text/plain)pr:{task_id}:body(text/markdown)pr:{task_id}:checks(application/json, optional)
Fail fast if title or body is missing or empty.
Procedure
- Read required keys from
kv_store. - Write title/body to local temp files.
- Build command with
gh pr create --title "$(cat title_file)" --body-file body_file. - If
baseis set, append--base. - If
headis set, append--head. - Execute command with
bash. - Parse output and write result to
pr:{task_id}:resultas JSON.
Hard Rules
- Never use inline
gh pr create --body "...". - Always use
--body-file. - Keep
work_itemslimited to lifecycle metadata and the shared key prefix.
Result Shape
Store this JSON to pr:{task_id}:result:
{
"task_id": "<task_id>",
"url": "<pr_url>",
"number": 123,
"head": "feature/...",
"base": "main",
"status": "created"
}
Converted and distributed by TomeVault — claim your Tome and manage your conversions.