repo-metadata
ユーザーがリポジトリに関するメタデータの生成、構造化されたドキュメント作成、またはサービスカタログへの追加を依頼した場合に、リポジトリの情報を構造化された形式で自動的に生成するSkill。
📜 元の英語説明(参考)
This skill should be used when the user asks to "generate repository metadata", "create catalog-info.yaml", "add repo metadata", "document repository structure", or mentions generating structured metadata for service catalog or architecture documentation.
🇯🇵 日本人クリエイター向け解説
ユーザーがリポジトリに関するメタデータの生成、構造化されたドキュメント作成、またはサービスカタログへの追加を依頼した場合に、リポジトリの情報を構造化された形式で自動的に生成するSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o repo-metadata.zip https://jpskill.com/download/17326.zip && unzip -o repo-metadata.zip && rm repo-metadata.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/17326.zip -OutFile "$d\repo-metadata.zip"; Expand-Archive "$d\repo-metadata.zip" -DestinationPath $d -Force; ri "$d\repo-metadata.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
repo-metadata.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
repo-metadataフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 3
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
リポジトリメタデータ
業界標準の慣例(Backstageカタログ形式に基づく)を使用して、リポジトリの構造化された catalog-info.yaml メタデータを生成します。このメタデータにより、リポジトリ間のアーキテクチャ分析とサービスカタログ機能が実現します。
目的
リポジトリのより広範なアーキテクチャにおける役割を記述する catalog-info.yaml ファイルを作成および維持します。このメタデータは、組織全体のアーキテクチャビュー、依存関係グラフ、およびサービスグループにフィードされます。
使用するタイミング
このスキルは、以下の場合にトリガーします。
- ユーザーが「リポジトリメタデータを生成」または「catalog-info.yaml を作成」するように依頼した場合
- ユーザーがサービスカタログのリポジトリをドキュメント化したい場合
- ユーザーがリポジトリをリポジトリ間のアーキテクチャ分析のために準備する必要がある場合
- ユーザーが「サービスカタログ」または「コンポーネントメタデータ」について言及した場合
メタデータスキーマ
catalog-info.yaml ファイルは、Astrabit固有の拡張機能を含むBackstageの慣例に従います。
apiVersion: astrabit.io/v1
kind: Component
metadata:
name: service-name # 必須: 一意の識別子
description: 簡単な説明
tags:
- backend
- user-management
spec:
# サービス分類
type: service # 必須: service, gateway, worker, library, frontend, database
category: backend # より広いカテゴリ
domain: trading # ビジネスドメイン
owner: platform-team # 責任のあるチーム
# 依存関係 (アップストリーム)
dependsOn:
- component: auth-service
type: service
- component: user-db
type: database
# 提供されるAPI
providesApis:
- name: User API
type: REST
definition: ./openapi.yaml
# 消費されるAPI
consumesApis:
- name: Auth API
providedBy: auth-service
# 生成されるイベント
eventProducers:
- name: user-events
type: kafka
topic: user.created
schema: avro
# 消費されるイベント
eventConsumers:
- name: order-events
type: kafka
topic: order.placed
group: user-service-group
# HTTPルート (ゲートウェイ/サービス用)
routes:
- path: /api/users/*
methods: [GET, POST, PUT, DELETE]
handler: this
- path: /api/auth/*
methods: [POST]
forwardsTo: auth-service
# インフラストラクチャ
runtime: nodejs # nodejs, python, go, java, etc.
framework: nestjs # nestjs, fastapi, spring, etc.
生成ワークフロー
フェーズ1:リポジトリの分析
リポジトリに関する情報を収集します。
-
既存の分析スクリプトを使用する:
python skills/repo-docs/scripts/analyze-repo-structure.py /path/to/repo python skills/repo-docs/scripts/find-integration-points.py /path/to/repo -
既存のドキュメントを読む:
INTEGRATIONS.mdを確認 - アップストリーム/ダウンストリームの関係が含まれていますARCHITECTURE.mdを確認 - サービスロールと依存関係が含まれていますREADME.mdを確認 - 基本的な説明と技術スタックが含まれています
-
コードから検出する:
- ファイル拡張子とパッケージファイルからの言語
- 依存関係からのフレームワーク
- インポートパターンからの統合ポイント
フェーズ2:メタデータの生成
分析に基づいて、検出された値を使用して catalog-info.yaml を生成します。
| フィールド | 検出方法 |
|---|---|
name |
リポジトリ名または package.json の name フィールド |
description |
READMEのタイトル/説明、またはコードから生成 |
type |
コードパターンから推測 (ゲートウェイにはルートがあり、ワーカーにはコンシューマーのみがある) |
runtime |
パッケージファイルから (package.json, pyproject.toml, go.mod) |
framework |
依存関係から (nestjs, fastapi, spring-boot など) |
dependsOn |
統合ポイントのスキャンから |
eventProducers |
kafka.producer または同様のパターンから |
eventConsumers |
@KafkaListener, @EventListener、または同様のパターンから |
routes |
@Controller, @GetMapping、ルーター定義から |
フェーズ3:提示と改善
生成されたメタデータをテーブル形式でユーザーに提示します。
生成された catalog-info.yaml:
| フィールド | 値 | ソース |
|-------|-------|--------|
| name | user-service | リポジトリ名 |
| type | service | 検出: ルートとコンシューマーがある |
| runtime | nodejs | package.json |
| framework | nestjs | 依存関係 |
| domain | unknown | ❌ 入力が必要 |
| owner | unknown | ❌ 入力が必要 |
| dependsOn | auth-service, user-db | 統合スキャン |
ユーザーにレビューを促し、不足しているフィールド(❌でマーク)に入力してもらいます。
フェーズ4:メタデータファイルの書き込み
catalog-info.yaml をリポジトリのルートに書き込みます。
フェーズ5:関連ドキュメントの更新
新しいメタデータファイルを参照するように関連ドキュメントを更新することを提案します。
README.mdにcatalog-info.yamlへのリンクを追加INTEGRATIONS.mdをメタデータと一貫性があるように更新
サービスタイプの検出
| タイプ | 指標 |
|---|---|
| gateway | routes に forwardsTo があり、外部リクエストを処理し、ビジネスロジックは最小限 |
| service | providesApis と consumesApis の両方があり、ビジネスロジックがある |
| worker | eventConsumers のみ、HTTPルートなし、バックグラウンド処理 |
| library | APIは消費せず、提供のみ、共有ユーティリティ |
| frontend | package.json に type: frontend があり、ビルド成果物がある |
| database | 移行、スキーマが含まれ、アプリケーションコードはない |
スクリプトの使用法
scripts/generate-metadata.py を使用して、メタデータの生成を自動化します。
# 現在のディレクトリから生成
python skills/repo-metadata/scripts/generate-metadata.py
# 特定のリポジトリから生成
python skills/repo-metadata/scripts/generate-metadata.py /path/to/repo
# 検査のためにJSONとして出力
python skills/repo-metadata/scripts/generate-metadata.py --format json
スクリプトは次のことを行います。
- リポジトリ構造分析を実行
- 統合ポイントをスキャン
- 既存のドキュメントを読み込む
catalog-info.yamlの内容を出力
追加リソース
参照ファイル
references/schema.md- 完全な catalog-info.yaml スキーマ参照references/detection-patterns.md- サービスの検出パターン
(原文がここで切り詰められています)
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Repository Metadata
Generate structured catalog-info.yaml metadata for repositories using industry-standard conventions (based on Backstage catalog format). This metadata enables cross-repository architecture analysis and service catalog functionality.
Purpose
Create and maintain catalog-info.yaml files that describe a repository's role in the broader architecture. This metadata feeds into architectural views, dependency graphs, and service groupings across the entire organization.
When to Use
Trigger this skill when:
- User asks to "generate repo metadata" or "create catalog-info.yaml"
- User wants to document a repository for a service catalog
- User needs to prepare a repository for cross-repo architecture analysis
- User mentions "service catalog" or "component metadata"
Metadata Schema
The catalog-info.yaml file follows Backstage conventions with Astrabit-specific extensions:
apiVersion: astrabit.io/v1
kind: Component
metadata:
name: service-name # Required: Unique identifier
description: Brief description
tags:
- backend
- user-management
spec:
# Service Classification
type: service # Required: service, gateway, worker, library, frontend, database
category: backend # Broader category
domain: trading # Business domain
owner: platform-team # Team responsible
# Dependencies (Upstream)
dependsOn:
- component: auth-service
type: service
- component: user-db
type: database
# APIs Provided
providesApis:
- name: User API
type: REST
definition: ./openapi.yaml
# APIs Consumed
consumesApis:
- name: Auth API
providedBy: auth-service
# Events Produced
eventProducers:
- name: user-events
type: kafka
topic: user.created
schema: avro
# Events Consumed
eventConsumers:
- name: order-events
type: kafka
topic: order.placed
group: user-service-group
# HTTP Routes (for gateways/services)
routes:
- path: /api/users/*
methods: [GET, POST, PUT, DELETE]
handler: this
- path: /api/auth/*
methods: [POST]
forwardsTo: auth-service
# Infrastructure
runtime: nodejs # nodejs, python, go, java, etc.
framework: nestjs # nestjs, fastapi, spring, etc.
Generation Workflow
Phase 1: Analyze Repository
Gather information about the repository:
-
Use existing analysis scripts:
python skills/repo-docs/scripts/analyze-repo-structure.py /path/to/repo python skills/repo-docs/scripts/find-integration-points.py /path/to/repo -
Read existing documentation:
- Check for
INTEGRATIONS.md- contains upstream/downstream relationships - Check for
ARCHITECTURE.md- contains service role and dependencies - Check for
README.md- contains basic description and tech stack
- Check for
-
Detect from code:
- Language from file extensions and package files
- Framework from dependencies
- Integration points from import patterns
Phase 2: Generate Metadata
Based on analysis, generate catalog-info.yaml with detected values:
| Field | Detection Method |
|---|---|
name |
Repo name or package.json name field |
description |
README title/description or generated from code |
type |
Inferred from code patterns (gateway has routes, worker has consumers only) |
runtime |
From package files (package.json, pyproject.toml, go.mod) |
framework |
From dependencies (nestjs, fastapi, spring-boot, etc.) |
dependsOn |
From integration point scanning |
eventProducers |
From kafka.producer or similar patterns |
eventConsumers |
From @KafkaListener, @EventListener, or similar patterns |
routes |
From @Controller, @GetMapping, router definitions |
Phase 3: Present and Refine
Present the generated metadata to the user in a table format:
Generated catalog-info.yaml:
| Field | Value | Source |
|-------|-------|--------|
| name | user-service | repo name |
| type | service | detected: has routes and consumers |
| runtime | nodejs | package.json |
| framework | nestjs | dependencies |
| domain | unknown | ❌ needs input |
| owner | unknown | ❌ needs input |
| dependsOn | auth-service, user-db | integration scan |
Prompt user to review and fill in missing fields (marked with ❌).
Phase 4: Write Metadata File
Write catalog-info.yaml to the repository root.
Phase 5: Update Related Documentation
Offer to update related docs to reference the new metadata file:
- Add link to
catalog-info.yamlinREADME.md - Update
INTEGRATIONS.mdto be consistent with metadata
Service Type Detection
| Type | Indicators |
|---|---|
| gateway | Has routes with forwardsTo, handles external requests, minimal business logic |
| service | Has both providesApis and consumesApis, business logic |
| worker | Only eventConsumers, no HTTP routes, background processing |
| library | No APIs consumed, only provides, shared utilities |
| frontend | type: frontend in package.json, has build artifacts |
| database | Contains migrations, schemas, no application code |
Script Usage
Use scripts/generate-metadata.py to automate metadata generation:
# Generate from current directory
python skills/repo-metadata/scripts/generate-metadata.py
# Generate from specific repo
python skills/repo-metadata/scripts/generate-metadata.py /path/to/repo
# Output as JSON for inspection
python skills/repo-metadata/scripts/generate-metadata.py --format json
The script:
- Runs repo structure analysis
- Scans for integration points
- Reads existing docs
- Outputs
catalog-info.yamlcontent
Additional Resources
Reference Files
references/schema.md- Complete catalog-info.yaml schema referencereferences/detection-patterns.md- Patterns for detecting service characteristics
Example Templates
examples/catalog-info-template.yaml- Full template with all fieldsexamples/catalog-info-gateway.yaml- Example gateway serviceexamples/catalog-info-worker.yaml- Example worker serviceexamples/catalog-info-library.yaml- Example shared library
Quality Checklist
Before finalizing metadata, verify:
- [ ]
nameis unique across the organization - [ ]
typecorrectly classifies the service - [ ]
domainandownerare filled (not auto-detected) - [ ]
dependsOnlists all upstream dependencies - [ ]
eventProducersandeventConsumersare complete - [ ] Routes are documented if this is a gateway/service
- [ ] File is valid YAML
- [ ] File is at repository root (
catalog-info.yaml)
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (7,098 bytes)
- 📎 references/schema.md (3,878 bytes)
- 📎 scripts/generate-metadata.py (17,041 bytes)