Skip to content

jeremylongshore/tons-of-skills-marketplace / plugins/community/contributing-clanker/skills/contribute-prepare

contribute-prepare

Verified

Prepare 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".

FileKindSize
SKILL.mdskill md5.1 KB
agents/draft-writer.mdmarkdown2.0 KB
agents/repo-analyzer.mdmarkdown3.1 KB
agents/researcher.mdmarkdown10.5 KB
agents/scout.mdmarkdown7.5 KB
agents/test-runner.mdmarkdown3.5 KB
assets/claim-template.mdmarkdown714 B
assets/evidence-template.mdmarkdown532 B
assets/pr-template.mdmarkdown890 B
references/candidate-file-format.mdmarkdown9.3 KB
references/workflow-guide.mdmarkdown3.9 KB
scripts/audit-overrides.shexecutablescript7.3 KB
scripts/catalog-coverage.shexecutablescript4.0 KB
scripts/check.shexecutablescript1.1 KB
scripts/gate-runner.shexecutablescript8.9 KB
scripts/gates/a01-already-assigned.shexecutablescript1.1 KB
scripts/gates/a02-already-shipped.shexecutablescript1.3 KB
scripts/gates/a03-duplicate-flagged.shexecutablescript851 B
scripts/gates/a04-issue-age.shexecutablescript3.8 KB
scripts/gates/a05-issue-still-open.shexecutablescript1.6 KB
scripts/gates/a06-claim-etiquette-required.shexecutablescript1.6 KB
scripts/gates/a09-mention-routing.shexecutablescript2.1 KB
scripts/gates/b01-base-branch.shexecutablescript969 B
scripts/gates/b02-branch-naming.shexecutablescript1.0 KB
scripts/gates/b03-clone-fresh.shexecutablescript1.0 KB
scripts/gates/b05-dco-signoff.shexecutablescript1.5 KB
scripts/gates/b06-commit-format.shexecutablescript1.4 KB
scripts/gates/b07-scope-files.shexecutablescript2.1 KB
scripts/gates/b12-new-deps.shexecutablescript1.7 KB
scripts/gates/b14-local-checks.shexecutablescript1.7 KB
scripts/gates/b16-local-check-allowlist.shexecutablescript1.8 KB
scripts/gates/c01-draft-first.shexecutablescript902 B
scripts/gates/c02-pr-title-format.shexecutablescript1.2 KB
scripts/gates/c03-pr-body-sections.shexecutablescript2.0 KB
scripts/gates/c04-ui-screenshots.shexecutablescript1.6 KB
scripts/gates/c05-test-evidence.shexecutablescript1.4 KB
scripts/gates/c07-coauthor-banned.shexecutablescript1.2 KB
scripts/gates/c09-issue-link.shexecutablescript1.5 KB
scripts/gates/c11-no-force-push.shexecutablescript1.3 KB
scripts/gates/c12-ci-green.shexecutablescript1.2 KB
scripts/gates/c13-bots-passed.shexecutablescript2.1 KB
scripts/gates/c16-no-self-merge.shexecutablescript914 B
scripts/gates/c19-body-claim-vs-diff.shexecutablescript2.9 KB
scripts/gates/d02-no-ai-bug-reports.shexecutablescript1.4 KB
scripts/gates/d03-no-ai-pr-reviews.shexecutablescript1.1 KB
scripts/gates/d05-no-reopen.shexecutablescript1.1 KB
scripts/gates/e02-ai-strike-track.shexecutablescript2.7 KB
scripts/gates/e04-fork-target.shexecutablescript1.5 KB
scripts/gates/f01-license-compat.shexecutablescript3.5 KB
scripts/gates/f03-fixtures-clean.shexecutablescript1.2 KB
scripts/gates/f04-override-disclosure.shexecutablescript2.4 KB
scripts/gates/g01-no-vendored-edits.shexecutablescript1.9 KB
scripts/gates/g02-protected-paths.shexecutablescript1.2 KB
scripts/gates/g03-no-changelog-edits.shexecutablescript1.4 KB
scripts/gates/g04-no-version-bump.shexecutablescript1.4 KB
scripts/gates/g06-override-rate-limit.shexecutablescript1.5 KB
scripts/gates/lib/preamble.shexecutablescript4.8 KB
scripts/lint-candidate.shexecutablescript5.1 KB
scripts/researcher-build.shexecutablescript17.6 KB
scripts/researcher-refresh.pyscript4.9 KB
scripts/setup.shexecutablescript1.7 KB
scripts/test-known-traps.shexecutablescript5.4 KB
scripts/test-override-audit.shexecutablescript3.5 KB
scripts/test-plug-in.shexecutablescript4.0 KB
scripts/test-scout-refresh.shexecutablescript4.9 KB
scripts/test-stale-dossier-refresh.shexecutablescript3.7 KB
scripts/transition.shexecutablescript10.3 KB

