fjrevoredo/mini-diarium/archive
Claude Code and agent skill by fjrevoredo/mini-diarium
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install fjrevoredo/mini-diarium/archiveSKILL.md
tauri-agent-dev Skill
Metadata
- Plan Status: COMPLETED
- Created: 2026-05-22
- Last Updated: 2026-05-22 (sandbox journal config + WebView storage isolation added; full smoke test completed)
- Owner: Coding agent
- Approval: APPROVED
Implementation Status
- 2026-05-22: Self-check completed. Plan revised to drop Milestone 3 (Playwright fallback) after confirming
agent-browser connect <port|url>is available. Script runner convention pinned tonpx tsx. The initial assumption thatMINI_DIARIUM_DATA_DIRalone would avoid sandbox config seeding was later disproven during smoke testing and corrected in the final implementation. - 2026-05-22: Attempted Milestone 1 CDP smoke probe. Blocked: port 1420 (Vite dev server) was already held by an active
tauri devsession belonging to the user (node PID 19076). User chose to pause all implementation work rather than have the agent kill their running session. No files written; one scratch log file (.agent-dev-probe.log) created at repo root from the failed probe attempt and pending cleanup. - 2026-05-22: User asked to continue. Pre-resume check found no listeners on ports 1420/1421/9222/9223, so the original Milestone 1 blocker is cleared and the CDP smoke probe can proceed.
- 2026-05-22: Milestone 1 completed. Running
tauri devwithWEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=9222exposedhttp://localhost:9222/json/versionandhttp://localhost:9222/json; the page target URL washttp://localhost:1420/. Teardown viataskkill /F /Tsucceeded and left ports 1420/1421/9222/9223 unbound. - 2026-05-22: Task 2.1 completed.
npx tsx scripts/agent-dev/start.ts --timeout 180launched a sandboxedtauri dev, wrote.agent-dev/state.json, and exposed the expected CDP browser/page websocket URLs forhttp://localhost:1420/. - 2026-05-22: Task 2.2 completed after hardening the process model. On Windows, the initial launcher PID exits early, so
start.tsnow records the two durable child roots (cmd /S /C "bun run dev"andcargo run ...) asmanaged_pids.stop.tskills every recorded root, verifies port 9222 is closed, and only then removes sandbox/state. - 2026-05-22: Task 2.3 completed.
npx tsx scripts/agent-dev/probe.tsreports one-line JSON health for a live sandboxed session and correctly resolves the page target even when startup first reaches the browser CDP endpoint before/jsonexposes the app page. - 2026-05-22: Task 2.4 completed.
bun run agent:dev:start --help,bun run agent:dev:stop --help, andbun run agent:dev:probe --helpall execute throughpackage.json. - 2026-05-22: Task 2.5 completed and Milestone 2 exit criteria satisfied. A full
bun run agent:dev:start→bun run agent:dev:probe→bun run agent:dev:stopcycle succeeded, andgit status --shortdid not surface.agent-dev/. - 2026-05-22: Task 4.1 completed.
skill-creatorinitialized.agents/skills/tauri-agent-dev/; the draftSKILL.mdwas replaced with a repo-specific Windows-only workflow, validated withquick_validate.py, andagents/openai.yamlwas corrected to keep the literal$tauri-agent-devprompt. - 2026-05-22: Tasks 4.3 and 4.4 completed.
tauri-agent-devis not inPLUGIN_SKILLS,bun run sync-skillslinked it into.claude/skills/tauri-agent-dev, and the linkedSKILL.mdresolves correctly. - 2026-05-22: Task 4.2 completed. The drafted skill was exercised in a real session, adjusted to document sandbox journal config seeding and WebView storage isolation, and no further wording changes were requested before continuing implementation.
- 2026-05-22: Follow-up hardening after the first smoke attempts:
start.tsnow seedssandbox/app/config.jsonwith one active journal becauseinitializeAuth()still depends on journal metadata even whenMINI_DIARIUM_DATA_DIRoverrides the backend DB path. - 2026-05-22: Follow-up hardening after the first smoke attempts: agent-dev sandboxing now isolates browser-side state too.
start.tssetsMINI_DIARIUM_WEBVIEW_DATA_DIR, andsrc-tauri/src/lib.rsappliesWebviewWindowBuilder::data_directory(...), so fresh sandboxes no longer inherit stalelocalStoragepreferences such as aggressive auto-lock timers. - 2026-05-22: Milestone 5 completed. Real UI smoke test succeeded against a live sandboxed dev app: created a password journal, opened Preferences → Security, enabled Lock after inactivity, clicked Save, verified
JSON.parse(localStorage.getItem('preferences')).autoLockEnabled === true, reopened Preferences → Security, confirmed the checkbox remained checked, and captured a screenshot at.agent-dev/smoke-autolock-preferences.png. - 2026-05-22: Task 5.2 completed after a delayed recheck. An immediate process/port sample raced the shutdown, but the follow-up verification showed no live
bun/cargo/mini-diariumprocesses, onlyTIME_WAITsockets, andbun run agent:dev:probecorrectly returned{"running":false,"reason":"no state file"}.
Self-Check Findings (2026-05-22)
Empirical verifications performed before approval:
- `agent-browser connect <port|url>` is a real, documented command. Verified via
agent-browser --helpandagent-browser skills get electron. The electron skill explicitly documents the launch-with-remote-debugging-port + connect pattern, which is exactly what we need. Milestone 3 (Playwright fallback wrapper) is now SKIPPED. - Backend DB path override is only half the story.
MINI_DIARIUM_DATA_DIRmakes the backend use<dir>/diary.dbdirectly (src-tauri/src/lib.rs:142-147), but frontend startup still depends onlist_journals()/active_journal_idfromconfig.json(src/state/auth.ts). So sandbox mode must seedsandbox/app/config.jsonwith one active journal. Fresh sandbox then lands on PasswordCreation; a reused sandbox lands on PasswordPrompt. - `bun run tauri` → `bun scripts/tauri-dev.js` → `bun x tauri dev`, spreading
process.env. Our env vars (WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS,MINI_DIARIUM_DATA_DIR,MINI_DIARIUM_APP_DIR) propagate cleanly. - Script runner: `npx tsx` is the project convention for
.tsscripts (used byvalidate-locales.tsandsync-languages.ts). Use it here too. - `sync-skills.js` links via NTFS junction on Windows from
.agents/skills/<name>/to.claude/skills/<name>/.tauri-agent-devis not inPLUGIN_SKILLS— no collision. - Vite HMR risk overblown. Vite swaps modules within a stable page target; CDP target ID does not change. Retry-on-disconnect was over-engineering. Drop it from the plan; add only if M5 smoke test surfaces a real issue.
- WebView state needs its own sandbox too. Without a dedicated WebView data dir,
localStorageleaks across runs and can re-enable old preferences such as a 5-second auto-lock timer. Final implementation setsMINI_DIARIUM_WEBVIEW_DATA_DIRand usesWebviewWindowBuilder::data_directory(...)to keep browser-side state inside.agent-dev/sandbox/webview/. - PowerShell `@`-ref gotcha — agent-browser's own SKILL.md documents that
@e174must be single-quoted in PowerShell. Surface this in our SKILL.md (user is on Windows).
Status Legend
- Plan Status values: DRAFT, QUESTIONS PENDING, READY FOR APPROVAL, APPROVED, IN PROGRESS, COMPLETED, BLOCKED
- Task/Milestone Status values: TO BE DONE, IN PROGRESS, COMPLETED, BLOCKED, SKIPPED
Goal
Give the coding agent a reliable, repeatable way to spawn the Mini Diarium Tauri v2 dev binary, drive its UI programmatically (click/type/eval/screenshot/inspect localStorage), and tear it down cleanly — so that UI bug verification ("does the auto-lock toggle actually persist?") can be done by the agent end-to-end without the human in the loop. Targets Windows-only for v1 because that's where the WebView2-CDP path works; macOS and Linux are out of scope.
This complements — does not replace — the existing tauri-driver + WebdriverIO E2E harness, which remains the CI/regression layer. This skill is for ad-hoc manual-style probing during a coding session.
Scope
- New skill directory
.agents/skills/tauri-agent-dev/withSKILL.mddescribing the workflow. - Three new repo scripts under
scripts/agent-dev/:start.ts,stop.ts,probe.ts. - Optionally a fourth script
control.tsonly if the validation step in Milestone 1 confirmsagent-browsercannot speak raw CDP. Decided at implementation time, not pre-committed. - Three new package.json npm scripts:
agent:dev:start,agent:dev:stop,agent:dev:probe. .gitignoreentry for.agent-dev/(state file + sandbox dirs).- Skill triggers on phrases like "manually test", "drive the dev app", "verify in the real UI", "agent dev mode", "spawn the dev app", "open the running app and check…".
- Reuse existing env-var sandbox:
MINI_DIARIUM_DATA_DIR,MINI_DIARIUM_APP_DIR, andMINI_DIARIUM_WEBVIEW_DATA_DIRset to.agent-dev/sandbox/by default so DB/config/browser state all stay isolated. Opt-in--use-real-configflag for the rare case where a bug only repros against real state. - Sync skill via
bun run sync-skills(project's existing pipeline that links.agents/skills/into.claude/skills/).
Non-Goals
- Do NOT add macOS or Linux support. WKWebView has no remote debugging; WebKitGTK uses a different protocol. Start scripts must exit early on these platforms with a clear message.
- Do NOT replace or modify the existing
wdio.conf.tsE2E harness. - Do NOT set
MINI_DIARIUM_E2E=1. That env var forces an 800×660 viewport and disablestauri-plugin-window-state— wrong for interactive driving where the agent needs realistic UI sizing. - Do NOT bundle or wrap the
agent-browserskill. It's already a separate skill; this skill provides only the spawn/sandbox layer and pointsagent-browserat the CDP endpoint. - Do NOT support production builds. Dev only.
- Do NOT implement recording/playback of agent sessions.
- Do NOT publish this skill outside the repo. Internal tooling only.
Assumptions
- The user is on Windows 10/11 with WebView2 installed (confirmed: project's primary dev environment).
- WebView2 honors
WEBVIEW2_ADDITIONAL_BROWSER_ARGUMENTS=--remote-debugging-port=<port>and exposes a CDP endpoint athttp://localhost:<port>/json/versiononce the webview is ready. (Standard Chromium flag pass-through; documented behavior.) bun run tauri devis the canonical dev command (already wired inpackage.json).- The existing env-var contract
MINI_DIARIUM_DATA_DIR/MINI_DIARIUM_APP_DIR(read only insrc-tauri/src/lib.rs) is sufficient for a clean sandboxed config — confirmed by the E2E setup inwdio.conf.ts:254-270. - Port 9222 (default Chrome remote-debugging port) does not collide with any other dev tool the user runs. Configurable via env var or CLI flag for the edge case where it does.
- Port 4444 (tauri-driver) is reserved by E2E; we use 9222 to avoid stomping on it. Both can run simultaneously in principle.
- The
agent-browserskill listed in this project's available skills can connect to a custom CDP endpoint (connectOverCDP(http://localhost:9222)). This is the central technical assumption — Milestone 1 validates it before any other work proceeds. - Vite's HMR will occasionally tear down + reattach the CDP target on hot reload. The wrapper / usage docs note this and instruct the agent to retry on disconnect.
tsxis available as a runtime for.tsscripts (already used by other repo scripts; confirm in package.json before relying on it).
Open Questions
- None settled at plan-draft time. One discovery moment is Milestone 1 (agent-browser CDP support); the rest of the plan branches on its outcome.
Milestones
Milestone 1: Verify WebView2 CDP Exposure (Smoke Spike)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/archive/tauri-agent-dev-skill.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/fjrevoredo/mini-diarium/archive)