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/e04-fork-target.sh
View on GitHub#!/usr/bin/env bash
# Catalog: E4 — Verify origin points at user's fork (not upstream)
# Mitigates: pushing to someone else's repo by accident, or being unable to
# push at all.
source "$(dirname "$0")/lib/preamble.sh"
gate_read_input
CLONE="$CONTRIBUTE_WORKSPACE_DIR/${GATE_REPO##*/}"
if [[ ! -d "$CLONE/.git" ]]; then
gate_skip "no local clone at $CLONE"
fi
USER_LOGIN=$(gh_safe api user --jq .login 2>/dev/null || /usr/bin/echo "")
if [[ -z "$USER_LOGIN" ]]; then
gate_skip "could not resolve current gh user login"
fi
ORIGIN_URL=$(/usr/bin/git -C "$CLONE" remote get-url origin 2>/dev/null || /usr/bin/echo "")
if [[ -z "$ORIGIN_URL" ]]; then
gate_block "no origin remote configured in $CLONE" "set origin to your fork: gh repo fork ${GATE_REPO} --remote --remote-name origin"
fi
# Parse owner from URL — handles SSH (git@github.com:owner/repo.git) and
# HTTPS (https://github.com/owner/repo.git) forms.
ORIGIN_OWNER=$(/usr/bin/printf '%s' "$ORIGIN_URL" | /usr/bin/sed -E 's#^git@github\.com:([^/]+)/.*$#\1#; s#^https?://github\.com/([^/]+)/.*$#\1#')
UPSTREAM_OWNER="${GATE_REPO%%/*}"
if [[ "$ORIGIN_OWNER" == "$UPSTREAM_OWNER" ]]; then
gate_inform "origin points at upstream ($UPSTREAM_OWNER); pushing directly to upstream — verify you have access"
fi
if [[ "$ORIGIN_OWNER" != "$USER_LOGIN" ]]; then
gate_block "origin owner is '$ORIGIN_OWNER' but your gh login is '$USER_LOGIN'" "set origin to your fork: gh repo fork ${GATE_REPO} --remote --remote-name origin"
fi
gate_pass "origin points at your fork ($USER_LOGIN/${GATE_REPO##*/})"
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 |