plain-portal

Open a remote Python shell on a production machine via encrypted tunnel. Use when you need to inspect production data, debug issues, run queries, or transfer files.

654 stars

Best use case

plain-portal is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Open a remote Python shell on a production machine via encrypted tunnel. Use when you need to inspect production data, debug issues, run queries, or transfer files.

Teams using plain-portal should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/plain-portal/SKILL.md --create-dirs "https://raw.githubusercontent.com/dropseed/plain/main/.claude/skills/plain-portal/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/plain-portal/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How plain-portal Compares

Feature / Agentplain-portalStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Open a remote Python shell on a production machine via encrypted tunnel. Use when you need to inspect production data, debug issues, run queries, or transfer files.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Remote Portal Session

Open an encrypted tunnel to a remote machine and run Python code on it.

## 1. Start the remote side and connect

The remote side must be running first. Either start it yourself (if you have access to the platform CLI) or ask the user to start it:

| Platform   | Command                                             |
| ---------- | --------------------------------------------------- |
| Heroku     | `heroku run plain portal start`                     |
| Fly.io     | `fly ssh console -C "plain portal start"`           |
| Kubernetes | `kubectl exec -it deploy/app -- plain portal start` |
| Docker     | `docker exec -it container plain portal start`      |
| SSH        | `ssh server plain portal start`                     |

**Both `start` and `connect` are long-running foreground processes.** If you run `start` yourself, use `run_in_background` so you don't block. Once it prints a portal code (e.g. `7-crossword-pineapple`), read the code from the output. If the user ran it, ask them for the code.

Then connect (also use `run_in_background`):

```
uv run plain portal connect <code>
```

## 2. Run commands

Execute Python code on the remote machine:

```
uv run plain portal exec "<code>"
```

Output streams line by line in real time. The last expression's value is returned (like a REPL).

For long-running commands, increase the timeout (default 120s):

```
uv run plain portal exec --timeout 300 "<code>"
```

For machine-readable output:

```
uv run plain portal exec --json "<expression>"
```

### File transfer

```
uv run plain portal pull <remote_path> <local_path>
uv run plain portal push <local_path> <remote_path>
```

Push is restricted to `/tmp/` on the remote machine.

## 3. Disconnect

Kill the `connect` process to end the session. This also frees the remote process.

## Important

- Sessions are **read-only** by default. Database writes will fail unless the remote was started with `--writable --yes`.
- Each `exec` gets a **fresh namespace**. Variables don't carry between commands. Put setup and queries in one code block if they depend on each other.
- Use `plain portal exec` for quick queries. For heavy data export, write to `/tmp/` on the remote and `pull` the file.
- If the session drops, the remote side must be restarted and a new code used to reconnect.

Related Skills

plainx-release

654
from dropseed/plain

Releases plainx packages with version suggestions, changelog generation, and git tagging. Use when releasing a package to PyPI.

plain-upgrade

654
from dropseed/plain

Upgrades Plain packages and applies required migration changes. Use when updating to newer package versions.

plain-postgres-doctor

654
from dropseed/plain

Check overall database health — schema correctness and operational health. Use when asked to check the database, validate schema, optimize indexes, or diagnose Postgres problems.

plain-optimize

654
from dropseed/plain

Captures and analyzes performance traces to identify slow queries and N+1 problems. Use when a page is slow, there are too many queries, or the user asks about performance.

plain-install

654
from dropseed/plain

Installs Plain packages and guides through setup steps. Use when adding new packages to a project.

plain-guide

654
from dropseed/plain

Answer questions about the Plain framework by researching docs and source code. Use when asked "how do I...", "does Plain support...", or "how does X work?" questions.

plain-bug

654
from dropseed/plain

Submit a bug report for the Plain framework. Use when the user wants to report a bug, error, or unexpected behavior. Collects context and creates a GitHub issue.

release

654
from dropseed/plain

Releases Plain packages with intelligent version suggestions and parallel release notes generation. Use when releasing packages to PyPI.

future

654
from dropseed/plain

Navigate and manage the future/ directory — view dependency graphs, filter by arc, find unblocked futures, and identify what to work on next. Use when deciding what to work on, exploring planned work, or checking dependencies between futures.

explainer

3891
from openclaw/skills

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Content & Documentation

convert-plaintext-to-md

28865
from github/awesome-copilot

Convert a text-based document to markdown following instructions from prompt, or if a documented option is passed, follow the instructions for that option.

visual-explainer

3891
from openclaw/skills

Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.