scripts/lint-candidate.sh

View on GitHub
#!/usr/bin/env bash
# lint-candidate.sh — report missing required body sections in candidate files.
#
# Sibling to audit-overrides.sh and catalog-coverage.sh: a read-only reporter
# that walks $CONTRIBUTE_STATE_DIR/candidates/, reads each candidate's status,
# and surfaces missing required sections per the matrix in
# skills/contribute/references/candidate-file-format.md.
#
# Required-sections matrix (matches the spec + transition.sh):
#   shortlist  → ## Scope, ## Files to touch
#   claimed    → ## Scope, ## Files to touch, ## Claim comment draft
#   working    → same as claimed
#   submitted  → ## PR title, ## PR body, ## Test results
#   merged     → same as submitted
#   open       → no body requirements
#   dropped    → no body requirements
#
# Usage:
#   lint-candidate.sh                  # all candidates, table output
#   lint-candidate.sh --status=submitted   # filter to one status
#   lint-candidate.sh --missing-only       # only candidates with missing sections
#   lint-candidate.sh --json               # JSON output (one object per candidate)
#   lint-candidate.sh --candidates-dir=X   # override the candidate dir
#
# Exit codes:
#   0  — no missing sections across the filtered set (clean)
#   1  — at least one candidate has missing required sections
#   64 — bad arguments

set -uo pipefail

: "${CONTRIBUTE_STATE_DIR:?CONTRIBUTE_STATE_DIR must be explicitly set}"

CAND_DIR="${CONTRIBUTE_STATE_DIR}/candidates"
STATUS_FILTER=""
MISSING_ONLY=0
JSON_OUT=0

while [[ $# -gt 0 ]]; do
  case "$1" in
    --status=*)         STATUS_FILTER="${1#*=}" ;;
    --missing-only)     MISSING_ONLY=1 ;;
    --json)             JSON_OUT=1 ;;
    --candidates-dir=*) CAND_DIR="${1#*=}" ;;
    -h|--help)          /usr/bin/sed -n '2,28p' "$0" | /usr/bin/sed 's/^# \{0,1\}//'; exit 0 ;;
    *)                  /usr/bin/echo "unknown arg: $1" >&2; exit 64 ;;
  esac
  shift
done

if [[ ! -d "$CAND_DIR" ]]; then
  /usr/bin/echo "candidate dir not found: $CAND_DIR" >&2
  exit 64
fi

# Required-sections per status. Pipe-delimited for compatibility with the
# same scheme transition.sh uses.
required_for() {
  case "$1" in
    shortlist) /usr/bin/echo '## Scope|## Files to touch' ;;
    claimed)   /usr/bin/echo '## Scope|## Files to touch|## Claim comment draft' ;;
    working)   /usr/bin/echo '## Scope|## Files to touch|## Claim comment draft' ;;
    submitted) /usr/bin/echo '## PR title|## PR body|## Test results' ;;
    merged)    /usr/bin/echo '## PR title|## PR body|## Test results' ;;
    *)         /usr/bin/echo '' ;;  # open, dropped, unknown
  esac
}

