testing-assistant
关于
The testing-assistant skill manages the complete testing lifecycle for the Claude Patent Creator, including unit, integration, and end-to-end validation. It provides expert guidance on running test suites, debugging failures, and maintaining proper test pyramid strategies. Developers should use it for validating features, testing after changes, and setting up CI/CD pipelines.
快速安装
Claude Code
推荐/plugin add https://github.com/RobThePCGuy/Claude-Patent-Creatorgit clone https://github.com/RobThePCGuy/Claude-Patent-Creator.git ~/.claude/skills/testing-assistant在 Claude Code 中复制并粘贴此命令以安装该技能
技能文档
Testing Assistant Skill
Expert system for testing and validating the Claude Patent Creator.
FOR CLAUDE: Test scripts in scripts/ directory.
- Go directly to running appropriate test
- Run from project root
- Tests require active venv
- Only run diagnostics if tests fail
When to Use
Running test suites, validating new features, testing after changes, debugging failures, creating tests, setting up CI/CD, performance testing, E2E validation, regression testing.
Testing Pyramid
/\
/ \ E2E (Manual + Automated)
/----\
/ API \ Integration Tests
/--------\
/ Unit \ Unit Tests
/----------\
Strategy: More unit tests (fast, isolated), fewer integration (moderate), minimal E2E (slow).
Test Suite Overview
scripts/
+-- test_install.py # Complete installation validation
+-- test_gpu.py # GPU detection and CUDA
+-- test_bigquery.py # BigQuery connection
+-- test_analyzers.py # Claims, spec, formalities
+-- test_embedding_speed.py # Performance benchmarks
+-- test_checkpoint.py # Index checkpoint system
Quick Test:
python scripts/test_install.py
Manual Testing via Claude
Test MCP tools through Claude Code interface.
Quick Test Examples
1. MPEP Search: "Search MPEP for claim definiteness requirements"
2. Patent Search: "Search for patents about neural networks filed in 2024"
3. Claims Review: "Review these claims: [paste test claims]"
4. Full Review: "/full-review" (with test application)
5. Diagrams: "Create a flowchart for this process: [describe]"
Validation Checklist
[OK] MPEP search returns relevant results
[OK] BigQuery search finds patents
[OK] Claims analyzer identifies issues
[OK] Specification analyzer checks support
[OK] Formalities checker validates format
[OK] Diagrams generate successfully
[OK] Full review workflow completes
[OK] All MCP tools accessible
[OK] Error messages clear and helpful
[OK] Performance acceptable (<2s most ops)
Creating New Tests
Quick Start
# Unit test template
def test_basic_functionality():
from mcp_server.your_module import YourClass
instance = YourClass()
result = instance.method("test input")
assert result is not None
print("[OK] test_basic_functionality passed")
Test Categories:
- Basic functionality
- Edge cases
- Performance
- Error handling
Performance Testing
Quick Benchmark
from mcp_server.mpep_search import MPEPIndex
import time
index = MPEPIndex()
index.search("test", top_k=5) # Warm up
start = time.time()
result = index.search("claim definiteness", top_k=5)
duration = time.time() - start
print(f"Search took: {duration:.3f}s")
Performance Thresholds
| Operation | Threshold | Notes |
|---|---|---|
| MPEP search (first) | <3s | Model loading |
| MPEP search (subsequent) | <500ms | Cached models |
| BigQuery search | <2s | Network dependent |
| Claims analysis | <3s | 20 claims |
| Spec analysis | <10s | 10 pages |
| Diagram generation | <1s | SVG output |
Troubleshooting Test Failures
| Problem | Solution |
|---|---|
| Import errors | Activate venv, pip install -r requirements.txt |
| GPU tests fail | Check nvidia-smi, reinstall PyTorch, or skip |
| BigQuery fails | Re-auth: gcloud auth application-default login |
| Index not found | Rebuild: patent-creator rebuild-index |
| Too slow | Check GPU usage, first run slower, check system load |
Best Practices
- Test after every change
- Automated testing
- Test pyramid (more unit, fewer E2E)
- Fast tests (<5 min suite)
- Isolated tests (no dependencies)
- Clear assertions
- Document tests
- Version control tests
- Regular execution (weekly)
- Monitor performance
Quick Reference
Run All Tests
python scripts/test_install.py
python scripts/test_gpu.py
python scripts/test_bigquery.py
python scripts/test_analyzers.py
python scripts/test_embedding_speed.py
Regression Test
python scripts/test_install.py || exit 1
python scripts/test_bigquery.py || exit 1
python scripts/test_analyzers.py || exit 1
echo "[OK] All regression tests passed!"
Manual Checklist
□ Ask Claude to search MPEP
□ Ask Claude to search patents
□ Ask Claude to review claims
□ Run /full-review command
□ Generate a diagram
□ Verify all tools work
□ Check performance (<2s)
GitHub 仓库
相关推荐技能
content-collections
元Content Collections 是一个 TypeScript 优先的构建工具,可将本地 Markdown/MDX 文件转换为类型安全的数据集合。它专为构建博客、文档站和内容密集型 Vite+React 应用而设计,提供基于 Zod 的自动模式验证。该工具涵盖从 Vite 插件配置、MDX 编译到生产环境部署的完整工作流。
evaluating-llms-harness
测试该Skill通过60+个学术基准测试(如MMLU、GSM8K等)评估大语言模型质量,适用于模型对比、学术研究及训练进度追踪。它支持HuggingFace、vLLM和API接口,被EleutherAI等行业领先机构广泛采用。开发者可通过简单命令行快速对模型进行多任务批量评估。
cloudflare-turnstile
元这个Skill提供完整的Cloudflare Turnstile集成知识,用于在表单、登录页面和API端点中实现无验证码的机器人防护。它支持React/Next.js/Hono等框架集成,涵盖令牌验证、错误代码调试和端到端测试等场景。通过运行后台不可见挑战,在保持用户体验的同时有效阻止自动化流量和垃圾信息。
webapp-testing
测试该Skill为开发者提供了基于Playwright的本地Web应用测试工具集,支持自动化测试前端功能、调试UI行为、捕获屏幕截图和查看浏览器日志。它包含管理服务器生命周期的辅助脚本,可直接作为黑盒工具运行而无需阅读源码。适用于需要快速验证本地Web应用界面和交互功能的开发场景。
