mcpField
S
sync-sdk-skill

sync-sdk-skill

github.com/base44エージェントワークフロー92114 回インストール3 日前に更新
リポジトリ

sync-sdk-skill について

ローカルの SDK ソースに合わせて Base44 SDK のスキル文書を同期するスキルです。モジュールを検出して API の記述と比較し、任意の文書 URL から情報を補足できます。

主な機能

  1. 01SDK モジュールの検出
  2. 02API メソッドと型の抽出
  3. 03文書変更の比較
  4. 04外部文書の任意参照
  5. 05リファレンスとスキル文書の更新

活用シーン

  1. 01API 変更後の SDK リファレンス更新
  2. 02新たに見つかったモジュールの文書追加
  3. 03メソッドのシグネチャと利用条件の確認

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/base44/skills --skill sync-sdk-skill

インストール後、Claude Code で/sync-sdk-skillを入力して読み込まれたか確認します。

詳細

SDK スキルの同期

skills/base44-sdk/ スキルを、Base44 SDK リポジトリの最新の SDK ソースコードと同期します。

使用方法

有効にすると、このコマンドは次の情報を尋ねます。

  1. SDK ソースフォルダーのパス(必須) - Base44 SDK ソースコードのローカルパス
  2. ドキュメント URL(任意) - 追加ドキュメントを取得する URL

手順

手順 1:入力情報の収集

利用できる場合は AskQuestion ツールを使って必須情報をユーザーに尋ねます。利用できない場合は、会話形式で尋ねます。

必須:

  • SDK ソースフォルダーのパス(例:~/projects/base44-sdk または /Users/me/base44-sdk)

