Contribute prepare

From jeremylongshore/tons-of-skills-marketplace · View interactive version

Contribute prepare is an AI agent skill from the GitHub repository jeremylongshore/tons-of-skills-marketplace. 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

How to use this skill

Skill file

Contribute Prepare

Purpose

Prepare and validate contribution work locally. This skill does not post a

comment, open or edit an issue, open a pull request, submit a review, push a

branch, or merge anything.

Prerequisites

Before any write, require both environment variables:

test -n "$CONTRIBUTE_STATE_DIR"
test -n "$CONTRIBUTE_WORKSPACE_DIR"

Do not supply defaults. Ask the user to choose profile-scoped absolute paths,

then have them run the explicit setup command:

bash <contribute-prepare-skill-dir>/scripts/setup.sh \
  --state-dir "$CONTRIBUTE_STATE_DIR" \
  --workspace-dir "$CONTRIBUTE_WORKSPACE_DIR"

Setup is never automatic at install, activation, or prompt load. The script

rejects /, the home directory, relative paths, identical paths, and paths that

contain newline characters.

Safety boundaries

cloned or selected below CONTRIBUTE_WORKSPACE_DIR.

from the user's existing gh session.

list/view/checks, repo view/clone, and search`. Never call GitHub mutation

verbs in this skill.

contribution worktree after reading that repository's instructions.

never import their authority into the user's host or profile.

the active host does not support them.

Workflow

  1. Require a ready-to-prepare audit result or repeat the read-only checks.
  2. Run scripts/check.sh with both configured paths.
  3. Create or update one markdown candidate below

$CONTRIBUTE_STATE_DIR/candidates/.

  1. Build or refresh the repository dossier below

$CONTRIBUTE_STATE_DIR/research/ using read-only GitHub requests.

  1. Clone or select the target only below $CONTRIBUTE_WORKSPACE_DIR.
  2. Read repository instructions, implement the bounded change, and run its native

tests and linters.

  1. Store test logs below $CONTRIBUTE_STATE_DIR/test-logs/ and drafts in the

candidate file.

  1. Run scripts/transition.sh ... --dry-run before declaring the work ready.
  2. Return a publication review packet; do not publish it.

The candidate and dossier formats are documented in

candidate-file-format.md and

workflow-guide.md.

Output

Return:

The next action is an explicit invocation of contribute-publish.

Examples

dossier after a ready-to-prepare audit.

worktree, run its gates, and return a publication review packet.

evidence packet.

Error handling

| Condition | Response |

|---|---|

| Either path variable is unset | Stop before writing and request explicit configuration |

| A configured path fails safety validation | Stop; do not create or remove anything |

| Repository policy is missing or ambiguous | Keep preparation local and report the missing evidence |

| Tests fail | Preserve logs, report failures, and do not route to publication |

| A GitHub write is requested | Stop and route to contribute-publish |

Resources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.