Skills

Deploy To Connect

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python...

Install

npx skills add posit-dev/skills --skill deploy-to-connect -g -a claude-code -y
Repository
posit-dev/skills551
Category
DevOps
Updated
7d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Deploy or publish Python and R content to a Posit Connect server using rsconnect-python or the R rsconnect package. Handles interactive apps and dashboards, web APIs, rendered documents, and prepared bundles/manifests. Use whenever the user asks to deploy, publish, or redeploy content to Posit Connect, or mentions rsconnect. Consult this skill instead of guessing flags or commands.

<!-- Maintainer note: edit this skill in posit-dev/connect only. Downstream copies are overwritten by the sync workflow. -->

Deploying to Posit Connect

This guide covers Python, R, and static content on a Connect server. A registered Connect Model Context Protocol (MCP) server can also provide publishing tools.

Choose the deployment route that matches the content and available tools:

  • Python, posit-cli, which provides the posit CLI and is published on PyPI. Its posit connect commands wrap rsconnect-python.
  • R, the R rsconnect package, pointed at a Connect server.
  • A registered Connect MCP server, use its publishing tools when they support the content.

If the user asks a question ("how do I…", "what is the command…") rather than asking for a deploy, answer from this guide and stop.

At the end, report which server you deployed to, which content type you picked, any tool you installed, and any assumption you made.


Stage 1, Detect the content

Infer the language and framework from the files in the project directory. Common signals:

Signal in project dirLikely content
app.pyPython web app, Shiny for Python, Streamlit, Dash, Gradio, Panel, or Bokeh
app.R, or ui.R + server.RShiny for R
plumber.R / entrypoint.R containing plumb()Plumber API (R)
*.qmdQuarto document
*.RmdR Markdown
*.ipynbJupyter notebook / Voila
index.html, or a directory containing HTML, CSS, JavaScript, or image filesStatic HTML site
manifest.jsonPrebuilt bundle, deploy it directly, no framework guess needed
A bare .py or .R, no framework import, no ui.R/server.R/plumber.R/entrypoint.R alongsideScript, a batch/ETL job that Quarto renders and Connect can schedule

Confirm the guess

Read the whole SKILL.md on GitHub

More in DevOps