skills/rsconnect/SKILL.md
Posit Connect deployment workflows for R and Python. Use only for Connect/rsconnect/manifest.json/renv/requirements/uv deployment issues, git-backed content, version upgrades, and bundle errors.
npx skillsauth add clssck/rsconnect-skill rsconnectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
In commands below, $SKILL_DIR means the directory containing this file. Replace it with the actual path when executing (e.g., .claude/skills/rsconnect, .cursor/skills/rsconnect).
On first use, ensure the agent skills directory is gitignored. The skill folder (e.g., .cursor/, .agents/, .claude/) should not be committed to the project repository.
Check if .gitignore already contains the relevant entry. If not, add it:
# For Cursor-installed skills:
echo ".cursor/" >> .gitignore
# For .agents/ installed skills:
echo ".agents/" >> .gitignore
# For Claude Code skills:
echo ".claude/" >> .gitignore
Rule: Only add the entry for the agent directory that is actually present in the project. Do not add entries for directories that don't exist.
Ask the user if not clear from context:
Is this R or Python content?
How is this app deployed to Connect?
manifest.json) - simplest for teamsrsconnect::deployApp() (R only)rsconnect deploy manifestIf Git-backed, what branch does Connect watch?
deploy, production) so you control when changes go liveNote: This skill focuses on Git-backed deployment (the default for this project). For push-button methods, the main difference is you don't need
manifest.json— rsconnect generates the bundle on-the-fly.
python is not on PATH, use py -3 (Python launcher).Rscript is not on PATH, use Rscript.exe.powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex".# 1. Check if ready to deploy
Rscript $SKILL_DIR/scripts/pre_deploy_check.R
# 2. Fix any issues reported, then commit
git add manifest.json renv.lock && git commit -m "chore: update manifest"
# 3. Push (Connect auto-deploys from Git)
git push
Before doing anything else, run the pre-deploy check to understand the current state:
Rscript $SKILL_DIR/scripts/pre_deploy_check.R
This reports: R version, rsconnect version, manifest status, Source:unknown count, and library sync state. Use the output to inform your response.
| File | Purpose | When to Update |
|------|---------|----------------|
| renv.lock | Records YOUR local package versions | After renv::install() or renv::update() |
| manifest.json | Tells Connect what to install | After changing renv.lock or app files |
They can drift! Always update both together:
renv::snapshot() # Update renv.lock
rsconnect::writeManifest() # Update manifest.json
Connect needs to know WHERE to download each package. Source: unknown means Connect can't find it.
Common causes: Package installed from local file, missing repo in options, Bioconductor package without prefix.
Fix: Rscript $SKILL_DIR/scripts/fix_unknown_sources.R --dry-run
| Script | Purpose | Flags |
|--------|---------|-------|
| pre_deploy_check.R | Validate deployment readiness | |
| diagnose.R | Full diagnostics report | --verbose |
| fix_unknown_sources.R | Fix Source:unknown packages | --dry-run, --help |
| regenerate_manifest.R | Regenerate manifest.json | |
| precommit_check.R | Git pre-commit hook validation | |
# Run from project root
Rscript $SKILL_DIR/scripts/<script>.R
Automatically validate deployment files before each commit:
# Replace this with your installed skill path
SKILL_DIR="/path/to/your-project/.cursor/skills/rsconnect"
cat > .git/hooks/pre-commit << EOF
#!/bin/bash
Rscript "$SKILL_DIR/scripts/precommit_check.R"
EOF
chmod +x .git/hooks/pre-commit
# PowerShell (Windows)
# Replace this with your installed skill path
$SkillDir = "C:\path\to\your-project\.cursor\skills\rsconnect"
@"
#!/usr/bin/env pwsh
& Rscript "$SkillDir/scripts/precommit_check.R"
exit $LASTEXITCODE
"@ | Set-Content .git/hooks/pre-commit
Note: Requires PowerShell 7+ (pwsh). If unavailable, run the bash snippet in Git Bash or WSL.
The hook checks:
Source: unknown packages in staged renv.lockrenv.lock is stagedrenv.lock is stagedTo bypass (not recommended): git commit --no-verify
renv::snapshot() # If dependencies changed
Rscript $SKILL_DIR/scripts/regenerate_manifest.R
git add renv.lock manifest.json
git commit -m "chore: update manifest"
git push
# 1. See what would change (safe)
Rscript $SKILL_DIR/scripts/fix_unknown_sources.R --dry-run
# 2. Apply fixes (creates backup)
Rscript $SKILL_DIR/scripts/fix_unknown_sources.R
# 3. Regenerate manifest
Rscript $SKILL_DIR/scripts/regenerate_manifest.R
# Option 1: Revert to previous commit
git revert HEAD
git push
# Option 2: Restore from backup (if fix_unknown_sources.R was run)
cp renv.lock.backup.YYYYMMDD_HHMMSS renv.lock
Rscript $SKILL_DIR/scripts/regenerate_manifest.R
git add -A && git commit -m "fix: rollback deployment"
git push
# Option 3: In Connect UI
# Go to Content → Your App → History → Activate previous bundle
cp renv.lock renv.lock.bakrenv::init() # Select option 2: re-initialize
See references/troubleshooting.md for detailed migration steps.
# 1. Check if ready to deploy
python $SKILL_DIR/scripts/pre_deploy_check_py.py
# 2. Fix any issues reported, then commit
git add manifest.json requirements.txt && git commit -m "chore: update manifest"
# 3. Push (Connect auto-deploys from Git)
git push
Before doing anything else, run the Python pre-deploy check:
python $SKILL_DIR/scripts/pre_deploy_check_py.py
This reports: Python version, uv/rsconnect status, pyproject.toml presence, manifest status, requirements.txt sync, and allow_uv setting. Use the output to inform your response.
| File | Purpose | When to Update |
|------|---------|----------------|
| requirements.txt | Records YOUR Python package versions | After uv add or uv remove |
| manifest.json | Tells Connect what to install | After changing requirements.txt or app files |
They can drift! Always update both together:
uv export --no-hashes -o requirements.txt # Update requirements.txt
rsconnect write-manifest <type> . # Update manifest.json
uv is a fast Python package manager. Key commands:
| Action | Command |
|--------|---------|
| Add a package | uv add <pkg> |
| Remove a package | uv remove <pkg> |
| Sync environment | uv sync |
| Export for Connect | uv export --no-hashes -o requirements.txt |
| Run a tool | uvx <tool> (e.g., uvx rsconnect-python) |
uv export requires pyproject.toml. If it's missing, regenerate_manifest_py.py can create a minimal one, but review it before committing.
allow_uv?As of Connect 2024.12.0, Connect can use uv pip instead of pip for faster Python package installs. Setting allow_uv: true in manifest.json's python.package_manager section opts in.
The regenerate_manifest_py.py script patches this automatically. Currently rsconnect-python CLI doesn't have a flag for it — the script patches manifest.json after generation.
| Script | Purpose | Flags |
|--------|---------|-------|
| pre_deploy_check_py.py | Validate Python deployment readiness | |
| diagnose_py.py | Full Python diagnostics report | --verbose, --help |
| regenerate_manifest_py.py | Regenerate manifest for Python apps | --type, --no-uv-export, --no-allow-uv |
# Run from project root
python $SKILL_DIR/scripts/<script>.py
The regenerate_manifest_py.py script auto-detects your framework:
It scans common entrypoints in the project root, src/, and importable package directories (plus pyproject entry points).
| Framework | Detected By | rsconnect Type |
|-----------|-------------|----------------|
| FastAPI | from fastapi import | fastapi |
| Flask | from flask import | api |
| Dash | from dash import | dash |
| Streamlit | import streamlit | streamlit |
| Bokeh | import bokeh | bokeh |
| Jupyter notebook | .ipynb files | notebook |
| Generic API | Default fallback | api |
Override with: python $SKILL_DIR/scripts/regenerate_manifest_py.py --type fastapi
uv export --no-hashes -o requirements.txt # If dependencies changed
python $SKILL_DIR/scripts/regenerate_manifest_py.py
git add requirements.txt manifest.json
git commit -m "chore: update manifest"
git push
# Auto-detect framework
python $SKILL_DIR/scripts/regenerate_manifest_py.py
# Specify framework explicitly
python $SKILL_DIR/scripts/regenerate_manifest_py.py --type fastapi
# Skip uv export (use existing requirements.txt)
python $SKILL_DIR/scripts/regenerate_manifest_py.py --no-uv-export
.python-version with exact major.minor.patch (e.g. 3.13.6, not 3.13)
— Posit Connect requires exact version pinninguv syncuv export --no-hashes -o requirements.txtpython $SKILL_DIR/scripts/regenerate_manifest_py.py# Option 1: Revert to previous commit
git revert HEAD
git push
# Option 2: In Connect UI
# Go to Content → Your App → History → Activate previous bundle
| Method | Language | Best For | Needs manifest.json? |
|--------|----------|----------|---------------------|
| Git-backed | R & Python | Teams, CI/CD, reproducibility | Yes |
| RStudio IDE | R | Quick one-off deploys | No (auto-generated) |
| R console | R | Scripted deploys | No |
| Jupyter | R & Python | Notebooks | No |
| CLI (rsconnect deploy) | R & Python | CI pipelines without Git integration | Yes |
How it works:
manifest.json locallyWhy it's the easiest for teams:
git pushgit revert)Requirements (R): rsconnect ≥ 0.8.15, manifest.json committed to repo Requirements (Python): rsconnect-python, manifest.json committed to repo
Note: Once Git-backed, stay Git-backed. You can't switch to push-button without recreating the content in Connect.
main (development)
│
└── deploy (Connect watches this branch)
Workflow (R):
git checkout deploy
git merge main
Rscript $SKILL_DIR/scripts/regenerate_manifest.R
git add manifest.json renv.lock
git commit -m "chore: update manifest for deploy"
git push origin deploy
Workflow (Python):
git checkout deploy
git merge main
python $SKILL_DIR/scripts/regenerate_manifest_py.py
git add manifest.json requirements.txt
git commit -m "chore: update manifest for deploy"
git push origin deploy
main (development)
├── staging (Connect staging server watches)
└── production (Connect prod server watches)
Each Connect server points to a different branch. Merge up through environments:
main → staging → production
Rscript $SKILL_DIR/scripts/pre_deploy_check.R.rscignore excludes dev artifactspython $SKILL_DIR/scripts/pre_deploy_check_py.pypyproject.toml exists (required for uv export)allow_uv: true in manifest (recommended).rscignore excludes dev artifacts (.venv/, __pycache__/, etc.)development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.