任意:

  • ドキュメント URL(例:https://docs.base44.com/sdk)

ユーザーが最初のプロンプトでこれらを指定している場合は、その値を使用します。

手順 2:ソースフォルダーの検証
  1. 指定されたパスが存在し、SDK ソースコードを含んでいることを確認します
  2. 次の主要な目印を探します。
    • @base44/sdk または SDK 関連の内容が記載された package.json
    • モジュールの実装を含む src/ ディレクトリ
    • SDK モジュールのエクスポートを含む TypeScript/JavaScript ファイル(例:entities.ts、auth.ts、client.ts)

検証に失敗した場合は、パスを確認するようユーザーに依頼します。

手順 3:SDK モジュールの検出

SDK ソースフォルダーをスキャンし、利用可能なすべてのモジュールを探します。次を確認します。

  1. 次のようなディレクトリにあるモジュールファイル:

    • src/
    • src/modules/
    • lib/
  2. 各モジュールについて、次の情報を抽出します。

    • モジュール名とエクスポート
    • 利用可能なメソッドとシグネチャ
    • メソッドのパラメーターと型
    • 戻り値の型
    • 使用例(ソースまたは JSDoc にある場合)
    • サブモジュール(例:integrations.Core、integrations.custom)
  3. 次からモジュール定義を解析します。

    • TypeScript のインターフェースと型
    • クラス定義とメソッド
    • JSDoc コメントとアノテーション
    • エクスポート文
  4. 確認する主なモジュール:

    • entities - データモデルに対する CRUD 操作
    • auth - ログイン、登録、ユーザー管理
    • agents - AI との会話とメッセージ
    • functions - バックエンド関数の呼び出し
    • integrations - AI、メール、ファイルアップロード、カスタム API
    • connectors - OAuth トークン(サービスロールのみ)
    • analytics - カスタムイベントの追跡
    • appLogs - ユーザーアクティビティのログ記録
    • users - ユーザーへの招待
    • client - クライアントの作成と設定
手順 4:既存のスキルを読む

現在のスキルファイルを読み、更新が必要な箇所を把握します。

skills/base44-sdk/
├── SKILL.md
└── references/
    ├── analytics.md
    ├── app-logs.md
    ├── auth.md
    ├── base44-agents.md
    ├── client.md
    ├── connectors.md
    ├── entities.md
    ├── functions.md
    ├── integrations.md
    └── users.md
手順 5:比較して変更点を特定する

検出した SDK モジュールと既存のスキルドキュメントを比較します。

  1. 新しいモジュール:ソースにはあるものの、スキル内で参照されていないモジュール
  2. 新しいメソッド:既存モジュールに追加されたメソッド
  3. 更新されたメソッド:シグネチャ、パラメーター、戻り値の型が変更されたメソッド
  4. 非推奨のメソッド:非推奨とマークされたメソッド
  5. 削除されたメソッド:スキルにはあるものの、ソースにはないメソッド(削除前に確認してください)
  6. 新しいパラメーター:既存メソッドに追加された新しいオプション

適用前にユーザーに提示する変更概要を作成します。

手順 6:外部ドキュメントの取得(任意)

ドキュメント URL が指定されている場合:

  1. ドキュメントページを取得します
  2. 関連するモジュールとメソッドのドキュメントを抽出します
  3. ソースコードの情報を補足するために使用します
  4. 正確性を相互参照して確認します
手順 7:スキルファイルの更新

特定した変更ごとに、次の作業を行います。

リファレンスファイルの更新

各モジュールについて、references/{module-name}.md を更新または作成します。

# {ModuleName} Module

{Description from source}

## Overview

{Brief explanation of what the module does}

## Methods

### `{methodName}(params)`

{Method description}

**Parameters:**

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `param1` | `string` | {description} | Yes |
| `options` | `object` | {description} | No |

**Returns:** `Promise<{ReturnType}>`

**Example:**

```javascript
const result = await base44.{module}.{methodName}({
  param1: "value"
});

注意事項

{動作に関する重要な注意点、フロントエンド/バックエンドでの利用可否など}


#### Update SKILL.md

1. Update the **SDK Modules** table if modules changed
2. Update **Quick Start** if core patterns changed
3. Update **Module Selection** section with new capabilities
4. Update **Common Patterns** with new usage examples
5. Update **Frontend vs Backend** table if availability changed
6. Keep the existing structure and formatting
7. Do NOT change the frontmatter description unless explicitly asked

### Step 8: Present Summary

After updates, present a summary to the user:

同期の概要

更新したファイル
  • references/new-module.md(作成)
  • references/entities.md(メソッドを更新)
  • SKILL.md(モジュール表を更新)
実施した変更
  • 新しいモジュールを追加:newModule
  • entities モジュールを更新:bulkCreate() メソッドを追加
  • auth.me() に新しいパラメーター options.cache を追加
  • integrations.legacyMethod() を非推奨に変更
手動確認を推奨
  • [検証が必要な変更を一覧表示]

## Important Notes

- **Preserve existing content**: Don't remove detailed explanations, examples, or warnings unless they're outdated
- **Keep formatting consistent**: Match the existing style of SKILL.md and reference files
- **Maintain progressive disclosure**: Keep detailed docs in references, summaries in SKILL.md
- **Flag uncertainties**: If source code is unclear, flag it for manual review
- **Document frontend/backend availability**: Always note if a method is backend-only (e.g., `connectors`, `asServiceRole`)
- **Preserve type information**: Include TypeScript types in method signatures
- **Keep examples practical**: Examples should reflect real-world usage patterns

## Module-Specific Guidelines

### entities.md
- Document CRUD methods: `create`, `get`, `list`, `filter`, `update`, `delete`
- Include query filter syntax and operators
- Document `subscribe()` for real-time updates
- Note RLS/FLS security implications if applicable

### auth.md
- Cover all authentication methods (email/password, OAuth, etc.)
- Document `me()`, `updateMe()`, `logout()`
- Include redirect flow examples
- Note token handling

### integrations.md
- Document `Core` submodule methods (InvokeLLM, SendEmail, UploadFile, GenerateImage)
- Document `custom.call()` for custom integrations
- Include AI prompt examples

### connectors.md
- Note this is service role / backend only
- Document `getAccessToken()` for OAuth providers

### functions.md
- Show both frontend invocation and backend implementation
- Include `createClientFromRequest()` usage
- Document `asServiceRole` access patterns

## Troubleshooting

| Issue | Solution |
|-------|----------|
| Can't find module files | Try searching for `export class` or `export function` patterns |
| Types not detected | Look for `.d.ts` files or inline TypeScript annotations |
| Missing method descriptions | Check for JSDoc comments (`/** ... */`) above methods |
| Submodule structure | Modules like `integrations.Core` may be in nested files |
| Return types unclear | Check TypeScript generics and Promise wrappers |

コメント