Json Report Generationのロゴ

Json Report Generation

組織
cxcscmu
json-report-generation

Generate and write structured JSON reports with proper formatting and validation.

概要

公開者cxcscmu
リポジトリSkillLearnBench
スキル名json-report-generation
スター
91
フォーク
7
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench.git /tmp/SkillLearnBench
mkdir -p .claude/skills
cp -r /tmp/SkillLearnBench/skills/b1-one-shot-claude-haiku-4-5/github-repo-analytics/json-report-generation .claude/skills/json-report-generation
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

JSON Report Generation Skill

Overview

Create, validate, and write JSON reports with proper formatting and schema verification.

Basic Report Structure

json
{
  "pr": {
    "total": 0,
    "merged": 0,
    "closed": 0,
    "avg_merge_days": 0.0,
    "top_contributor": "username"
  },
  "issue": {
    "total": 0,
    "bug": 0,
    "resolved_bugs": 0
  }
}

Field Specifications

  • pr.total: Integer count of all PRs created during period
  • pr.merged: Integer count of merged PRs (as of report date)
  • pr.closed: Integer count of closed (non-merged) PRs
  • pr.avg_merge_days: Float rounded to 1 decimal place
  • pr.top_contributor: String username of author with most PRs
  • issue.total: Integer count of all issues created during period
  • issue.bug: Integer count of issues with 'bug' in any label
  • issue.resolved_bugs: Integer count of bug issues that were closed

Python Implementation

Basic Write

python
import json

report = {
    "pr": {
        "total": 125,
        "merged": 95,
        "closed": 20,
        "avg_merge_days": 3.2,
        "top_contributor": "alice"
    },
    "issue": {
        "total": 45,
        "bug": 18,
        "resolved_bugs": 12
    }
}

with open('/app/report.json', 'w') as f:
    json.dump(report, f, indent=2)

With Validation

python
import json

def validate_report(report):
    """Validate report structure and types"""
    required_keys = {'pr', 'issue'}
    pr_keys = {'total', 'merged', 'closed', 'avg_merge_days', 'top_contributor'}
    issue_keys = {'total', 'bug', 'resolved_bugs'}

    assert set(report.keys()) == required_keys, "Missing top-level keys"
    assert set(report['pr'].keys()) == pr_keys, "Missing PR keys"
    assert set(report['issue'].keys()) == issue_keys, "Missing issue keys"

    assert isinstance(report['pr']['total'], int), "PR total must be int"
    assert isinstance(report['pr']['merged'], int), "PR merged must be int"
    assert isinstance(report['pr']['closed'], int), "PR closed must be int"
    assert isinstance(report['pr']['avg_merge_days'], (int, float)), "avg_merge_days must be numeric"
    assert isinstance(report['pr']['top_contributor'], str), "top_contributor must be string"

    assert isinstance(report['issue']['total'], int), "Issue total must be int"
    assert isinstance(report['issue']['bug'], int), "Issue bug count must be int"
    assert isinstance(report['issue']['resolved_bugs'], int), "resolved_bugs must be int"

    return True

def write_report(report, filepath):
    """Write and validate report"""
    validate_report(report)
    with open(filepath, 'w') as f:
        json.dump(report, f, indent=2)
    print(f"Report written to {filepath}")

Pretty Printing for Review

python
import json

def print_report(report):
    """Pretty print report for verification"""
    print("=" * 60)
    print("DECEMBER 2024 - CLI/CLI REPOSITORY PULSE")
    print("=" * 60)
    print("\nPull Requests:")
    print(f"  Total Created:    {report['pr']['total']}")
    print(f"  Merged:           {report['pr']['merged']}")
    print(f"  Closed (unmerged):{report['pr']['closed']}")
    print(f"  Avg Merge Time:   {report['pr']['avg_merge_days']} days")
    print(f"  Top Contributor:  {report['pr']['top_contributor']}")
    print("\nIssues:")
    print(f"  Total Created:    {report['issue']['total']}")
    print(f"  Bug Reports:      {report['issue']['bug']}")
    print(f"  Resolved Bugs:    {report['issue']['resolved_bugs']}")
    print("=" * 60)

Output Tips

  • Use indent=2 for readable JSON formatting
  • Always validate before writing
  • Include file path in success message
  • Consider adding a timestamp or metadata (optional)

Bash Alternative (not recommended)

bash
# Using jq to construct JSON (complex and error-prone)
jq -n \
  --arg total "125" \
  --arg merged "95" \
  --arg closed "20" \
  --arg avg "3.2" \
  --arg contributor "alice" \
  '{
    pr: {total: ($total | tonumber), merged: ($merged | tonumber), closed: ($closed | tonumber), avg_merge_days: ($avg | tonumber), top_contributor: $contributor},
    issue: {total: 45, bug: 18, resolved_bugs: 12}
  }'

よくある質問

AIスキル「Json Report Generation」では何ができますか?

Generate and write structured JSON reports with proper formatting and validation.

TypingMindでJson Report Generationを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/cxcscmu/SkillLearnBench/tree/main/skills/b1-one-shot-claude-haiku-4-5/github-repo-analytics/json-report-generationを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Json Report Generationを使えるAIモデルはどれですか?

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

Json Report Generationで使えるAIモデルの数に制限はありますか?

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

AIスキル「Json Report Generation」は無料ですか?

はい。cxcscmuがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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