cli-backend-testing

Runs LobeHub CLI commands against a local dev server to validate backend changes.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill cli-backend-testing-kingheu0818-sketch
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cli-backend-testing
Source: https://github.com/kingheu0818-sketch/lobehub_yu/tree/main/.agents/skills/cli-backend-testing
Command: npx skills add https://github.com/kingheu0818-sketch/lobehub_yu --skill cli-backend-testing-kingheu0818-sketch

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It helps you confidently validate backend changes by running LobeHub CLI commands against a locally running dev server, ensuring API contracts (routers, services, models) work end-to-end.

Core Features & Use Cases

  • End-to-end backend verification: Exercise TRPC router/service/model changes by driving them through the LobeHub CLI (lh) against localhost:3011.
  • Deterministic dev-test workflow: Covers server reachability checks, when to restart Next.js, CLI authentication, and a consistent command execution pattern.
  • Safe test data cleanup: Provides repeatable cleanup commands for tasks and agents created during verification to prevent stale test artifacts.

Use Case Example: After adding a new TRPC response field or updating model behavior, run a CLI command to confirm the new output shape matches expectations, then delete any created tasks/agents.

Quick Start

Start your local dev server on port 3011, log in via the CLI using the server URL flag, and run your CLI verification command from lobehub/apps/cli with LOBEHUB_CLI_HOME=.lobehub-dev.

Frequently Asked Questions about cli-backend-testing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify TRPC router changes against a local backend?

Run LobeHub CLI commands against your local dev server to verify TRPC router and model changes end-to-end. This workflow checks server reachability and confirms CLI output matches expected API behavior.

How do I authenticate the LobeHub CLI for local backend testing?

Use device code login with isolated CLI credentials to authenticate for local backend testing. Execute the login command from `lobehub/apps/cli` using the server URL flag and `LOBEHUB_CLI_HOME=.lobehub-dev`.

Does LobeHub CLI testing require a specific local dev server configuration?

Yes, LobeHub CLI testing requires a reachable localhost:3011 dev server. The deterministic dev-test workflow includes server reachability checks and guidelines for when to restart the Next.js server.

What is the best way to clean up test data after backend verification?

Use repeatable cleanup commands for tasks and agents to clean up test data after backend verification. This prevents stale test artifacts from persisting in your local development environment.

Why does my CLI backend testing fail to connect to the dev server?

CLI backend testing fails to connect when the localhost:3011 dev server is unreachable. Ensure your Next.js server is actively running and perform server reachability checks before executing verification commands.