跳到正文
cccskills
免费在 GitHub 公开

unity-server

Manage the local Unity test server (TstServer) for development and debugging. Use this skill whenever the user mentions starting, stopping, restarting, compiling, or checking the test server, viewing server logs, running Unity locally, or performing backup/restore and database export/import via the REST Admin API. Trigger on references to TstServer, localhost:2443, 'is the server running', 'build and run unity', 'kill the server', 'server won't start', 'export a backup', 'restore from backup', or any server lifecycle operation.

中文简介正在准备中。当前显示原文说明。

unity-idm/unity星标 27(GitHub 27 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(2)

  • SKILL.md5.3 KB
  • scripts/tstserver.sh4.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Unity Test Server Management

You manage a local Unity test server (TstServer) at https://localhost:2443. All operations go through the ${CLAUDE_SKILL_DIR}/scripts/tstserver.sh script — it handles compilation, PID tracking, health checks, and REST API calls so you don't have to piece those together yourself.

How to think about operations

Always check status first before start or stop. This prevents confusing error messages — starting when already running causes port conflicts, and stopping when not running is a no-op the user didn't intend. The script's start command does this automatically, but being explicit helps you give the user a clear picture.

When the user's request maps to multiple operations (e.g., "restart and show me the logs"), decompose into sequential steps rather than guessing a single command.

Operations

Check status

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh status

Start here when you're unsure about the server state.

Compile

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh compile

Uses incremental builds (no clean) because full rebuilds take minutes and are rarely needed. Only add clean if the user explicitly asks or if you're seeing stale-artifact errors (e.g., class-not-found for code that clearly exists).

If compilation fails, the script prints the last 50 lines of the build log. The full log is at /tmp/unity-compile-output.log — read it to diagnose the issue before reporting to the user.

Start

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh start

Compiles first, then launches in the background. The server takes time to initialize — tell the user it's starting and they can access https://localhost:2443 once ready. They can monitor progress via the log file.

If the compile step within start fails, the server won't launch. Check /tmp/unity-compile-output.log for the root cause.

Stop

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh stop

Sends a graceful shutdown signal. If the process persists afterward, ask the user before using kill -9 — force-killing can leave database locks, temp files, or ports in a dirty state that causes problems on the next start.

If the server isn't running, just tell the user — no action needed.

Restart

Stop then start, sequentially:

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh stop && ${CLAUDE_SKILL_DIR}/scripts/tstserver.sh start

Verify health

${CLAUDE_SKILL_DIR}/scripts/tstserver.sh verify

Checks that the server is up and the REST Admin API responds. Useful after start to confirm everything initialized correctly, or when the user reports something seems off.

View logs

The server log is at integration-tests/target/unity-server.log. Use the Read tool to show recent entries. For live monitoring, suggest the user run tail -f themselves since it's interactive.

Backup (export database)

# All content categories → backup.json
${CLAUDE_SKILL_DIR}/scripts/tstserver.sh backup

# Custom filename
${CLAUDE_SKILL_DIR}/scripts/tstserver.sh backup my-backup.json

# Exclude specific categories via query params
${CLAUDE_SKILL_DIR}/scripts/tstserver.sh backup backup.json "auditLogs=false&idpStatistics=false"

Available category filters (all default to true): systemConfig, directorySchema, users, auditLogs, signupRequests, idpStatistics.

Restore (import database)

# From default backup.json
${CLAUDE_SKILL_DIR}/scripts/tstserver.sh restore

# From custom file
${CLAUDE_SKILL_DIR}/scripts/tstserver.sh restore my-backup.json

The restore operation restarts internal endpoints, so the REST endpoint may be destroyed before the HTTP response arrives. The script treats a connection reset as success — this is expected, not an error.

Quick reference

ActionCommand
Status${CLAUDE_SKILL_DIR}/scripts/tstserver.sh status
Compile${CLAUDE_SKILL_DIR}/scripts/tstserver.sh compile
Start${CLAUDE_SKILL_DIR}/scripts/tstserver.sh start
Stop${CLAUDE_SKILL_DIR}/scripts/tstserver.sh stop
Verify${CLAUDE_SKILL_DIR}/scripts/tstserver.sh verify
Backup${CLAUDE_SKILL_DIR}/scripts/tstserver.sh backup [file] [params]
Restore${CLAUDE_SKILL_DIR}/scripts/tstserver.sh restore [file]

Important context

  • Self-signed certificate: Browsers will show a security warning — this is expected for local dev.
  • Auth credentials: REST Admin API uses Basic auth, username a, password a.
  • Working directory: The script handles cd into integration-tests/ internally since the server resolves config paths relative to that directory.
  • Port conflicts: If start fails with a port-in-use error but status shows no Unity process, something else is occupying port 2443. Let the user know so they can investigate.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

cr

免费

Review Unity Java changes in a branch or explicit commit set against a task description, using specialist sub-agents for tests, correctness and completeness, code quality, and security. Target defaults to dev and supports version branches such as dev-x.y. Use when a Unity code review is requested.

中文简介正在准备中。当前显示原文说明。

unity-idm/unity272026年10月26日 更新

unity-cr

免费

Alias for the project cr skill. Use unity-cr to perform the same Unity branch or commit-set code review.

中文简介正在准备中。当前显示原文说明。

unity-idm/unity272026年10月26日 更新

Update Maven dependency and build-plugin versions in the Unity root POM, either as one bulk patch/revision update or as an interactive full update with per-library minor/major choices, including staged Vaadin upgrades with release-note-driven compatibility work. Use when asked to discover, apply, build, and commit dependency updates in a Unity checkout.

中文简介正在准备中。当前显示原文说明。

unity-idm/unity272026年10月26日 更新

查看 unity-idm 的全部技能

报告此技能的问题