test-t3-app
Skill4 starsChanged 4 months agoMITView on GitHub
Launch, retain, and test the T3 Code web app in isolated development environments, including first-try browser authentication with one-time pairing URLs, pairing-token recovery, worktree-safe state directories, cross-turn dev server lifecycle, and direct SQLite inspection or fixture seeding. Use when an agent needs to run T3 locally, iteratively test UI behavior with a human, recover from an expired or consumed pairing token, isolate dev state, or prepare test data in state.sqlite.
6 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- AIBeginnerX/oh-our-pi-desktoptheir own version, first seen Oct 25, 2026
- 0xSero/vllm-studiotheir own version, first seen Oct 17, 2026
- pingdotgg/t3codetheir own version, first seen Oct 8, 2026
- gannonh/kata-codeedited, first seen Oct 6, 2026
- btsouth/toolport-studioedited, first seen Jul 28, 2026
- tsouth89/toolport-studioedited, first seen Jul 28, 2026
Other versions6 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- btsouth/toolport-studio★ 497% same
- tsouth89/toolport-studio★ 497% same
- gannonh/kata-code★ 183% same
Wrote their own version · 3
- pingdotgg/t3code★ 61ksame name
- 0xSero/vllm-studio★ 1.8ksame name
- AIBeginnerX/oh-our-pi-desktop★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/cursor-cloud.mdcCursor rule
- ios-debugger-agentSkill
- ios-simulator-browserSkill
- test-t3-mobileSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 0 are common, 18 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 6 edited versions we read keep these.
18
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill for the web client.
- Distinctive: line 12
Run commands from the repository root.
- Very specific: line 14
Use the repository's ignored .t3 directory for reusable worktree-local state.
- Very specific: line 15
Use mktemp -d /tmp/t3code-test.XXXXXX for disposable state and retain the printed absolute path.
- Very specific: line 16
Start the full web stack with vp run dev.
- Distinctive: line 17
Keep the terminal session alive and read the selected server port, web port, base directory, and pairing URL from its output.
- Very specific: line 19
Treat a base directory as disposable only when it was created or deliberately selected for the current test.
- Distinctive: line 33
Do not open the other person's complete pairing URL during this reachability check.
- Distinctive: line 37
Treat the overall testing or implementation loop—not an assistant turn or one verification pass—as the environment lifecycle boundary.
- Distinctive: line 39
Keep the dev process, base directory, selected ports, authenticated browser tab, registered projects, and seeded fixtures alive while the …
- Distinctive: line 40
Do not stop the server merely because one verification pass completed or because you are yielding a response to the user.
- Distinctive: line 41
Before starting another environment, check whether the existing process and browser tab still serve the task.
- Very specific: line 47
Wait for the server log that says authentication is required and includes a URL ending in /pair#token=....
- Distinctive: line 48
Use the controlled in-app browser or browser-automation surface available to the agent.
- Distinctive: line 50
Wait for the pairing exchange and redirect to finish before navigating elsewhere.
- Distinctive: line 53
Treat pairing URLs as secrets.
- Distinctive: line 57
Create another token against the same database and web URL as the running dev server:
- Very specific: line 68
Use the Pair URL from this command once.
- Distinctive: line 74
Read references/sqlite-fixtures.md before changing the database.
- Very specific: line 76
Use node apps/server/scripts/t3-sqlite-state.ts query for schema discovery and read-only checks.
- Very specific: line 77
Stop the dev server before using node apps/server/scripts/t3-sqlite-state.ts exec, then restart it with the same base directory.
- Very specific: line 79
Use the auth CLI, not direct auth_* table edits, for pairing and sessions.
- Distinctive: line 87
When teardown is appropriate:
- Distinctive: line 89
Stop the dev process with its terminal interrupt.
- Distinctive: line 93
If completion is uncertain, keep the environment alive and mention that it is retained for further iteration.
- Distinctive: line 97
If the browser shows an unauthenticated pairing screen, issue a new token instead of retrying the consumed URL.
- Very specific: line 98
If the pairing URL is no longer visible, create a replacement token with both --dev-url and --base-url.
- Distinctive: line 99
If the replacement token is rejected, verify that the CLI and server use the identical absolute base directory and web URL.
- Distinctive: line 100
If the UI shows unexpected data, verify that every command uses the identical explicit base directory before editing anything.
- Very specific: line 101
If ports move because another instance is running, trust the current dev-runner output rather than assuming ports 13773 and 5733.
“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Test T3 App
Use this skill for the web client. For iOS Simulator, Android Emulator, or physical-device testing against an isolated T3 backend, use the sibling test-t3-mobile skill.
Start an isolated web environment
- Run commands from the repository root.
- Choose a base directory that belongs only to the current worktree or test:
- Use the repository's ignored
.t3directory for reusable worktree-local state. - Use
mktemp -d /tmp/t3code-test.XXXXXXfor disposable state and retain the printed absolute path.
- Use the repository's ignored
- Start the full web stack with
vp run dev. Add--sharewhen the user needs to open it from another tailnet device. In a linked worktree it defaults to that worktree's gitignored.t3; pass--home-dir <base-dir>only when the test needs a different isolated directory. - Keep the terminal session alive and read the selected server port, web port, base directory, and pairing URL from its output.
Treat a base directory as disposable only when it was created or deliberately selected for the current test. Never delete or directly seed the shared ~/.t3 directory. Prefer starting with a new temporary base directory over clearing state of uncertain ownership.
The worktree-local default deliberately outranks an ambient T3CODE_HOME; do not pass the shared home through to a worktree dev server.
Ports are derived from the worktree path but can shift when occupied. Always read the actual values from the [dev-runner] line.
Shared browser dev is single-origin: Vite proxies the backend paths, so never set VITE_HTTP_URL or VITE_WS_URL for dev/dev:web.
The dev runner disables browser auto-open by default. Do not pass --browser during automated testing: an automatically opened page can consume the one-time bootstrap token before the controlled browser uses it.
Verify a shared environment before human handoff
When another person will use the printed pairing URL, first open the shared origin without the pairing path or fragment in the controlled browser and confirm the T3 Code app loads. This browser navigation is required even when curl succeeds because browsers block some otherwise reachable ports before making a network request.
Do not open the other person's complete pairing URL during this reachability check; doing so consumes its one-time token. If the agent also needs an authenticated browser, create and consume a separate pairing token, then leave a fresh token for the other person.
Preserve the environment while iterating
Treat the overall testing or implementation loop—not an assistant turn or one verification pass—as the environment lifecycle boundary.
- Keep the dev process, base directory, selected ports, authenticated browser tab, registered projects, and seeded fixtures alive while the user may inspect the result or request follow-up changes.
- Do not stop the server merely because one verification pass completed or because you are yielding a response to the user.
- Before starting another environment, check whether the existing process and browser tab still serve the task. Reuse them when healthy instead of discarding useful state.
- On a later turn, verify that the existing process is alive and reuse its printed ports and base directory. If it exited, restart with the same base directory; create a new pairing token only when the browser session is no longer valid.
- Tell the user when a test environment remains available, including its non-secret web URL when useful. Never include a pairing token.
Authenticate the browser on the first navigation
- Wait for the server log that says authentication is required and includes a URL ending in
/pair#token=.... - Use the controlled in-app browser or browser-automation surface available to the agent. Do not use a system-browser launch command during automated testing.
- Open that complete URL exactly once as the controlled browser's first navigation. Preserve the fragment and token verbatim.
- Wait for the pairing exchange and redirect to finish before navigating elsewhere.
- Continue in the same browser context so its stored bearer session remains available.
Treat pairing URLs as secrets. Do not copy them into final responses, screenshots, committed files, or durable logs. A pairing token is short-lived and single-use; opening the URL in another browser or opening it twice can consume it.
Recover a consumed or expired pairing token
Create another token against the same database and web URL as the running dev server:
T3CODE_PORT=<server-port> node apps/server/src/bin.ts auth pairing create \
--base-dir <base-dir> \
--dev-url <web-url> \
--base-url <web-url> \
--ttl 15m \
--label agent-ui-testUse the Pair URL from this command once. Derive <server-port> and <web-url> from the current dev-runner output, including any automatically selected port offset. Setting T3CODE_PORT keeps the administrative CLI from probing for an unrelated free port.
Always pass --dev-url for a dev-runner environment so the generated pairing URL uses the current web origin. An explicit base directory stores runtime state in <base-dir>/userdata; the <base-dir>/dev fallback is only used by an implicit dev home. A worktree-local .t3 counts as explicit, so its state lives in <worktree>/.t3/userdata. Use auth pairing list to inspect active token metadata; it intentionally cannot reveal token secrets.
Inspect or seed SQLite state
Read references/sqlite-fixtures.md before changing the database.
- Use
node apps/server/scripts/t3-sqlite-state.ts queryfor schema discovery and read-only checks. - Stop the dev server before using
node apps/server/scripts/t3-sqlite-state.ts exec, then restart it with the same base directory. - Seed projection tables only for disposable UI fixtures. Use application commands and APIs when testing business behavior or projection correctness.
- Use the auth CLI, not direct
auth_*table edits, for pairing and sessions.
The helper refuses to write to the shared ~/.t3 directory by default and creates a database backup before each mutation.
Tear down only when the testing loop is finished
Tear down when the user explicitly asks, confirms the iteration is finished, or the overall task is genuinely complete with no pending human review. Do not infer completion from the end of an assistant turn.
When teardown is appropriate:
- Stop the dev process with its terminal interrupt.
- Preserve the isolated base directory when it contains useful reproduction evidence or state for a likely follow-up.
- Otherwise remove only a path created for this test after resolving and verifying the exact target.
If completion is uncertain, keep the environment alive and mention that it is retained for further iteration. A fresh isolated base directory remains the safest reset when authentication, migrations, or fixture state becomes ambiguous.
Troubleshoot predictably
- If the browser shows an unauthenticated pairing screen, issue a new token instead of retrying the consumed URL.
- If the pairing URL is no longer visible, create a replacement token with both
--dev-urland--base-url. - If the replacement token is rejected, verify that the CLI and server use the identical absolute base directory and web URL.
- If the UI shows unexpected data, verify that every command uses the identical explicit base directory before editing anything.
- If ports move because another instance is running, trust the current dev-runner output rather than assuming ports
13773and5733.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

