Testing
Automates model performance evaluation against LobeHub datasets, streamlining testing workflows and ensuring consistent results.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add lobehub-testing npx -- -y @trustedskills/lobehub-testing
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"lobehub-testing": {
"command": "npx",
"args": [
"-y",
"@trustedskills/lobehub-testing"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill automates model performance evaluation against LobeHub datasets, streamlining testing workflows and ensuring consistent results. It utilizes vitest to run tests within various project locations (webapp, packages, desktop) and provides guidance on best practices for writing effective and maintainable tests. The tool focuses on behavior-driven development and encourages targeted mocking strategies.
When to use it
- To automatically execute unit tests across different parts of a codebase.
- When verifying the performance of models against specific LobeHub datasets.
- During development to ensure new code changes don't break existing functionality.
- As part of a continuous integration/continuous delivery (CI/CD) pipeline for automated testing.
- To quickly run a subset of tests, focusing on recently modified files or specific test categories.
Key capabilities
- Runs
vitesttests in specified locations (src/**/*.test.ts(x),packages/*/**/*.test.ts,apps/desktop/**/*.test.ts). - Provides guidance on preferred mocking techniques (e.g.,
vi.spyOnovervi.mock). - Includes test structure examples and mock patterns for browser APIs and direct dependencies.
- Offers detailed guides for specific testing scenarios like database model, Electron IPC, Zustand store actions, agent runtime E2E, and desktop controller testing (accessible via references/).
- Provides advice on handling failing tests – whether to fix or delete based on the reason for failure.
Example prompts
- "Run the tests in the
packages/databasedirectory." - "Execute only the tests that have passed so far, specifically targeting the file at '[file-path]'."
- "Run the unit tests for the webapp component."
Tips & gotchas
- Avoid running
bun run testas it executes all tests (over 3000), which takes approximately 10 minutes. Use more targeted commands instead. - Ensure that new tests pass a type check by running
bun run type-check. - Prioritize behavior testing over implementation details to create more robust and maintainable tests.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.