# Per-candidate evaluation. Echoes a JSON object per candidate so the table
# pass and the JSON pass can both consume it.
evaluate_one() {
  local file="$1"
  local basename
  basename=$(/usr/bin/basename "$file")
  local status
  status=$(/usr/bin/awk '/^---$/{fm=!fm?1:2;next} fm==1 && /^status:/{sub(/^status:[[:space:]]*/,""); print; exit}' "$file" 2>/dev/null)
  status="${status:-unknown}"

  local req
  req=$(required_for "$status")

  local missing=()
  if [[ -n "$req" ]]; then
    IFS='|' read -ra SECTIONS <<< "$req"
    for sec in "${SECTIONS[@]}"; do
      if ! /usr/bin/grep -qE "^${sec}\b" "$file" 2>/dev/null; then
        missing+=("$sec")
      fi
    done
  fi

  local missing_json
  if [[ "${#missing[@]}" -eq 0 ]]; then
    missing_json='[]'
  else
    missing_json=$(/usr/bin/printf '%s\n' "${missing[@]}" | jq -Rsc 'split("\n") | map(select(. != ""))')
  fi

  jq --null-input --compact-output --arg cand "$basename" --arg status "$status" --argjson missing "$missing_json" \
    '{candidate: $cand, status: $status, missing: $missing, missing_count: ($missing | length)}'
}

# Walk all candidates, evaluate each, capture rows.
ROWS=()
EXIT_CODE=0
shopt -s nullglob
for f in "$CAND_DIR"/*.md; do
  row=$(evaluate_one "$f")
  STATUS=$(/usr/bin/echo "$row" | jq -r .status)
  MISSING_COUNT=$(/usr/bin/echo "$row" | jq -r .missing_count)

  # Apply --status filter
  if [[ -n "$STATUS_FILTER" && "$STATUS" != "$STATUS_FILTER" ]]; then
    continue
  fi
  # Apply --missing-only filter
  if [[ "$MISSING_ONLY" -eq 1 && "$MISSING_COUNT" -eq 0 ]]; then
    continue
  fi

  ROWS+=("$row")
  if [[ "$MISSING_COUNT" -gt 0 ]]; then
    EXIT_CODE=1
  fi
done
shopt -u nullglob

# Emit
if [[ "$JSON_OUT" -eq 1 ]]; then
  /usr/bin/printf '%s\n' "${ROWS[@]}" | jq -s '.'
else
  /usr/bin/printf '%-55s  %-10s  %s\n' 'candidate' 'status' 'missing'
  /usr/bin/printf '%-55s  %-10s  %s\n' '---------' '------' '-------'
  if [[ "${#ROWS[@]}" -eq 0 ]]; then
    /usr/bin/printf '(no candidates matched filter)\n'
  else
    for row in "${ROWS[@]}"; do
      cand=$(/usr/bin/echo "$row" | jq -r .candidate)
      status=$(/usr/bin/echo "$row" | jq -r .status)
      missing_str=$(/usr/bin/echo "$row" | jq -r '.missing | if length == 0 then "(none)" else join(", ") end')
      /usr/bin/printf '%-55s  %-10s  %s\n' "$cand" "$status" "$missing_str"
    done

    # Summary footer
    TOTAL=${#ROWS[@]}
    DIRTY=$(/usr/bin/printf '%s\n' "${ROWS[@]}" | jq -s '[.[] | select(.missing_count > 0)] | length')
    /usr/bin/printf '\n%d candidate(s) shown · %d with missing sections\n' "$TOTAL" "$DIRTY"
  fi
fi

exit "$EXIT_CODE"
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: 472kUpdated Claude CodeCodexVerifiedInstall
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: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall