Agent Skills
› alamenai/terrae
› test
test
GitHub用于运行 Terrae 组件测试,支持全量、监听及指定组件模式。能报告测试结果并分析失败原因,协助用户修复代码或测试。
Trigger Scenarios
需要运行项目测试时
测试失败需要分析原因时
检查特定组件功能是否正常时
Install
npx skills add alamenai/terrae --skill test -g -y
SKILL.md
Frontmatter
{
"name": "test",
"description": "Run tests for Terrae components",
"allowed-tools": "Bash(npm run test*), Bash(npx vitest *)",
"argument-hint": [
"component-name"
]
}
Test Skill
Run tests for Terrae components.
Instructions
-
Run All Tests
npm run test:runThis runs vitest in single-run mode.
-
Run Tests in Watch Mode If the user wants to develop with live feedback:
npm run testNote: This runs in watch mode and won't exit automatically.
-
Run Specific Tests To run tests for a specific component:
npx vitest run {component-name}Example:
npx vitest run marker -
Report Results
- Show passing/failing test counts
- For failures, show:
- Test name
- Expected vs received values
- File and line number
-
Handle Failures If tests fail:
- Analyze the failure reason
- Ask if the user wants help fixing the test or the code
- Show the relevant test file and component code
-
Test File Location Tests are typically located at:
src/registry/map/__tests__/{component}.test.tsx- Or alongside components:
{component}.test.tsx
Version History
- ea9a480 Current 2026-07-25 11:49


