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/test-stale-dossier-refresh.sh

View on GitHub
#!/usr/bin/env bash
# test-stale-dossier-refresh.sh — regression test for dossier freshness signals.
#
# Promise: researcher-build.sh emits a `last_refreshed:` ISO-8601 timestamp
# matching "now" (within 60 seconds). The 14-day staleness check is a
# downstream consumer concern (SKILL.md Step 0.5 + dossier_age helpers);
# this test validates the BUILDER side of the contract.
#
# Note: the actual "auto-refresh at 14 days" trigger logic lives in
# /contribute SKILL.md as agent instructions (not executable code). What
# we CAN test deterministically:
#   1. researcher-build.sh writes last_refreshed: to current time
#   2. an old timestamp is detectable as stale by simple shell math
#   3. the dossier path slug (owner__repo) matches what gates expect
#
# Usage: test-stale-dossier-refresh.sh [--verbose]
# Exit 0: all assertions hold. Exit 1: any failure.

set -uo pipefail

VERBOSE="${1:-}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TMPDIR=$(/usr/bin/mktemp -d)
trap 'rm -rf "$TMPDIR"' EXIT
export CONTRIBUTE_STATE_DIR="$TMPDIR/state"
export CONTRIBUTE_WORKSPACE_DIR="$TMPDIR/workspace"
mkdir -p "$CONTRIBUTE_STATE_DIR/research" "$CONTRIBUTE_WORKSPACE_DIR"

PASS=0
FAIL=0
red()    { /usr/bin/printf '\033[31m%s\033[0m' "$1"; }
green()  { /usr/bin/printf '\033[32m%s\033[0m' "$1"; }

assert() {
  local name="$1" expr="$2"
  /usr/bin/printf '  %-60s ' "$name"
  if eval "$expr" >/dev/null 2>&1; then
    green "PASS"; /usr/bin/echo
    PASS=$((PASS + 1))
  else
    red "FAIL"; /usr/bin/echo
    [[ "$VERBOSE" == "--verbose" ]] && /usr/bin/printf '    expr: %s\n' "$expr" >&2
    FAIL=$((FAIL + 1))
  fi
}

/usr/bin/printf '\n=== dossier freshness regression ===\n\n'

# --- TEST 1: researcher-build emits last_refreshed: matching now ---
DOSSIER="$TMPDIR/lingdojo__kana-dojo.md"
"$SCRIPT_DIR/researcher-build.sh" lingdojo/kana-dojo --no-link-follow --stdout > "$DOSSIER" 2>/dev/null

LAST_REFRESHED=$(/usr/bin/awk '/^last_refreshed:/{print $2; exit}' "$DOSSIER" 2>/dev/null)
NOW_EPOCH=$(/usr/bin/date +%s)
THEN_EPOCH=$(/usr/bin/date -d "$LAST_REFRESHED" +%s 2>/dev/null || /usr/bin/echo 0)
DELTA=$((NOW_EPOCH - THEN_EPOCH))

assert "1. dossier has last_refreshed frontmatter field" \
  '[[ -n "$LAST_REFRESHED" ]]'

assert "2. last_refreshed is within 60 seconds of now" \
  '[[ "$DELTA" -ge 0 && "$DELTA" -le 60 ]]'

# --- TEST 2: stale detection math works (synthetic 30-day-old timestamp) ---
THIRTY_DAYS_AGO=$(/usr/bin/date -u -d '30 days ago' +%Y-%m-%dT%H:%M:%SZ)
THIRTY_EPOCH=$(/usr/bin/date -d "$THIRTY_DAYS_AGO" +%s)
AGE_DAYS=$(( (NOW_EPOCH - THIRTY_EPOCH) / 86400 ))

assert "3. shell-math correctly identifies 30d-old as stale (>14d)" \
  '[[ "$AGE_DAYS" -gt 14 ]]'

# --- TEST 3: dossier filename slug uses double underscore (matches gate expectations) ---
EXPECTED_SLUG="lingdojo__kana-dojo"
ACTUAL_SLUG=$(/usr/bin/basename "$DOSSIER" .md)

assert "4. dossier filename slug matches owner__repo convention" \
  '[[ "$ACTUAL_SLUG" == "$EXPECTED_SLUG" ]]'

# --- TEST 4: the dossier has the manual sections that survive refresh ---
assert "5. dossier has Pet peeves section (manual, append-only)" \
  '/usr/bin/grep -q "^## Pet peeves" "$DOSSIER"'

assert "6. dossier has Failure log section (manual, append-only)" \
  '/usr/bin/grep -q "^## Failure log" "$DOSSIER"'

assert "7. dossier has Notes section (manual, append-only)" \
  '/usr/bin/grep -q "^## Notes" "$DOSSIER"'

# --- TEST 5: dossier has issue_templates field (added 2026-05-03) ---
assert "8. dossier has issue_templates frontmatter (per skill-creator)" \
  '/usr/bin/grep -q "^issue_templates:" "$DOSSIER"'

/usr/bin/echo
/usr/bin/printf '=== summary: %s passed · %s failed ===\n\n' \
  "$(green "$PASS")" "$([ "$FAIL" -gt 0 ] && red "$FAIL" || /usr/bin/echo 0)"

[[ "$FAIL" -eq 0 ]] || exit 1
exit 0
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