run

GitHub

用于本地启动LeafWiki(Go后端+Vite前端)以进行端到端手动验证。支持后台运行、健康检查及格式化,替代类型检查和单元测试。

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

触发场景

需要本地运行并验证前后端变更 进行端到端功能测试或UI交互验证

安装

npx skills add perber/leafwiki --skill run -g -y
更多选项

非标准路径

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

不安装直接使用

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).

Start

make setup   # first time, or after package-lock.json changed
make dev

make dev builds and starts the backend on http://localhost:8080 and Vite on http://localhost:5173 — open :5173, not :8080, during development. Admin login: username admin, password devpassword (the minimum is 8 characters). --public-access=true lets you view pages without logging in; use the admin login for anything that touches the tree, settings, or editor. Extra backend flags: make dev ARGS=--enable-revision=true. Ctrl-C, or SIGTERM to the script, stops both.

Without make dev: go run . --jwt-secret=dev --admin-password=devpassword --public-access=true --allow-insecure=true in cmd/leafwiki, and npm run dev in ui/leafwiki-ui.

Notes

  • Run make dev in the background (a run_in_background Bash call) and poll http://localhost:5173 / http://localhost:8080 readiness before navigating. Stop it with pkill -TERM -f scripts/dev.sh: a background job ignores SIGINT, and the script's trap stops both servers on SIGTERM.
  • 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).

版本历史

  • 714e036 当前 2026-11-02 16:55

    统一使用make dev命令简化启动流程;修正开发环境管理员密码长度限制说明。

  • 8c5843f 2026-10-19 00:23

同 Skill 集合

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

元信息

文件数
0
版本
714e036
Hash
ef4a3efb
收录时间
2026-10-19 00:23

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.156.0. UTC+08:00, 2026-11-05 17:23
浙ICP备14020137号-1