jhub-deploy
Use when a user asks Pi to build and deploy arbitrary web apps through JupyterHub named servers using direct Hub API calls (no nebari_app_* tools).
Skill by nebari-dev
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/nebari-dev-jhub-deploy
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/jhub-deploy
What's inside
- Skill name
jhub-deploy- Description
- Use when a user asks Pi to build and deploy arbitrary web apps through JupyterHub named servers using direct Hub API calls (no nebari_app_* tools).
- License
- Apache-2.0
- Instructions
- 434 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: contains an absolute path from the author's machine
Files (1)
- SKILL.md
SKILL.md (first lines)
# JHub Arbitrary Deploy Skill
Use this skill when the user wants agents to:
- build arbitrary frontend/backend apps,
- deploy them through JupyterHub,
- manage lifecycle (status/stop/delete) via Hub API directly,
- avoid framework-specific preference and avoid mandatory image push.
This skill piggybacks on **JupyterHub named servers**.
---
## 1) Preconditions
Resolve Hub API context from runtime:
```bash
API_URL="${NEBARI_HUB_API_URL:-${JUPYTERHUB_API_URL:-}}"
API_TOKEN="${NEBARI_HUB_API_TOKEN:-${JUPYTERHUB_API_TOKEN:-}}"
HUB_USER="${JUPYTERHUB_USER:-${NB_USER:-}}"
[ -n "$API_URL" ] || echo "Missing API_URL"
[ -n "$API_TOKEN" ] || echo "Missing API_TOKEN"
[ -n "$HUB_USER" ] || echo "Missing HUB_USER"
```
Validate token can read own user:
```bash
curl -fsS -H "Authorization: token $API_TOKEN" \
"$API_URL/users/$HUB_USER?include_stopped_servers=true" >/dev/null
```
If this fails, stop and report missing scopes/credentials.
### 1.1) Runtime dependency preflight (MUST run)
Before selecting command/image strategy, verify required runtime dependencies for the target app.
Examples:
- shell-out binaries (`pdftotext`, `ffmpeg`, etc.)
- language runtimes/toolchains
- expected package managers/build tools
If required binaries are missing in target image/runtime:
- either switch to image mode,
- or include bootstrap installation/fallback logic explicitly,
- or fail fast with clear remediation.
---
## 2) Deployment modes (default = no image push)
### A) **Source-on-home mode** (conditional, not assumed)
- Build/install app on user home/workspace (`/home/jovyan/...`)
- Spawn named server to run command from that path
- **No image push required**
**Critical rule:** use source-on-home mode only if shared storage between build context and target named server is confirmed.
### B) **Bootstrap-on-target mode** (safe default when storage is uncertain)
- Treat target named server as isolated storage
- Build/write artifacts inside target server startup flow
- Prefer Python bootstrap wrapper that prepares files then `exec`s runtime
### C) Image mode (optional)
- Use custom image when runtime deps cannot be satisfied in source/bootstrap modes
- Can use local cluster image import for local k3d/k3s
- Registry push is optional, only needed when cluster cannot access local image
Do not prefer framework-native templates. Treat all apps as arbitrary command-based runtimes.
### 2.1) Storage topology preflight (MUST run)
Before using source-on-home mode, verify whether target named server shares storage with where artifacts were built.
Minimum checks:
1. If target server already exists, inspect/compare PVC claim identity with current runtime server.
2. If target server does not exist yet, treat storage as **unknown** and do **not** assume shared home.
3. If unknown or different, require bootstrap-on-target or image mode.
Failure message should explicitly say source-on-home was rejected due to non-shared/unknown storage topology.
### 2.2) Image resolution preflight (MUST run when `profile_image` is empty)
`profile_image: ""` can resolve to a broken default image.
Required behavior:
1. Resolve a known-good image before spawn when `profile_image` is empty.
2. Resolution order:
- `JUPYTER_IMAGE_SPEC` from current runtime, else
- image from a currently ready server for same user, else
- explicit configured fallback image.
3. If spawn fails with pull errors (`ImagePullBackOff`/`ErrImagePull`), retry once with resolved known-good image.
---
## 3) App spawn contract
Assume deployment supports a command-based `user_options` contract for named servers.
Preferred payload shape:
```json
{
"profile": "<optional-profile>",
"app": {
"cwd": "/home/jovyan/apps/myapp",
"command": "<runtime command with {port} placeholder>",
"env": {"KEY": "VALUE"}
},
"profile_image": "<optional-image>"
}
```
If your Hub uses a different key shape, adapt payload to the deployment’s configured spawner hooks.
### 3.1) Default resilient command pattern (REQUIRED)
To avoid brittle spawn failures, default to this pattern:From nebari-dev/pi-coding-agent-pack, Apache-2.0.
Signals
- Stars
- 2
- Forks
- 0
- Open issues
- 1
- Last commit (this folder)
- Mar 21, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from nebari-dev
Cite this page
jhub-deploy skill. Agent Mart. https://agentmart.dev/skills/nebari-dev-jhub-deploy (last updated 2026-10-24)