kramme-cc-workflow/skills/kramme:nx:setup-portless/SKILL.md
Set up portless in an Nx workspace with dev:local/dev:full targets. Use when adding portless to an Nx project or wiring up Nx targets for local HTTPS development.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:nx:setup-portlessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
4 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Wire portless into an Nx workspace so apps get stable https://<name>.localhost URLs via Nx targets. The proxy auto-starts when you launch an app, and Nx targets give you a repeatable place to trust the CA, run apps, and fall back to manual proxy control when a task runner needs it.
Experimental: This skill is early and may change as we refine the Nx + portless workflow.
Examples below invoke Nx as
nx …. If Nx isn't on your PATH, prefix with your package manager's runner:yarn nx,pnpm nx, ornpx nx.
dev:local / dev:full targets for an Nx projectNot for: non-Nx projects, or production/public TLS — portless is a local development proxy only.
What this touches: installs portless as a dev dependency, edits one or more project.json files, and (via proxy:trust) installs a locally-trusted root CA into your machine's trust store.
Platform: macOS and Linux. Steps rely on sudo, $HOME, port 443, and .localhost resolution; Windows is not covered.
portless <app-name> <dev-command> starts an app, assigns it a port, and registers it with the proxy.portless run <dev-command> does the same thing, but infers the app name from package.json.https://<name>.localhost to the correct dev server.PORT env var. Frameworks that ignore it receive matching --port and --host flags automatically.proxy:start target and then launch the app.# Using the workspace package manager
yarn add -D portless
# or: npm install -D portless / pnpm add -D portless
Add this target to one project's project.json (typically the primary app). It only needs to exist once in the workspace.
// packages/<app>/project.json
{
"targets": {
"proxy:trust": {
"command": "sudo portless trust",
"options": { "cwd": "packages/<app>" },
},
},
}
nx run <app>:proxy:trust
This installs a locally-trusted root CA (similar to mkcert) so browsers accept https://*.localhost. It affects the whole machine — run it only on trusted dev machines.
Re-running is safe: skip any target that already exists in
project.jsoninstead of duplicating it, and skip the dependency install andproxy:trustwhen the workspace already has portless.
dev:local target// packages/<app>/project.json
{
"targets": {
"dev:local": {
"command": "portless <app-name> <dev-command>",
"options": { "cwd": "packages/<app>" },
},
},
}
Replace:
<app-name> — the subdomain name (e.g., my-app → https://my-app.localhost)<dev-command> — the framework dev command (e.g., next dev, vite dev, ng serve)Portless auto-detects common frameworks and injects the correct --port/--host flags automatically.
Example for Next.js:
"dev:local": {
"command": "portless keep-calm-and-quiz-on next dev",
"options": { "cwd": "packages/app" }
}
Alternatively, use portless run to infer the app name from package.json:
"dev:local": {
"command": "portless run next dev",
"options": { "cwd": "packages/app" }
}
dev:full target (optional)If the app has companion services (e.g., a Convex backend), create a composite target. -t lists the targets to run across the projects selected by -p:
"dev:full": {
"command": "nx run-many -t dev:local convex-dev -p <app> --parallel=2"
}
Adjust the targets, projects, and parallelism for the services the app needs.
The proxy auto-starts when you launch an app — no manual proxy start needed.
# Start the app
nx run <app>:dev:local
# or with all services:
nx run <app>:dev:full
# Open https://<app-name>.localhost
Multiple apps run simultaneously through the same proxy:
# Terminal 1
nx run app-one:dev:local # → https://app-one.localhost
# Terminal 2
nx run app-two:dev:local # → https://app-two.localhost
my-cool-app → https://my-cool-app.localhostportless api.my-app next dev → https://api.my-app.localhostrun, get, alias, hosts, list, trust, clean, proxy — use portless run or portless --name <name> insteadIf you need explicit proxy control (e.g., task runners that don't support auto-start, or custom port/TLD/LAN settings), add these targets:
// packages/<app>/project.json
{
"targets": {
"proxy:start": {
"command": "sudo PORTLESS_STATE_DIR=$HOME/.portless portless proxy start",
"options": { "cwd": "packages/<app>" },
},
"proxy:stop": {
"command": "sudo PORTLESS_STATE_DIR=$HOME/.portless portless proxy stop",
"options": { "cwd": "packages/<app>" },
},
},
}
Why PORTLESS_STATE_DIR? — Under sudo, the home directory changes to /root. This env var ensures the proxy daemon writes state to the user's home directory so proxy:stop can find and stop it later.
Common proxy:start additions:
--lan to advertise .local hostnames on your LAN--tld test to use .test instead of .localhost--wildcard to let unregistered subdomains fall back to a parent app-p 8080 to avoid privileged ports and sudoUseful env vars when you need them:
PORTLESS_PORT to override the proxy portPORTLESS_HTTPS=0 to disable TLS (local non-HTTPS use only — drops the trusted-cert setup)PORTLESS_LAN=1 to default to LAN modePORTLESS_TLD=test to change the TLDPORTLESS_STATE_DIR to override the proxy state directory| Problem | Fix |
| --- | --- |
| portless exits because there is no TTY or it cannot prompt for elevation | Pre-start the proxy with nx run <app>:proxy:start, then launch dev:local |
| Permission error on port 443 | Keep sudo, or run the proxy on an unprivileged port such as -p 8080 |
| Browser shows a certificate warning | Run nx run <app>:proxy:trust again |
| Safari cannot resolve the local hostname | Run portless hosts sync to add host entries |
development
Compare an existing PR's title and body against the actual branch diff and report drift — false claims, missing major changes, stale scope, missing risk callouts. Use after pushing changes to a branch with an open PR, or before requesting review. Read-only by default; add --fix to delegate to kramme:pr:generate-description for an updated description. Complements kramme:pr:code-review (which checks description accuracy as one signal among many code-quality checks) by being a fast, focused, single-purpose check that runs in seconds.
tools
Reviews plugin skills for focused scope, progressive disclosure, portability, safety, retry behavior, and documentation quality. Use when auditing a SKILL.md, skill directory, or proposed skill text against skill-authoring standards. Not for creating new skills, editing skills, or reviewing ordinary application code.
tools
Reviews recent agent session transcripts to find repeated manual workflows or repeated user asks, then proposes and optionally scaffolds only useful new skills or custom subagents. Use when the user asks to inspect recent sessions, find automation opportunities, or create reusable workflows from repeated work. Not for summarizing one session, general retrospectives, or codebase refactoring.
data-ai
Remove all DONE issues and renumber remaining issues within each prefix group. Not for editing live issue content, archiving still-open issues, or moving issues between prefix groups.