Skip to content

Add setting-up-local-cluster skill for local development setup - #7

Merged
viragtripathi merged 1 commit into
mainfrom
skill/onboarding-and-migrations/setting-up-local-cluster
Apr 24, 2026
Merged

viragtripathi merged 1 commit into
mainfrom
skill/onboarding-and-migrations/setting-up-local-cluster

Conversation

@viragtripathi

Copy link
Copy Markdown
Contributor

Adds a new skill under onboarding-and-migrations/setting-up-local-cluster that guides downloading and starting a local CockroachDB cluster using the official binary.

Key points:

  • Defaults to a 3-node cluster to exercise replication, range distribution, leaseholder balancing, and survival goals
  • Includes single-node option for lightweight setups
  • Covers air-gapped environment support
  • Provides MCP Toolbox environment variable configuration
  • Platform detection for macOS (Intel/Apple Silicon), Linux (Intel/ARM), and Windows

What does this PR do?

Related Issue

Closes #

Type of Change

  • New skill
  • Skill update/improvement
  • Documentation update
  • Infrastructure/tooling change
  • Bug fix

Skill Compliance Checklist

  • SKILL.md includes required frontmatter fields (name, description)
  • Skill name follows naming conventions (lowercase, hyphens, gerund form preferred)
  • Skill name matches directory name exactly
  • Description is specific and includes "when to use" trigger keywords
  • Description is max 1024 characters
  • Skill is under 500 lines (or uses references/ for detailed content)
  • References official CockroachDB documentation (not duplicate content)
  • Includes safety guardrails for risky operations (if applicable)
  • Tested with at least one AI agent (manual validation)
  • No time-sensitive information (version numbers, dates, "currently")
  • Directory structure follows specification (only scripts/, references/, assets/ subdirs)
  • No reserved words in skill name ("anthropic", "claude")
  • Local validation passes: python scripts/validate-spec.py skills/

Documentation Updates

  • README.md
  • CONTRIBUTING.md
  • Skill SKILL.md files
  • Other (specify):

Testing

Manual testing:

  • Tested with AI agent (specify which one):
  • Verified skill is discoverable with appropriate prompts
  • Validated technical accuracy against CockroachDB docs
  • Tested any scripts or commands included in the skill

Automated testing:

  • Local validation script passes: python scripts/validate-spec.py skills/
  • CI validation will run automatically on this PR

Additional Context

Reviewer Notes


By submitting this PR, I confirm:

Guides downloading and starting a local CockroachDB cluster using the
official binary. Defaults to a 3-node cluster to exercise replication,
range distribution, leaseholder balancing, and survival goals. Includes
single-node option, air-gapped environment support, and MCP Toolbox
environment variable configuration.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new onboarding skill that documents how to download and run a local CockroachDB cluster (defaulting to a 3-node setup) for development using the official binary.

Changes:

  • Introduces a new setting-up-local-cluster skill with binary download instructions and artifact naming patterns.
  • Documents commands for starting a 3-node cluster (plus a single-node alternative) and verifying connectivity/health.
  • Adds guidance for air-gapped environments, MCP Toolbox env vars, and basic stop/data-destruction steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +42 to +50
### Installation

```bash
# Example: macOS Apple Silicon, v25.4.9
curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz
mkdir -p ~/.cockroachdb/bin
cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/
export PATH="$HOME/.cockroachdb/bin:$PATH"
```

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prerequisites and download table mention Windows, but the Installation section only shows a macOS curl | tar example and doesn’t include Windows (PowerShell) download/extract steps or PATH guidance. Add a Windows-specific snippet (or explicitly scope the skill to WSL/macOS/Linux) so the Windows claim is actionable.

Copilot uses AI. Check for mistakes.
Comment on lines +24 to +27
## Step 1: Detect Platform and Download

Detect the OS and architecture, then download the appropriate binary.

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR description calls out “platform detection”, and this section says “Detect the OS and architecture”, but no concrete detection commands or decision logic are provided. Either add minimal uname/arch/PowerShell detection steps (and how to map them to the filename patterns) or reword this section to indicate that the user must select the correct artifact manually.

Copilot uses AI. Check for mistakes.
Comment on lines +130 to +132
kill $(cat ~/.cockroachdb/data/node1/cockroach.pid) 2>/dev/null
kill $(cat ~/.cockroachdb/data/node2/cockroach.pid) 2>/dev/null
kill $(cat ~/.cockroachdb/data/node3/cockroach.pid) 2>/dev/null

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stop commands will still emit errors from cat if a PID file doesn’t exist (stderr redirection only applies to kill). Consider guarding with a file existence check or redirecting cat stderr as well, so “stop” is quiet/idempotent when nodes aren’t running.

Suggested change
kill $(cat ~/.cockroachdb/data/node1/cockroach.pid) 2>/dev/null
kill $(cat ~/.cockroachdb/data/node2/cockroach.pid) 2>/dev/null
kill $(cat ~/.cockroachdb/data/node3/cockroach.pid) 2>/dev/null
[ -f ~/.cockroachdb/data/node1/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node1/cockroach.pid)" 2>/dev/null
[ -f ~/.cockroachdb/data/node2/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node2/cockroach.pid)" 2>/dev/null
[ -f ~/.cockroachdb/data/node3/cockroach.pid ] && kill "$(cat ~/.cockroachdb/data/node3/cockroach.pid)" 2>/dev/null

Copilot uses AI. Check for mistakes.
Comment on lines +2 to +6
name: setting-up-local-cluster
description: Downloads and starts a local CockroachDB cluster for development using the official binary. Use when a developer needs a local CockroachDB instance, when no cluster is available, or when setting up a new development environment.
---

# Setting Up a Local CockroachDB Cluster

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

scripts/validate-spec.py emits a naming warning when the skill name doesn’t end with ing (and doesn’t match one of its allowed gerund prefixes). setting-up-local-cluster will trigger that warning; consider renaming to an *-ing form (and matching the directory name) if you want validation to be clean even under --strict.

Suggested change
name: setting-up-local-cluster
description: Downloads and starts a local CockroachDB cluster for development using the official binary. Use when a developer needs a local CockroachDB instance, when no cluster is available, or when setting up a new development environment.
---
# Setting Up a Local CockroachDB Cluster
name: local-cockroachdb-cluster-provisioning
description: Downloads and starts a local CockroachDB cluster for development using the official binary. Use when a developer needs a local CockroachDB instance, when no cluster is available, or when setting up a new development environment.
---
# Local CockroachDB Cluster Provisioning

Copilot uses AI. Check for mistakes.
Comment on lines +40 to +48
Replace `{VERSION}` with the desired release (e.g., `25.4.9`). See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) for the latest GA version.

### Installation

```bash
# Example: macOS Apple Silicon, v25.4.9
curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz
mkdir -p ~/.cockroachdb/bin
cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/

Copilot AI Apr 24, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The skill includes a specific CockroachDB version (e.g., 25.4.9) and refers to “the latest GA version”. The repo PR template explicitly calls out avoiding time-sensitive information (including version numbers), so this should be rewritten to use placeholders (e.g., {VERSION}) throughout the example commands and avoid wording that implies a moving target.

Suggested change
Replace `{VERSION}` with the desired release (e.g., `25.4.9`). See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) for the latest GA version.
### Installation
```bash
# Example: macOS Apple Silicon, v25.4.9
curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz
mkdir -p ~/.cockroachdb/bin
cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/
Replace `{VERSION}` with the desired CockroachDB release. See [CockroachDB Releases](https://www.cockroachlabs.com/docs/releases/) to choose a release.
### Installation
```bash
# Example: macOS Apple Silicon
curl -fsSL https://binaries.cockroachdb.com/cockroach-v{VERSION}.darwin-11.0-arm64.tgz | tar xz
mkdir -p ~/.cockroachdb/bin
cp cockroach-v{VERSION}.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/

Copilot uses AI. Check for mistakes.
@viragtripathi
viragtripathi merged commit 5ad6e4d into main Apr 24, 2026
5 checks passed
@viragtripathi
viragtripathi deleted the skill/onboarding-and-migrations/setting-up-local-cluster branch April 24, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants