A dual-mode evaluation skill for frontend projects. Supports both technical solution comparison and product idea feasibility assessment.
Automatically determine the evaluation mode based on the user's input. Do NOT ask the user to choose a mode unless truly ambiguous.
| User Input Pattern | Auto-select | Confidence |
|-------------------|-------------|------------|
| Provides ≥2 code files/descriptions + words like "对比"/"哪个好"/"比较" | Mode A (multi) | High |
| Provides 1 code file/description + words like "评估"/"体检"/"健康度"/"怎么样" | Mode A (single) | High |
| No code, describes a product idea + "能做吗"/"可行性"/"多久"/"多难" | Mode B Entry 1 | High |
| Provides code + "创意"/"可行性"/"做成产品"/"上线"/"demo" | Mode B Entry 2 | High |
| Provides code only, no clear intent keywords | Mode A (single) | Medium — confirm with user |
| Ambiguous or mixed signals | Ask user | Low |
Directly proceed to the corresponding step. Inform the user which mode was selected:
> "已识别为 [模式名称],开始评估..."
Provide a one-line confirmation:
> "看起来你想对这个方案做技术健康度评估,对吗?还是想评估它作为产品创意的可行性?"
Ask the user:
> "你是想评估已有的技术方案,还是想评估产品创意的技术可行性?"
Mode A — Implementation Evaluation (实现方案评估)
Mode B — Ideation Feasibility (创意可行性评估)
Ask the user to provide the following:
@file
PC only — Evaluate only PC devices (low/mid/high-end)
Mobile only — Evaluate only mobile devices (low-end Android/high-end phone/tablet)
PC + Mobile — Evaluate both (default if not specified)
Full — All three dimensions (default if not specified)
Complexity only — Only complexity analysis
Performance only — Only performance bottleneck analysis
Device only — Only device compatibility analysis
If the user does not specify device scope or dimensions, use the defaults (PC + Mobile, Full evaluation).
Single vs. Multiple solutions: Detect the number of solutions provided:
Summarize the collected information back to the user for confirmation before proceeding.
Read the detailed scoring criteria from references/evaluation-criteria.md in this skill's directory.
For each solution, evaluate the following sub-dimensions and assign a score from 1 to 5:
| Sub-dimension | What to evaluate |
|---------------|-----------------|
| Component Structure | Number of components, nesting depth, inter-component communication patterns |
| State Management | State complexity, need for global state, data flow clarity |
| Third-party Dependencies | Number and bundle size of dependencies, risk of unmaintained packages |
| Development Cost | Estimated person-days, required skill set breadth |
| Maintainability | Code readability, module decoupling, testability, upgrade path clarity |
For each sub-dimension:
references/evaluation-criteria.md
Skip this step if the user chose "Complexity only" or "Device only" in Step A1.
For each solution, analyze:
| Sub-dimension | What to analyze |
|---------------|----------------|
| First Paint / LCP | Estimated bundle size, critical rendering path, lazy loading strategy |
| Runtime Performance | Render frequency, DOM operation volume, memory footprint |
| Animation / Interaction | Complex animation presence, 60fps achievability, GPU acceleration needs |
| Network | Request count, data volume, caching strategy, real-time connection needs |
For each sub-dimension:
Skip this step if the user chose "Complexity only" or "Performance only" in Step A1.
Based on the device scope selected in Step A1, evaluate each solution against the relevant device tiers.
Mobile device tiers (evaluate if scope includes Mobile):
| Tier | Reference Config | Key Concerns |
|------|-----------------|--------------|
| Low-end Android | 2GB RAM, quad-core 1.5GHz, 720p | DOM count limits, animation degradation, memory overflow |
| High-end Phone | 6GB+ RAM, flagship SoC, 1080p+ | Smooth interaction, efficient resource usage |
| Tablet | 4GB+ RAM, large screen, stylus support | Layout adaptation, touch target sizing |
PC device tiers (evaluate if scope includes PC):
| Tier | Reference Config | Key Concerns |
|------|-----------------|--------------|
| Low-end PC | Integrated GPU, 4GB RAM, HDD, older CPU | DOM count ceiling, complex animation stuttering, memory overflow risk |
| Mid-range PC | Entry discrete GPU, 8GB RAM, SSD | General smoothness, large data list rendering |
| High-end PC | High-perf GPU, 16GB+ RAM, high refresh display | Full hardware utilization, 4K/high-refresh adaptation |
PC-specific additional dimensions:
For each solution × device tier combination:
Read the report template from assets/report-template.html in this skill's directory.
Generate a complete, self-contained HTML file by replacing the {{PLACEHOLDER}} tokens in the template with the actual evaluation data:
{{REPORT_TITLE}} — Title including the evaluation scope
{{QUICK_OVERVIEW}} — One-sentence conclusion + recommended solution (or health summary for single solution)
{{EXECUTIVE_SUMMARY}} — 3-5 sentence executive summary: conclusion, key metrics, top risk, recommended next action
{{EVAL_PARAMS}} — Evaluation parameters (device scope, dimensions, number of solutions, timestamp)
{{SOLUTION_NAMES}} — JSON array of solution names
{{COMPLEXITY_DATA}} — JSON object with complexity scores for radar chart
{{COMPLEXITY_TABLE}} — HTML table rows for complexity details
{{PERFORMANCE_DATA}} — JSON object with performance risk data for bar chart
{{PERFORMANCE_TABLE}} — HTML table rows for performance details
{{DEVICE_HEATMAP_DATA}} — JSON object for device compatibility heatmap
{{DEVICE_TABLE}} — HTML table rows for device evaluation details
{{OVERALL_RANKING}} — HTML for final ranking and risk summary
{{GENERATION_TIME}} — Current timestamp
Save the generated HTML file to the workspace root as solution-evaluation-report.html.
After saving, use the preview_url tool or inform the user to open the file in their browser.
When only one solution is provided, adjust the report output as follows:
Generate a "Top 3 优化建议" section at the end of the report:
Accept input in two forms:
The user describes their product idea in natural language. Examples:
The user provides AI-generated demo code or prototype files. When code is provided:
> "我从代码中识别出以下核心功能点:
> 1. [Feature A] — 技术本质:[paradigm]
> 2. [Feature B] — 技术本质:[paradigm]
> ...
> 是否正确?需要补充或修正吗?"
Also ask:
Read the tech paradigm reference from references/tech-paradigms.md in this skill's directory.
For each core feature identified in Step B1:
Output a Feature-Paradigm Mapping Table:
| Core Feature | Tech Paradigm(s) | Inherent Complexity (1-5) | Coupling Risk |
|-------------|-------------------|--------------------------|---------------|
| Feature A | Paradigm X + Y | 4 | High: X+Y amplify |
| Feature B | Paradigm Z | 2 | None |
This step is ONLY executed when code is provided (Entry 2). Skip for text-only input (Entry 1).
Analyze the gap between the provided demo code and a production-ready implementation:
| Dimension | What demo typically has | What production needs | Gap Level |
|-----------|----------------------|---------------------|-----------|
| Error Handling | Happy path only | Comprehensive error boundaries, retry, fallback | 🟢/🟡/🔴 |
| Multi-user | Single user scenario | Concurrency, permissions, role-based access | 🟢/🟡/🔴 |
| Data Persistence | In-memory state | Database, caching strategy, data migration | 🟢/🟡/🔴 |
| Device Adaptation | Desktop only | Responsive, touch events, low-end device degradation | 🟢/🟡/🔴 |
| Data Scale | Small dataset (<100 items) | Virtual scrolling, pagination, lazy loading | 🟢/🟡/🔴 |
| Security | No protection | XSS prevention, input validation, auth, CSP | 🟢/🟡/🔴 |
| Accessibility | Not considered | Keyboard navigation, screen reader, ARIA | 🟢/🟡/🔴 |
| Testing | None | Unit tests, E2E tests, visual regression | 🟢/🟡/🔴 |
| Performance Optimization | No optimization | Code splitting, tree shaking, caching, CDN | 🟢/🟡/🔴 |
| Monitoring | No monitoring | Error tracking, performance monitoring, analytics | 🟢/🟡/🔴 |
For each dimension:
Classify each gap as:
For each creative idea / demo, generate:
One of four levels:
Provide an order-of-magnitude range, NOT precise numbers:
For each risk:
Same methodology as Mode A Step A4, but evaluate against the tech paradigms rather than specific code.
Read the report template from assets/ideation-report-template.html in this skill's directory.
Generate a complete, self-contained HTML file by replacing the {{PLACEHOLDER}} tokens:
{{REPORT_TITLE}} — Title including the idea/project name
{{GENERATION_TIME}} — Current timestamp
{{QUICK_OVERVIEW}} — One-sentence feasibility verdict + key insight
{{EXECUTIVE_SUMMARY}} — 3-5 sentence executive summary: feasibility verdict, key data, top risk, recommended next action
{{EVAL_PARAMS}} — Evaluation parameters (device scope, input type, number of ideas, timestamp)
{{IDEA_NAMES}} — JSON array of idea/demo names
{{FEATURE_PARADIGM_DATA}} — JSON object for feature-paradigm mapping visualization
{{FEATURE_PARADIGM_TABLE}} — HTML table rows for feature decomposition details
{{GAP_ANALYSIS_DATA}} — JSON object for gap analysis chart (null if no code provided)
{{GAP_ANALYSIS_TABLE}} — HTML table rows for gap analysis details (empty string if no code)
{{FEASIBILITY_VERDICTS}} — HTML for feasibility verdict cards
{{RESOURCE_ESTIMATION}} — HTML for resource estimation display
{{RISK_MATRIX_DATA}} — JSON object for risk priority matrix (impact × probability)
{{RISK_TABLE}} — HTML table rows for risk details
{{DEVICE_HEATMAP_DATA}} — JSON object for device compatibility heatmap
{{DEVICE_TABLE}} — HTML table rows for device evaluation details
{{IMPROVEMENT_SECTION}} — HTML for improvement suggestions (empty string if user opted out)
Save the generated HTML file to the workspace root as ideation-feasibility-report.html.
After saving, use the preview_url tool or inform the user to open the file in their browser.
Only execute if the user opted in during Step B1.
Generate actionable improvement advice:
For each high-complexity or high-risk feature, propose a simplified alternative:
| Original Feature | Simplified Version | Complexity Reduction | UX Impact |
|-----------------|-------------------|---------------------|-----------|
| Real-time collaboration | Periodic auto-save + manual sync | High → Low | Medium: users see slight delay |
Break the product into phases:
List items that should be validated BEFORE committing to full development:
Include improvement suggestions in the {{IMPROVEMENT_SECTION}} placeholder of the report.
references/evaluation-criteria.md and references/tech-paradigms.md, not arbitrary
During evaluation, provide brief progress indicators to the user at each major step. This is especially important for full evaluations which involve multiple steps:
"📊 正在分析复杂度...(1/4)" → "⚡ 正在评估性能瓶颈...(2/4)" → "📱 正在评估设备适配...(3/4)" → "📝 正在生成报告...(4/4)"
"🔍 正在分解技术范式...(1/4)" → "📏 正在分析 Demo→产品级差距...(2/4)" → "⚖️ 正在进行可行性判定...(3/4)" → "📝 正在生成报告...(4/4)"
Emit these as short messages before each step. Do NOT wait for the user to acknowledge — proceed immediately.
When the user provides a large codebase (>15 files or >5000 total lines), do NOT attempt to read every file. Instead:
package.json / package-lock.json — dependency analysis
main.ts, App.vue, index.tsx, etc.
router/index.ts, routes.ts
stores/*.ts, store/index.ts
vite.config.ts, tsconfig.json, tailwind.config.js
src/ directory structure
> "项目较大(X 个文件),我将重点分析核心架构和入口文件。如需深入分析特定模块,请指定文件路径。"
Each evaluation section should include a confidence indicator to help users understand the reliability of the assessment:
| Level | Badge | When to use |
|-------|-------|-------------|
| 🟢 高置信度 | 🟢 高置信度 | Based on complete code analysis, or well-described technical spec |
| 🟡 中置信度 | 🟡 中置信度 | Based on sampled code (large project), or moderately detailed description |
| 🔴 低置信度 | 🔴 低置信度 | Based on brief text description only, or very incomplete information |
Include the confidence badge in:
Both Mode A and Mode B reports must include an {{EXECUTIVE_SUMMARY}} section. Write it as 3-5 concise sentences covering:
Also include {{EVAL_PARAMS}} with: evaluation mode, device scope, dimensions evaluated, number of solutions/ideas, timestamp.
共 1 个版本