Skill Analytics logo

Skill Analytics

Community
danicat
skill-analytics

Mine and analyze Agent Skill usage, Context-Tax ROI, and trigger attribution from conversation transcripts in a local SQLite database. Scans conversation transcripts and installed skill tiers (built-in, plugin, global, workspace, and catalog) to detect zero-use shelfware and tune activation descriptions. Activate when analyzing skill usage over time, auditing system-prompt token overhead, measuring autonomous vs. explicit (::skill or //skill) triggers, or querying conversation skill events with SQL.

Overview

Publisherdanicat
Repositoryskills
Skill nameskill-analytics
Stars
24
Forks
4
Bundled files
4
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 4 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by danicat on GitHub. Read the source before you install it.

Installation

Install the Skill Analytics AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/danicat/skills/tree/main/analytics/skill-analytics
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/danicat/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/analytics/skill-analytics .claude/skills/skill-analytics
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skill Analytics in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skill Analytics on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skill Analytics is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Skill Analytics: Conversation Usage Mining & Context-Tax ROI Engine

The skill-analytics skill mines local agent conversation transcripts (with 0% sampling and automatic transcript.jsonl + transcript_full.jsonl truncation merging) alongside your installed skill inventory across all tiers (builtin, plugin, global, workspace, and catalog) into a local SQLite warehouse (skill_analytics.db). Use these metrics to prune zero-use "shelfware" skills and rewrite under-performing frontmatter descriptions.

Available scripts

  • scripts/analyze.py: Zero-dependency Python 3 CLI for incremental transcript ingestion, full historical rebuilds, pre-packaged ROI/trigger/velocity/gap reports, and ad-hoc SQL queries.
  • scripts/test_analyze.py: Automated unit and regression test suite validating schema DDL, views, parser accuracy, and markdown SQL code blocks.

⚡ Quick Start & Primary Actions

All operations are driven via scripts/analyze.py (runnable via uv run scripts/analyze.py):

bash
# 1. Incremental Sync (Only parses new or modified conversation transcripts)
uv run scripts/analyze.py sync --db skill_analytics.db

# 2. Full Historical Rebuild (Drops and re-mines all conversations from scratch)
uv run scripts/analyze.py sync --full --db skill_analytics.db

# 3. Run Pre-Packaged Analytical Reports
uv run scripts/analyze.py report overview --db skill_analytics.db
uv run scripts/analyze.py report roi --db skill_analytics.db
uv run scripts/analyze.py report triggers --db skill_analytics.db
uv run scripts/analyze.py report velocity --db skill_analytics.db
uv run scripts/analyze.py report gaps --db skill_analytics.db

# 4. Run Ad-Hoc SQL Query
uv run scripts/analyze.py query "SELECT skill_name, source_tier, tier1_tokens_est, total_activations, roi_recommendation FROM v_skill_roi LIMIT 15" --db skill_analytics.db

If --db is omitted, the script defaults to skill_analytics.db in the current working directory.


🗄️ Database Schema & Relational Structure

The database maintains 4 relational tables and 5 analytical views. Full column-level DDL and constraints are documented in references/schema.md.

Tables

  1. skills_inventory: Every discovered skill across builtin, plugin, global, workspace, and catalog tiers, including is_always_in_prompt, tier1_tokens_est (name + description routing cost), and tier2_tokens_est (SKILL.md body cost).
  2. conversations: Metadata across the union of conversation_summaries.db and brain/ transcript directories (total_steps, user_input_steps, planner_steps, first_step_at, last_step_at).
  3. ingestion_state: File size, mtime_ns, and SHA-256 head watermarks per conversation for sub-second incremental updates.
  4. skill_events: Every extracted skill event across all conversation transcripts:
    • direct_skill_view: Direct view_file activations on any */<skill>/SKILL.md.
    • skill_resource_view: Companion references/, examples/, assets/, or scripts/ reads.
    • cli_invocation: CLI skill invocations (load, learn, run, find, show, list, status, update, forget, catalog) and direct script executions (script_exec).
    • user_notation: User prompt shortcuts (modern_::, classic_//, find_:?).
    • Includes trigger_mode (autonomous, user_explicit, rule_driven) and is_self_test (0 for production, 1 for test/authoring).

📊 Analytical SQL Views

View NameDescriptionKey Columns
v_skill_roiContext-Tax vs. Activation ROI across all skill tiersskill_name, source_tier, is_always_in_prompt, tier1_tokens_est, total_activations, autonomous_activations, explicit_activations, resource_reads, script_runs, roi_recommendation
v_trigger_attributionAutonomous description matching vs. manual user overridesskill_name, source_tier, total_activations, autonomous_activations, explicit_activations, autonomous_share_pct, trigger_health
v_daily_invocationsDaily time-series across event categories and actionsday, invocation_kind, action, prod_count, test_count, distinct_conversations
v_subcommand_summaryAggregate counts and date bounds per command/notationinvocation_kind, action, total_events, prod_events, self_test_events, conversations
v_search_gapsSearch queries ranked by whether they led to a skill loadsearch_query, invocation_kind, search_count, led_to_load_count, last_searched_at

🔍 Skill Optimization & Description Refinement: Core SQL Workflows

Tested SQL recipes for skill portfolio optimization are in references/queries.md.

1. Detect Shelfware Skills Consuming System-Prompt Tokens

Find skills with is_always_in_prompt = 1 that add token overhead on every turn but have 0 activations:

sql
SELECT
    skill_name,
    source_tier,
    source_origin,
    tier1_tokens_est,
    cumulative_prompt_tax_tokens,
    roi_recommendation
FROM v_skill_roi
WHERE is_always_in_prompt = 1
  AND total_activations = 0
  AND script_runs = 0
ORDER BY tier1_tokens_est DESC;

2. Find Skills Whose Descriptions Fail to Trigger Autonomously

Identify skills that are only activated when the user manually types ::skill or //skill (NEEDS_DESCRIPTION_TUNING or WEAK_AUTONOMOUS_TRIGGER) for description refinement:

sql
SELECT
    skill_name,
    source_tier,
    total_activations,
    autonomous_activations,
    explicit_activations,
    autonomous_share_pct,
    trigger_health
FROM v_trigger_attribution
WHERE trigger_health IN ('NEEDS_DESCRIPTION_TUNING', 'WEAK_AUTONOMOUS_TRIGGER')
ORDER BY explicit_activations DESC;

📚 Progressive Disclosure & References

  • Full DDL Schema Reference: references/schema.md — Complete SQLite table definitions, indexes, and analytical view logic.
  • SQL Query Cookbook: references/queries.md — Ready-to-run queries for Context-Tax ROI, Trigger Attribution, Progressive Disclosure depth, Catalog Gap discovery, and Multi-Skill Conversation Workflows.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Skill Analytics AI skill do?

Mine and analyze Agent Skill usage, Context-Tax ROI, and trigger attribution from conversation transcripts in a local SQLite database. Scans conversation transcripts and installed skill tiers (built-in, plugin, global, workspace, and catalog) to detect zero-use shelfware and tune activation descriptions. Activate when analyzing skill usage over time, auditing system-prompt token overhead, measuring autonomous vs. explicit (::skill or //skill) triggers, or querying conversation skill events with SQL.

Why use Skill Analytics on TypingMind?

Because you install it once and use it with any model. Skill Analytics is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skill Analytics in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/danicat/skills/tree/main/analytics/skill-analytics. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Skill Analytics?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skill Analytics?

As many as you like. As long as a model supports skills, you can use Skill Analytics with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skill Analytics AI skill free?

Yes. It is published on GitHub by danicat under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