Skip to content

Feature: Team-level Skill Usage Analytics #8

@Q00

Description

@Q00

Summary

Add a team-level skill usage analytics view so team leads and members can see which skills are most popular within their team, identify adoption gaps, and share best practices.

Motivation

Currently, skill analytics are only available to admins and show org-wide data. Teams need their own scoped view because:

  • Different teams have different workflows — a backend team may rely on different skills than a frontend team
  • Team leads want to track skill adoption after introducing new workflows
  • Peer visibility encourages knowledge sharing ("I didn't know that skill existed!")

Current State

  • Admin-only API at /api/admin/analytics/skills provides: promptTypeStats, topSkills, usageTrend, adoptionRate
  • Admin analytics filters by team = 'all' — no team-scoped filtering exposed to non-admins
  • Team page exists at /admin/team but focuses on member management, not skill analytics

Proposed Solution

  1. New API endpoint: GET /api/team/skills — returns skill analytics scoped to the authenticated user's team
    • Top skills by invocation count (ranked list)
    • Skill adoption rate (% of team members who have used each skill)
    • Usage trend over time (daily/weekly)
    • Per-member breakdown (optional, privacy-respecting)
  2. New dashboard page: /team-skills or a new tab within the existing dashboard
    • Team Top Skills — ranked bar chart
    • Adoption Heatmap — skills × team members matrix showing usage intensity
    • Trending Skills — skills with the fastest-growing adoption this week/month
    • Comparison — optional comparison between teams (admin only)
  3. Reuse existing ClickHouse queries from prompt-analytics.ts, adding team filter support for non-admin users

Design Considerations

  • Respect privacy: individual member breakdowns should be opt-in or admin-configurable
  • Support multi-team users if applicable
  • Consider role-based access: team leads see full analytics, members see aggregated view

Acceptance Criteria

  • Team members can view aggregated skill usage for their team
  • Team leads can see per-member skill adoption (if enabled)
  • Skill adoption rate shows what percentage of the team uses each skill
  • Data is scoped to the user's team — no cross-team data leakage

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions