Non-negotiable rules:
- Verify
lokei availability before relying on it.
- Do not auto-run one-time setup or uninstall flows without approval.
- Resolve whether the user wants local-only HTTPS, a public tunnel, or multi-service orchestration.
- Prefer the simplest command that matches the job.
- Report the resulting URLs and diagnostic blockers clearly.
lokei
Inputs
$request: The local HTTPS, share, Docker, service, or diagnostics task
Goal
Use lokei to:
- run a local project behind a named HTTPS
.test domain
- expose a local service through a tunnel when requested
- orchestrate Docker or multi-service local environments
- diagnose and explain local proxy/setup problems
Step 0: Verify installation and setup health
Check:
lokei --version
lokei doctor
If lokei is missing, tell the user:
lokei is not installed. Install with:
npm i -g lokei && lokei setup
lokei setup runs once -- generates a local CA, trusts it in the OS keychain, configures DNS for .test, and sets up port forwarding.
Do not install or run setup automatically. Wait for user confirmation.
If setup is unhealthy:
- explain the failing component
- common fixes: CA not trusted or DNS resolver missing -> re-run
lokei setup
- ask before suggesting or running one-time setup actions
Success criteria: lokei is available and its setup state is understood.
Step 1: Resolve the requested mode
Determine whether the user wants:
lokei run for one local app
lokei share or lokei run --expose for public access
lokei docker up for Docker Compose
lokei up for .test.yaml orchestration
lokei routes ls, inspect, or logs for diagnosis
Also resolve whether the project name, command, or port needs to be overridden.
Success criteria: The correct lokei mode is chosen before execution.
Step 2: Run the smallest correct command
Prefer:
lokei run for normal local development
lokei share --port <port> for ad-hoc sharing
lokei run --expose when the same session needs local HTTPS and a public tunnel
lokei docker up or lokei up only when the project structure actually calls for them
Avoid service-install and uninstall flows unless the user explicitly asked for those operations.
Success criteria: The executed command matches the requested workflow without overreaching.
Step 3: Report URLs and health clearly
After execution, report:
- local
.test URL
- public tunnel URL if one was created
- project name and route details if relevant
- any doctor/setup blockers if the command failed
Success criteria: The user knows exactly where the app is reachable and what failed if it is not.
Guardrails
- Do not auto-run
lokei setup, service install, or uninstall without approval.
- Do not guess that the user wants a public tunnel when local-only HTTPS is enough.
- Do not hide diagnostics behind generic "setup failed" summaries.
- Do not add
disable-model-invocation; this is a normal environment workflow skill.
When To Load References
references/command-reference.md
Use for the full command catalog, framework detection table, architecture details, .test.yaml examples, git worktree behavior, and scenario quick reference.
Output Contract
Report:
- mode chosen
- command run
- resulting local or public URLs
- any detected setup or networking blocker
- next action if user approval is required
1---
2name: lokei
3version: 2.0.0
4description: |
5 Put local dev surfaces behind trusted HTTPS `.test` domains — real certs and DNS, not
6 localhost:port — with the `lokei` CLI: framework-aware `run`, public tunnels via `share`/`--expose`,
7 `docker up` and `.test.yaml` multi-service orchestration, and `doctor`/`routes`/`logs` diagnostics,
8 backed by a one-time setup that mints and trusts a local CA and wires `.test` DNS and port
9 forwarding. Never auto-runs setup, service-install, or uninstall — those wait for approval. Use for
10 local HTTPS, named domains, tunnel sharing, or lokei diagnosis.
11allowed-tools:
12 - AskUserQuestion
13 - Bash
14 - Read
15argument-hint: "[run, share, docker, diagnose, or tunnel request]"
16arguments:
17 - request
18when_to_use: |
19 Use when the user wants to run a project on a `.test` domain, set up local HTTPS, expose localhost
20 publicly, or debug lokei. Examples: "run my dev server with HTTPS", "give this app a .test domain",
21 "share localhost", "why is lokei broken?". Do NOT presume a public tunnel when local-only HTTPS is
22 enough, and do NOT auto-run the one-time setup or uninstall flows — confirm the mode first, then run
23 the smallest command that matches.
24effort: high
25metadata:
26 source: https://skillmd.com/skills/ulpi-io/lokei
27---
28
29<EXTREMELY-IMPORTANT>
30`lokei` affects the local networking environment and can trigger setup flows.
31
32Non-negotiable rules:
331. Verify `lokei` availability before relying on it.
342. Do not auto-run one-time setup or uninstall flows without approval.
353. Resolve whether the user wants local-only HTTPS, a public tunnel, or multi-service orchestration.
364. Prefer the simplest command that matches the job.
375. Report the resulting URLs and diagnostic blockers clearly.
38</EXTREMELY-IMPORTANT>
39
40# lokei
41
42## Inputs
43
44- `$request`: The local HTTPS, share, Docker, service, or diagnostics task
45
46## Goal
47
48Use `lokei` to:
49
50- run a local project behind a named HTTPS `.test` domain
51- expose a local service through a tunnel when requested
52- orchestrate Docker or multi-service local environments
53- diagnose and explain local proxy/setup problems
54
55## Step 0: Verify installation and setup health
56
57Check:
58
59- `lokei --version`
60- `lokei doctor`
61
62If `lokei` is missing, tell the user:
63
64> `lokei` is not installed. Install with:
65> ```bash
66> npm i -g lokei && lokei setup
67> ```
68> `lokei setup` runs once -- generates a local CA, trusts it in the OS keychain, configures DNS for `.test`, and sets up port forwarding.
69
70Do not install or run setup automatically. Wait for user confirmation.
71
72If setup is unhealthy:
73
74- explain the failing component
75- common fixes: CA not trusted or DNS resolver missing -> re-run `lokei setup`
76- ask before suggesting or running one-time setup actions
77
78**Success criteria**: `lokei` is available and its setup state is understood.
79
80## Step 1: Resolve the requested mode
81
82Determine whether the user wants:
83
84- `lokei run` for one local app
85- `lokei share` or `lokei run --expose` for public access
86- `lokei docker up` for Docker Compose
87- `lokei up` for `.test.yaml` orchestration
88- `lokei routes ls`, `inspect`, or `logs` for diagnosis
89
90Also resolve whether the project name, command, or port needs to be overridden.
91
92**Success criteria**: The correct lokei mode is chosen before execution.
93
94## Step 2: Run the smallest correct command
95
96Prefer:
97
98- `lokei run` for normal local development
99- `lokei share --port <port>` for ad-hoc sharing
100- `lokei run --expose` when the same session needs local HTTPS and a public tunnel
101- `lokei docker up` or `lokei up` only when the project structure actually calls for them
102
103Avoid service-install and uninstall flows unless the user explicitly asked for those operations.
104
105**Success criteria**: The executed command matches the requested workflow without overreaching.
106
107## Step 3: Report URLs and health clearly
108
109After execution, report:
110
111- local `.test` URL
112- public tunnel URL if one was created
113- project name and route details if relevant
114- any doctor/setup blockers if the command failed
115
116**Success criteria**: The user knows exactly where the app is reachable and what failed if it is not.
117
118## Guardrails
119
120- Do not auto-run `lokei setup`, `service install`, or `uninstall` without approval.
121- Do not guess that the user wants a public tunnel when local-only HTTPS is enough.
122- Do not hide diagnostics behind generic "setup failed" summaries.
123- Do not add `disable-model-invocation`; this is a normal environment workflow skill.
124
125## When To Load References
126
127- `references/command-reference.md`
128 Use for the full command catalog, framework detection table, architecture details, `.test.yaml` examples, git worktree behavior, and scenario quick reference.
129
130## Output Contract
131
132Report:
133
1341. mode chosen
1352. command run
1363. resulting local or public URLs
1374. any detected setup or networking blocker
1385. next action if user approval is required