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/gates/a04-issue-age.sh

View on GitHub
#!/usr/bin/env bash
# Catalog: A4 — Issue is too old (stale, abandoned, or contested)
# Mitigates: stale issues are a real anti-signal — either the maintainer
# decided not to fix it, the underlying code changed and the issue's premise
# no longer holds, or someone has been silently working on it for months
# without progress. None of those are good for our merge probability.
#
# Thresholds (configurable via dossier `max_issue_age_days:`):
#   issue_age <= 90 days             → PASS
#   issue_age 91-180 days            → WARN ("aging — verify it's still actionable")
#   issue_age 181-365 days           → BLOCK ("stale; recommend pick a fresher target")
#   issue_age > 365 days             → BLOCK + harder ("zombie issue; fix likely landed elsewhere")
#
# A repo with `max_issue_age_days: N` in dossier overrides the default 180.
source "$(dirname "$0")/lib/preamble.sh"

gate_read_input

ISSUE_NUM=$(fm_field "$GATE_CANDIDATE_PATH" "issue_number")
if [[ -z "$ISSUE_NUM" || -z "$GATE_REPO" ]]; then
  gate_skip "no issue_number or repo in candidate"
fi

# Read max_issue_age from dossier, default 180
MAX_AGE_DAYS=180
if [[ -n "$GATE_DOSSIER_PATH" && -f "$GATE_DOSSIER_PATH" ]]; then
  V=$(fm_field "$GATE_DOSSIER_PATH" "max_issue_age_days")
  [[ -n "$V" && "$V" =~ ^[0-9]+$ ]] && MAX_AGE_DAYS="$V"
fi

# Live fetch — issue createdAt + last activity (updatedAt + last comment)
META_JSON=$(gh_safe issue view "$ISSUE_NUM" --repo "$GATE_REPO" --json createdAt,updatedAt,comments --jq '{createdAt, updatedAt, last_comment_at: (.comments | sort_by(.createdAt) | .[-1].createdAt // null)}' || /usr/bin/echo "")

if [[ -z "$META_JSON" ]] ; then
  gate_skip "couldn't fetch issue metadata (gh failure?)"
fi

CREATED=$(/usr/bin/printf '%s' "$META_JSON" | jq -r '.createdAt // ""')
UPDATED=$(/usr/bin/printf '%s' "$META_JSON" | jq -r '.updatedAt // ""')
LAST_COMMENT=$(/usr/bin/printf '%s' "$META_JSON" | jq -r '.last_comment_at // ""')

if [[ -z "$CREATED" ]] ; then
  gate_skip "issue createdAt missing in API response"
fi

NOW_EPOCH=$(/usr/bin/date -u +%s)
CREATED_EPOCH=$(/usr/bin/date -u -d "$CREATED" +%s 2>/dev/null || echo 0)
AGE_DAYS=$(( (NOW_EPOCH - CREATED_EPOCH) / 86400 ))

# Activity recency — most recent of updatedAt or last comment
LATEST_ACT_EPOCH=0
if [[ -n "$UPDATED" ]] ; then
  V=$(/usr/bin/date -u -d "$UPDATED" +%s 2>/dev/null || echo 0)
  [[ "$V" -gt "$LATEST_ACT_EPOCH" ]] && LATEST_ACT_EPOCH="$V"
fi
if [[ -n "$LAST_COMMENT" && "$LAST_COMMENT" != "null" ]] ; then
  V=$(/usr/bin/date -u -d "$LAST_COMMENT" +%s 2>/dev/null || echo 0)
  [[ "$V" -gt "$LATEST_ACT_EPOCH" ]] && LATEST_ACT_EPOCH="$V"
fi
SILENCE_DAYS=$(( (NOW_EPOCH - LATEST_ACT_EPOCH) / 86400 ))

# Verdicts
if [[ "$AGE_DAYS" -gt 365 ]] ; then
  gate_block "issue is ${AGE_DAYS}d old (>365d zombie threshold)" "1+ year-old issues are usually either fixed elsewhere, abandoned, or have premises that no longer apply. Pick a fresher target. Override only with a written rationale referencing what's changed."
fi

if [[ "$AGE_DAYS" -gt "$MAX_AGE_DAYS" ]] ; then
  gate_block "issue is ${AGE_DAYS}d old (max for this repo: ${MAX_AGE_DAYS}d)" "stale issue. Maintainer engagement likely dropped. Pick a fresher target — or override with rationale if you have direct maintainer signal that it's still wanted."
fi

# Activity-based check — even fresh issues with long silence are suspect
if [[ "$SILENCE_DAYS" -gt 90 ]] ; then
  gate_warn "issue is fresh (${AGE_DAYS}d old) but no activity in ${SILENCE_DAYS}d" "comment first to ping for current relevance before investing time"
fi

if [[ "$AGE_DAYS" -gt 90 ]] ; then
  gate_warn "issue is ${AGE_DAYS}d old (aging — under the ${MAX_AGE_DAYS}d block threshold but past the 90d sweet spot)" "verify the underlying premise still holds in current code; verify maintainer still wants this fix"
fi

gate_pass "issue is ${AGE_DAYS}d old, last activity ${SILENCE_DAYS}d ago"
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