{% set display_report = report %} {% set display_data = report_data or latest_daily_data or latest_diag_data %} {% set recommendations = recommendations or [] %} {% set installed_skills = installed_skills or [] %} {% set diagnostic = diagnostic_payload or {} %} {% set report_markdown = latest_diag_data.get('report_markdown') or display_data.get('report_markdown') or '' %}
🛰️

Skills Monitor

{% if display_report %} {{ display_report.report_date.strftime('%Y-%m-%d') if display_report.report_date else '今日' }} · {{ display_report.report_type|upper }} {% else %} 暂无数据 {% endif %}

{% if display_report %}
网页端同步状态
首次诊断、每日报告、推荐安装与评分已汇总到这里展示。
{{ sync_status.status_label }}
{{ '%.0f' % (display_report.health_score or 0) }} 健康度
{{ display_report.total_runs or display_data.get('overview', {}).get('total_runs', 0) }}
今日运行
{{ '%.1f' % (display_report.success_rate or display_data.get('overview', {}).get('success_rate', 0)) }}%
成功率
{{ display_report.active_skills or display_data.get('overview', {}).get('active_skills', 0) }}
活跃 Skills

🔄 报告同步保障

首次诊断 {{ '已补齐' if sync_status.has_initial_diagnostic else '缺失' }} {{ sync_status.first_diagnostic_date or '-' }}
近 7 日日报 {{ sync_status.recent_daily_count }} 建议 ≥ 5 次
累计日报 {{ sync_status.daily_count }} {{ sync_status.latest_daily_date or '-' }}
累计诊断 {{ sync_status.diagnostic_count }} {{ sync_status.latest_diag_date or '-' }}
{% if recommendations %}

💡 推荐安装 Skills

{% if installed_skills|length == 0 %} 当前未检测到已安装 skills,已按 官方 TOP10 从热度、成功率和能力覆盖中精选 3 个兜底推荐。 {% else %} 已按当前安装结构、使用频率和满意度生成推荐,优先补足能力短板并替换低表现 skill。 {% endif %}
{% for rec in recommendations[:6] %}
{{ rec.get('name') }}
{{ rec.get('category', '未分类') }} · {{ rec.get('slug') }}
{{ '%.0f' % rec.get('recommendation_score', 0) }}
{{ rec.get('reason_label') or rec.get('reason_type') }} {% if rec.get('official_rank') %}TOP{{ rec.get('official_rank') }}{% endif %} {% if rec.get('hub_installs') %}{{ rec.get('hub_installs') }} installs{% endif %}

{{ rec.get('description') }}

{{ rec.get('reason_detail') }}

{% if rec.get('selection_logic') %}
{{ rec.get('selection_logic') }}
{% endif %}
{% endfor %}
{% endif %} {% if trend %}

📈 7 日趋势

{% endif %} {% if display_data.get('scores') %}

🏆 Skill 评分排行

{% for s in display_data.get('scores', [])[:10] %} {% set raw = s.get('raw_factors', {}) %}
{{ loop.index }}
{{ s.get('skill_id', 'unknown') }}
{{ s.get('grade', '-') }}
成功率 {{ '%.0f%%' % raw.get('success_rate', 0) if raw.get('success_rate') is not none else '-' }} 响应 {{ '%.0fms' % raw.get('response_time', 0) if raw.get('response_time') is not none else '-' }} 满意度 {{ '%.1f/5' % raw.get('satisfaction', 0) if raw.get('satisfaction') is not none else '-' }}
{{ '%.1f' % s.get('total_score', 0) }}
{% endfor %}
{% endif %} {% if installed_skills %}

🧩 已安装 Skills

{% for skill in installed_skills[:12] %}
{{ skill.get('name') or skill.get('slug') }}
{{ skill.get('category', '未分类') }} · {{ '可运行' if skill.get('runnable') else '仅文档' }}
{% if skill.get('total_score') is not none %}
{{ '%.1f' % skill.get('total_score', 0) }}
{{ skill.get('grade', '-') }}
{% else %}
待评分
{% endif %}
{% endfor %}
{% endif %} {% if diagnostic %}

🩺 诊断摘要

{% if diagnostic.get('issues') %}
发现问题
    {% for item in diagnostic.get('issues', [])[:5] %}
  • {{ item }}
  • {% endfor %}
{% endif %} {% if diagnostic.get('suggestions') %}
行动建议
    {% for item in diagnostic.get('suggestions', [])[:5] %}
  • {{ item }}
  • {% endfor %}
{% endif %}
{% endif %} {% if first_diag or latest_diag %}

📄 首次诊断兜底

首次诊断日期 {{ sync_status.first_diagnostic_date or '-' }}
最新诊断日期 {{ sync_status.latest_diag_date or '-' }}
首次触发方式 {{ first_diag_data.get('trigger') or '-' }}
最新触发方式 {{ latest_diag_data.get('trigger') or '-' }}
{% if report_markdown %}
{{ report_markdown[:1800] }}
{% endif %}
{% endif %}

🤖 Agent 信息

名称 {{ agent.name or 'Agent-' + agent.agent_id[:8] }}
最近上报 {{ agent.last_report_at.strftime('%m-%d %H:%M') if agent.last_report_at else '-' }}
系统 {{ agent.os_info or '-' }}
Monitor 版本 {{ agent.monitor_version or '-' }}
{% else %}
📭

暂无报告数据

Agent 尚未上报任何数据。请先运行自动上报或手动上传日报与诊断。

skills-monitor upload --type diagnostic
{% endif %}
{% if trend %} {% endif %}