Skill Analyticsのロゴ

Skill Analytics

コミュニティ
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.

概要

公開者danicat
リポジトリskills
スキル名skill-analytics
スター
24
フォーク
4
同梱ファイル
4
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    danicatがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルSkill AnalyticsをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/danicat/skills/tree/main/analytics/skill-analytics
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSkill Analyticsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にSkill Analyticsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Skill Analyticsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「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.

TypingMindでSkill Analyticsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Skill Analyticsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSkill Analyticsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/danicat/skills/tree/main/analytics/skill-analyticsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Skill Analyticsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Skill Analyticsは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSkill Analyticsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Skill Analytics」は無料ですか?

はい。danicatがGitHubでApache-2.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