python-setup-and-check
This skill should be used when helping non-technical users set up Python and virtual environments for the first time on Mac or Windows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
This skill should be used when helping non-technical users set up Python and virtual environments for the first time on Mac or Windows.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Helps users connect and use a service in Rebel when it isn't already in the built-in connector catalog. Acts as an expert advisor — runs the full build-vs-buy check (catalog, MCP Registry, community) before scaffolding a custom MCP server and guiding research, implementation, security review, and contribution.
Guides users through adding new tools or capabilities to an existing connector (MCP server). Handles eligibility, workspace setup, connector research, implementation via Software Engineer workflow, local testing, and PR submission with an extension-specific template.
Capture citable sources (meetings, documents, files, media, web content) as structured files in memory/sources/ with provenance metadata for traceability.
Help users celebrate impactful wins and surface important learnings by analyzing their recent communications and activities.
Guidelines for maintaining single sources of truth and using signposting to connect documentation without duplication
Evaluate a finalised meeting transcript and distribute relevant content to other spaces, deciding per space whether to copy the full transcript, write a sanitised summary, or skip.
| name | python-setup-and-check |
| description | This skill should be used when helping non-technical users set up Python and virtual environments for the first time on Mac or Windows. |
Purpose: Guide users through their first Python setup with virtual environments, handling platform-specific differences automatically.
When to use: When a user needs to run a Python script that requires external packages (dependencies), but hasn't set up Python/venv yet.
Mindstone Rebel generally uses Python scripts with only built-in libraries (see skills/documentation/writing-scripts.md). However, some scripts (like PDF extraction, advanced AI features) require external packages managed via pip and requirements.txt.
This skill helps non-technical users get from "never used Python" to "can run scripts with dependencies" in a few simple steps.
Instead of manual steps, use the bundled setup scripts in this skill's scripts/ folder:
./scripts/setup-python.sh
# Check-only mode (idempotent, does no harm):
./scripts/setup-python.sh --check
scripts\setup-python.bat
REM Check-only mode (idempotent, does no harm):
scripts\setup-python.bat --check
These scripts automate Python detection, venv creation, dependency installation, and provide helpful error messages.
Use the --check flag to validate setup without changing anything:
.venv/ (or venv/) and verifies interpreter existsrequirements.txt exists, verifies installed packages match via pip freeze and runs pip checkExit codes:
0 = All good1 = Something needs attention (will list exactly what)If the automated scripts aren't suitable, follow these manual steps:
Determine from system info:
darwin in OS versionWindows in OS versionRun appropriate check command:
python3 --version to probe. /usr/bin/python3 is an Apple xcode-select stub; running it pops the OS "install the command line developer tools" dialog when those tools aren't installed (the user experiences this as a surprise "download python3" prompt). Detect availability without executing the stub:
py="$(command -v python3 || true)" # command -v resolves the path; it does NOT run python3
if [ -n "$py" ] && { [ "$py" != /usr/bin/python3 ] || xcode-select -p >/dev/null 2>&1; }; then
"$py" --version # safe: a real Python, or the stub with developer tools present
else
echo "No usable Python found (the macOS /usr/bin stub needs developer tools, or install a real Python)"
fi
Simplest path: just run ./scripts/setup-python.sh --check, which performs this stub-safe detection for you.py --version (preferred) or python --versionIf Python not found:
macOS does not ship a usable Python by default — /usr/bin/python3 is only an Apple placeholder that triggers the developer-tools install dialog when run, not a working interpreter. Install a real Python:
brew install python (Homebrew). Or download the .pkg from https://www.python.org/downloads/macos/ and install it.python3 --versionpython --versionNavigate to the appropriate directory (usually workspace root or script location).
Mac/Linux:
python3 -m venv .venv
Windows (preferred):
py -3.11 -m venv .venv # preferred
# if 3.11 not available:
py -3 -m venv .venv
# as a fallback:
python -m venv .venv
This creates a .venv/ directory containing an isolated Python environment.
Mac/Linux:
source .venv/bin/activate
Windows (Command Prompt):
.venv\Scripts\activate.bat
Windows (PowerShell):
.venv\Scripts\Activate.ps1
Note: If PowerShell gives an error about execution policy, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
After activation, the prompt should show (.venv) prefix.
Upgrade build tooling first:
python -m pip install -U pip setuptools wheel
If a requirements.txt file exists:
pip install -r requirements.txt
If no requirements.txt but you know the packages needed:
pip install package-name-1 package-name-2
Run a simple test:
python -c "import sys; print(f'Python {sys.version} from {sys.executable}')"
Should show the Python version and path inside the .venv/ directory.
Every time scripts with dependencies are needed:
python script-name.pydeactivatepython3 (not python) on Macchmod +x script-name.shSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser.venv/ folder exists).venv/ was created successfully (should contain bin/ or Scripts/ folder)(venv) in prompt)pip install --upgrade pippip install -r requirements.txt.gitignore - Add .venv/ (and venv/) to .gitignore (never commit it)requirements.txtpython -m pip install -U pip setuptools wheel and pip install --upgrade -r requirements.txtAs the AI assistant, when helping users with Python setup:
<user_info> and provide platform-specific commands--check first. Only make changes with explicit user confirmation..venv/User says: "I need to run the PDF extraction script"
AI response workflow:
.venv/ exists in workspacerequirements.txtpython -c "import pdfplumber"scripts/ (default to the primary zone's scripts/ folder)This skill includes:
scripts/setup-python.sh - Mac/Linux automated setup scriptscripts/setup-python.bat - Windows automated setup scripthelp-for-humans/coding-setup-with-Python.md - User-facing documentationskills/documentation/writing-scripts.md - Guidelines for creating scripts