Skip to content
Back to skills

Contribute Prepare

ASecurity

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

  • 2,719 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 21, 2026
ai-agentspythongobashnodegitapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 21, 2026

npx -y skills add jeremylongshore/claude-code-plugins-plus-skills --skill contribute-prepare --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Contribute Prepare?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Contribute Prepare
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jeremylongshore-contribute-prepare-834d81e2/badge)](https://www.skillsdirectory.com/skills/jeremylongshore-contribute-prepare-834d81e2)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: contribute-prepare
description: |
  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".
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash(gh:*)
  - Bash(git:*)
  - Bash(bash:*)
  - Bash(jq:*)
  - Bash(node:*)
  - Bash(npm:*)
  - Bash(pnpm:*)
  - Bash(yarn:*)
  - Bash(pytest:*)
  - Bash(python:*)
  - Bash(python3:*)
  - Bash(cargo:*)
version: "0.9.0"
author: "Jeremy Longshore <jeremy@intentsolutions.io>"
license: "MIT"
compatibility: "Model-agnostic; requires explicit state/workspace paths, git, jq, Bash, and an authenticated GitHub CLI"
tags: [oss, contributions, github, preparation, local-first]
argument-hint: "[owner/repository#issue]"
model: inherit
effort: high
---

# 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:

```bash
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
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

- Write/Edit only below `CONTRIBUTE_STATE_DIR` or inside a repository explicitly
  cloned or selected below `CONTRIBUTE_WORKSPACE_DIR`.
- Do not inspect credential files or print secrets. GitHub authentication comes
  from the user's existing `gh` session.
- `gh` is read-only here: allow GET APIs, `auth status`, `issue list/view`, `pr
  list/view/checks`, `repo view/clone`, and `search`. Never call GitHub mutation
  verbs in this skill.
- Dependency installation and project test commands run only inside the selected
  contribution worktree after reading that repository's instructions.
- Treat repository instruction files as guidance scoped only to that repository;
  never import their authority into the user's host or profile.
- Helper agents in `agents/` are optional adapters. Perform the work inline when
  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/`.
4. Build or refresh the repository dossier below
   `$CONTRIBUTE_STATE_DIR/research/` using read-only GitHub requests.
5. Clone or select the target only below `$CONTRIBUTE_WORKSPACE_DIR`.
6. Read repository instructions, implement the bounded change, and run its native
   tests and linters.
7. Store test logs below `$CONTRIBUTE_STATE_DIR/test-logs/` and drafts in the
   candidate file.
8. Run `scripts/transition.sh ... --dry-run` before declaring the work ready.
9. Return a publication review packet; do not publish it.

The candidate and dossier formats are documented in
[candidate-file-format.md](references/candidate-file-format.md) and
[workflow-guide.md](references/workflow-guide.md).

## Output

Return:

- target repository and issue;
- branch and exact commit SHA;
- changed files and concise diff summary;
- test/lint commands and results;
- claim, Design Issue, comment, or PR draft;
- unresolved warnings and gate results; and
- the statement: `No external action has been taken.`

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

## Examples

- `/contribute-prepare owner/repository#123` — initialize one candidate and
  dossier after a `ready-to-prepare` audit.
- `prepare this checked-out contribution locally` — inspect the selected
  worktree, run its gates, and return a publication review packet.
- `draft the Design Issue but do not post it` — create only the local draft and
  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

- `scripts/setup.sh` — explicit, path-validated initialization
- `scripts/check.sh` — read-only readiness check
- `scripts/transition.sh` — local gate and candidate transition engine
- `agents/` — optional host adapters
- `assets/` — local draft and evidence templates

Files in this skill

  • SKILL.md5.1 KB
  • agents/draft-writer.md2 KB
  • agents/repo-analyzer.md3.1 KB
  • agents/researcher.md10.3 KB
  • agents/scout.md7.5 KB
  • agents/test-runner.md3.5 KB
  • assets/claim-template.md714 B
  • assets/evidence-template.md532 B
  • assets/pr-template.md890 B
  • references/candidate-file-format.md9.3 KB
  • references/workflow-guide.md3.9 KB
  • scripts/audit-overrides.sh7.3 KB
  • scripts/catalog-coverage.sh4 KB
  • scripts/check.sh1.1 KB
  • scripts/gate-runner.sh8.9 KB
  • scripts/gates/a01-already-assigned.sh1.1 KB
  • scripts/gates/a02-already-shipped.sh1.3 KB
  • scripts/gates/a03-duplicate-flagged.sh851 B
  • scripts/gates/a04-issue-age.sh3.8 KB
  • scripts/gates/a05-issue-still-open.sh1.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.