from __future__ import annotations

from app.models.skill import Skill


def summarize_skill_effectiveness(skill: Skill) -> dict[str, object]:
    return {
        "name": skill.name,
        "status": skill.status,
        "effectiveness": skill.effectiveness,
        "activation_count": skill.activation_count,
        "candidate_count": getattr(skill, "candidate_count", 0),
        "last_activated_at": skill.last_activated_at.isoformat() if skill.last_activated_at else None,
    }
