jeremylongshore/tons-of-skills-marketplace / plugins/community/contributing-clanker/skills/contribute-prepare
contribute-prepare
VerifiedPrepare an OSS contribution locally after a read-only contribution audit. Creates explicitly scoped candidate records, repository dossiers, worktrees, test evidence, and gate results, but never publishes to GitHub. Use when the user has selected an issue and asks to set up, research, implement, test, or draft the contribution. Trigger with "/contribute-prepare" or "prepare this contribution locally".
scripts/gates/c03-pr-body-sections.sh
View on GitHub#!/usr/bin/env bash
# Catalog: C3 — PR body draft missing sections required by the repo's PR template
source "$(dirname "$0")/lib/preamble.sh"
gate_read_input
# Pull the raw frontmatter line for pr_template_required_sections (a YAML array)
RAW=$(/usr/bin/awk '
/^---$/ { fm = !fm ? 1 : 2; next }
fm == 1 && /^pr_template_required_sections:/ {
sub(/^pr_template_required_sections:[[:space:]]*/, "")
print
exit
}
' "$GATE_DOSSIER_PATH" 2>/dev/null || /usr/bin/echo "")
if [[ -z "$RAW" || "$RAW" == "[]" ]]; then
gate_skip "no pr_template_required_sections in dossier"
fi
# Strip surrounding [ ], split on commas, strip quotes/whitespace per item
INNER=$(/usr/bin/printf '%s' "$RAW" | /usr/bin/sed -E 's/^\[//; s/\]$//')
if [[ -z "$INNER" ]]; then
gate_skip "pr_template_required_sections is empty"
fi
# Build array of section names
declare -a SECTIONS=()
IFS=',' read -ra RAW_PARTS <<< "$INNER"
for part in "${RAW_PARTS[@]}"; do
clean=$(/usr/bin/printf '%s' "$part" | /usr/bin/sed -E 's/^[[:space:]]*"?//; s/"?[[:space:]]*$//')
[[ -n "$clean" ]] && SECTIONS+=("$clean")
done
if (( ${#SECTIONS[@]} == 0 )); then
gate_skip "no parseable section names in pr_template_required_sections"
fi
# Extract candidate's `## PR body` section
PR_BODY=$(/usr/bin/awk '/^## PR body/{flag=1;next} /^## /{flag=0} flag' "$GATE_CANDIDATE_PATH" 2>/dev/null || /usr/bin/echo "")
if [[ -z "$PR_BODY" ]]; then
gate_skip "no '## PR body' section in candidate yet"
fi
# Check each required section name appears as a markdown header (## or ###), case-insensitive
declare -a MISSING=()
for name in "${SECTIONS[@]}"; do
if ! /usr/bin/printf '%s' "$PR_BODY" | /usr/bin/grep -qiE "^#{2,3}[[:space:]]+${name}[[:space:]]*$"; then
MISSING+=("$name")
fi
done
if (( ${#MISSING[@]} > 0 )); then
joined=$(IFS=', '; /usr/bin/printf '%s' "${MISSING[*]}")
gate_block "PR body missing required sections: $joined" "add the section headers (## $joined) to your PR body draft"
fi
gate_pass "all required PR body sections present"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |