skills/portless/SKILL.md
Portless development server proxy that eliminates port conflicts by routing through localhost subdomains. Use when setting up development servers, managing multiple apps, avoiding port conflicts, or working with monorepos and turborepo projects.
npx skillsauth add long36708/longmo-skills portlessInstall 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.
Portless is a development server proxy that eliminates port conflicts by routing requests through localhost subdomains (e.g., https://myapp.localhost). It automatically manages ports, TLS certificates, and host file entries.
Run portless in your project directory:
portless # runs "dev" script from package.json, accessible at https://<project>.localhost
Portless automatically:
package.json, git root, or directory name/etc/hosts for local domain resolutionCreate portless.json to override defaults:
{
"name": "myapp",
"script": "dev",
"appPort": 3000,
"proxy": true
}
Fields:
| Field | Type | Default | Description |
|-------|------|---------|-------------|
| name | string | inferred | Base app name (worktree prefix still applies) |
| script | string | "dev" | Name of package.json script to run |
| appPort | number | auto | Fixed port for the child process |
| proxy | boolean | auto | Route through proxy; set false for non-server scripts |
| apps | object | - | Overrides for workspace packages (monorepo) |
| turbo | boolean | true | Set false to use direct spawning instead of turborepo |
Add configuration directly to package.json:
{
"name": "@myorg/web",
"portless": "myapp"
}
Or with full options:
{
"name": "@myorg/web",
"portless": {
"name": "myapp",
"script": "dev:app"
}
}
Precedence: CLI flags > package.json "portless" key > portless.json app entry > defaults
Place one portless.json at repo root to cover all workspace packages:
{
"apps": {
"apps/web": { "name": "myapp" },
"apps/api": { "name": "api.myapp" }
}
}
portless # from repo root: start all packages with "dev" script
cd apps/web && portless # start just one package
portless --script start # run "start" instead of "dev"
Without apps map, hostnames follow <package>.<project>.localhost convention. Project name comes from npm scope (e.g., @myorg/web → myorg).
For turborepo projects, use portless as the dev script:
{
"scripts": {
"dev": "portless",
"dev:app": "next dev"
},
"portless": {
"name": "myapp",
"script": "dev:app"
}
}
Running pnpm dev at root executes turbo, which runs portless in each package. No turbo.json changes needed.
| Variable | Description | Default |
|----------|-------------|---------|
| PORTLESS_PORT | Proxy port | 443 (HTTPS) / 80 (HTTP) |
| PORTLESS_HTTPS | Set to 0 to disable HTTPS | on |
| PORTLESS_LAN | Set to 1 to enable LAN mode (mDNS .local) | off |
| PORTLESS_TLD | Custom TLD instead of .localhost (e.g., test) | localhost |
| PORTLESS_APP_PORT | Fixed app port (skip auto-assignment) | random 4000-4999 |
| PORTLESS_SYNC_HOSTS | Set to 0 to disable /etc/hosts auto-sync | on |
| PORTLESS_STATE_DIR | Override state directory | ~/.portless |
| PORTLESS | Set to 0 to bypass proxy | enabled |
Portless stores state in ~/.portless (override with PORTLESS_STATE_DIR):
| File | Purpose |
|------|---------|
| routes.json | Maps hostnames to ports |
| routes.lock | Prevents concurrent writes |
| proxy.pid | PID of running proxy |
| proxy.port | Port proxy is listening on |
| proxy.log | Proxy daemon log output |
| proxy.lan | LAN mode and last known IP |
Apps get random ports in 4000-4999 range. Portless sets PORT and HOST environment variables before running your command.
For frameworks that ignore PORT (Vite, Astro, React Router, Angular, Expo, React Native), portless auto-injects the correct --port and --host flags.
# Basic usage
portless
# Custom name
portless --name myapp
# Different script
portless --script start
# Fixed port
portless --app-port 3000
# Disable HTTPS
portless --no-tls
# Start all apps from monorepo root
portless
# Start specific app
cd apps/web && portless
# Override script for all apps
portless --script dev:custom
Enable LAN mode for mobile device testing:
PORTLESS_LAN=1 portless
# Access via https://myapp.local on other devices
If port 443 or 80 is in use:
PORTLESS_PORT=8443 portless # Use custom proxy port
If domains don't resolve:
# Check state directory
cat ~/.portless/routes.json
# Disable auto-sync if needed
PORTLESS_SYNC_HOSTS=0 portless
For frameworks that don't respect PORT env var, portless auto-injects flags. If issues persist, check framework documentation for custom port configuration.
<!-- Source references: - https://github.com/antfu/portless -->由于 OpenSSL 官方不直接提供 Windows 的安装程序,我们需要从被广泛认可且维护及时的第三方站点下载预编译好的二进制安装包。
Win64 OpenSSL v3.x.x Light 版本(例如 Win64 OpenSSL v3.3.2 Light)。"Light" 版只包含核心运行库和命令行工具,体积小巧,完全能满足 VuePress 等工具的调用需求。Full 版本,它包含了开发所需的头文件和静态库。Win64 OpenSSL v1.1.1w Light,这是 1.1.1 系列最稳定的终版。双击下载好的 .exe 安装包(建议右键选择“以管理员身份运行”),在安装向导中注意以下几个关键点:
C:\Program Files\OpenSSL-Win64),千万不要安装在包含中文或空格的目录下,否则极易引发调用错误。Copy OpenSSL DLLs to(将 OpenSSL 动态链接库复制到哪个目录)。强烈建议选择 The Windows system directory(Windows 系统目录)。这样可以直接避免后续出现“无法定位 DLL”或 spawnSync 找不到依赖的报错。虽然安装程序通常会尝试自动配置,但为了确保万无一失(特别是解决 ENOENT 找不到命令的报错),建议手动确认一下:
Win + R 键,输入 sysdm.cpl 打开系统属性。Path,双击打开。bin 目录路径(例如 C:\Program Files\OpenSSL-Win64\bin)。openssl version
如果终端成功打印出类似 OpenSSL 3.x.x ... 的版本信息,说明 OpenSSL 已经手动安装并配置成功。此时,再次去运行项目,spawnSync openssl ENOENT 的报错应该就会彻底消失了。
documentation
Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.
content-media
Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
development
MSW (Mock Service Worker) v2 最佳实践、模式和API指南,用于 JavaScript/TypeScript测试和开发中的API模拟。涵盖处理器 设计、服务器设置、响应构造、测试模式、GraphQL和 v1到v2迁移。基准版本:msw ^2.0.0。 触发条件:msw导入,http.get,http.post,HttpResponse,setupServer, setupWorker,graphql.query,提及"msw"、"mock service worker"、 "api mocking"或"msw v2"。
tools
Mise (formerly rtx) polyglot tool version manager, environment variable manager, and task runner. Covers tool version management (install, use, pin across Node/Python/Rust/Go/Java and more), mise.toml task definitions (scripts, dependencies, watch mode, incremental builds), environment variable management (.env integration, per-directory env, redaction), project-level tool pinning, backend system (asdf, npm, pipx, cargo, GitHub releases), and comparison with alternatives (asdf, nvm, pyenv, Makefiles). Use when configuring development tool versions, defining project tasks in mise.toml, managing per-project environment variables, setting up polyglot dev environments, migrating from asdf or nvm, or automating build/test/lint/deploy workflows with mise run.