run

GitHub

本地启动LeafWiki的Go后端与Vite前端,用于手动端到端验证前后端变更。

.claude/skills/run/SKILL.md perber/leafwiki

Trigger Scenarios

需要手动验证前端或后端变更 进行端到端功能测试

Install

npx skills add perber/leafwiki --skill run -g -y
More Options

Non-standard path

npx skills add https://github.com/perber/leafwiki/tree/main/.claude/skills/run -g -y

Use without installing

npx skills use perber/leafwiki@run

指定 Agent (Claude Code)

npx skills add perber/leafwiki --skill run -a claude-code -g -y

安装 repo 全部 skill

npx skills add perber/leafwiki --all -g -y

预览 repo 内 skill

npx skills add perber/leafwiki --list

SKILL.md

Frontmatter
{
    "name": "run",
    "description": "Launch LeafWiki locally (Go backend + Vite frontend dev server) to manually verify a change in the browser. Use whenever a frontend or backend change needs to be exercised end-to-end instead of just type-checked or unit-tested."
}

Running LeafWiki locally

LeafWiki needs two processes running side by side: the Go backend (API + serves data) and the Vite dev server (frontend, proxies /api, /assets, /branding to the backend).

1. Backend

cd cmd/leafwiki
go run . --jwt-secret=dev --admin-password=dev --public-access=true --allow-insecure=true

Runs on http://localhost:8080. Admin login: username admin, password dev. --public-access=true lets you view pages without logging in; use the admin login for anything that touches the tree, settings, or editor.

2. Frontend

cd ui/leafwiki-ui
npm install   # first time only
npm run dev

Runs on http://localhost:5173 — open this URL, not :8080, during development.

Notes

  • Run both in the background (e.g. two run_in_background Bash calls) and poll http://localhost:5173 / http://localhost:8080 readiness before navigating.
  • Click-throughs and screenshots belong in a subagent that reports back a short text verdict. Every image read in the main session stays in its context and is paid for again on every later turn.
  • Data is stored on disk under the backend's working directory (cmd/leafwiki) by default — starting fresh creates an empty wiki with just the root page.
  • Before committing, run npm run format in ui/leafwiki-ui (and in e2e/ if e2e tests changed).

Version History

  • 8c5843f Current 2026-10-19 00:23

Same Skill Collection

.claude/skills/develop/SKILL.md
.claude/skills/tidy-tests/SKILL.md
.claude/skills/worktree-cleanup/SKILL.md
.claude/skills/docs-review/SKILL.md

Metadata

Files
0
Version
8c5843f
Hash
9b890ca0
Indexed
2026-10-19 00:23

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 18:37
浙ICP备14020137号-1