bootstrap-checks-from-prs
SKILL.md
Bootstrap Checks From PRs
Use this skill to mine recent merged PRs, infer recurring review expectations, and auto-write draft checks into .agents/checks/ (and subtree check folders when applicable).
What This Skill Produces
- Draft check files in
.agents/checks/*.md(global) and<area>/.agents/checks/*.md(scoped) - Root
AGENTS.mdupdated to reference.agents/checks/for code reviews (created if missing) - Evidence artifacts:
artifacts/pr-scan.jsonartifacts/rule-candidates.jsonartifacts/check-drafts.jsonartifacts/check-bootstrap-report.md
Inputs
repo(optional):owner/name; if omitted, infer from local repo viaghx(optional): merged PRs to analyze (default30)base_branch(optional): default branch if not providedtime_window_days(optional): constrain recencymin_frequency(optional): default2(recommend2-3)include_labels(optional): list of labelsinclude_paths(optional): only focus on these prefixesexclude_paths(optional): ignore these prefixesmax_checks(optional): cap initial output (default10)default_severity(optional): defaultmedium
Execution Workflow
Run these scripts in sequence from the skill directory:
- Collect PR evidence
python scripts/collect_prs.py --x 30
- Extract and score candidate rules
python scripts/extract_rule_candidates.py --min-frequency 2
- Render candidate check drafts
python scripts/generate_check_drafts.py --max-checks 10 --default-severity medium
- Write checks with collision safety
python scripts/write_checks.py
- Ensure root
AGENTS.mdreferences checks
- If root
AGENTS.mdis missing, create it. - Add code-review guidance that tells agents to load
.agents/checks/and relevant subtree-scoped<subtree>/.agents/checks/. - Preserve existing instructions; append a focused section if needed.
- Generate review report
python scripts/generate_report.py
If user provides custom inputs, pass them through all relevant scripts.
Safety and Quality Requirements
- Never overwrite existing check files silently.
- On filename collisions, use
-draftsuffix (or-draft-N). - Ensure root
AGENTS.mdreferences.agents/checks/for review checks. - If root
AGENTS.mdis missing, create it. - Do not rely on
write_checks.pyto mutateAGENTS.md; enforce this in agent workflow. - Keep one check per file.
- Keep checks focused and actionable.
- Favor a small high-signal initial set (
5-10checks). - Escalate to
high/criticalonly with strong security/compliance evidence.
Recommended Agent Response After Running
Return a concise report with:
- Files created
- Confidence score per check
- Estimated false-positive risk
- Suggested decision for each check (
keep,refine,drop)
Then recommend calibration on a holdout PR/diff before broad adoption.
Weekly Installs
5
Repository
avoidthekitchen…c-skillsGitHub Stars
1
First Seen
9 days ago
Security Audits
Installed on
opencode5
gemini-cli5
github-copilot5
codex5
amp5
cline5