mcpField
D
development-assistant

development-assistant

github.com/robthepcguy開発20659 回インストール2 日前に更新
リポジトリ

development-assistant について

development-assistantは、Claude Patent Creatorを拡張するための開発スキルです。ツール、アナライザー、設定、機能の追加に向け、実装から検証、テスト、ドキュメント作成までを案内します。

主な機能

  1. 01MCPツール追加のガイド
  2. 02USPTO準拠アナライザーの作成ガイド
  3. 03Pydanticによる設定追加
  4. 04RAG検索パイプラインの変更
  5. 05Claude Codeスラッシュコマンドの追加
  6. 06パフォーマンス監視のパターン

活用シーン

  1. 01プロジェクトへのMCPツール追加
  2. 02新しい準拠アナライザーの実装
  3. 03RAG検索と再ランキングの調整
  4. 04機能のテストとドキュメントの追加

MCP 対応

Claude Patent CreatorにMCPツールを追加する方法として、入力検証、パフォーマンス監視、サーバー登録を説明します。

インストール

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

$npx skills add https://github.com/robthepcguy/claude-patent-creator --skill development-assistant

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

詳細

開発アシスタントスキル

Claude Patent Creator の開発と拡張を支援するエキスパートシステムです。新しい MCP ツール、アナライザー、設定オプション、機能を追加する際に、ベストプラクティスと既存のパターンに従えるようガイドします。

このスキルを使用するタイミング

MCP ツール、アナライザー、設定オプション、BigQuery クエリ、スラッシュコマンドを追加するとき、またはパフォーマンス最適化を実装するときに有効にします。

開発ワークフロー

Feature Request -> Planning -> Implementation (Code + Validation + Monitoring + Tests) -> Testing -> Documentation -> Integration

新しい MCP ツールの追加

クイックスタート:

  1. 入力、出力、依存関係を定義します
  2. mcp_server/validation.py に Pydantic モデルを作成します
  3. デコレーターを使用して、mcp_server/server.py にツール関数を追加します
  4. scripts/ にテストスクリプトを作成します
  5. CLAUDE.md を更新します

主なデコレーター:

@mcp.tool()                    # Register as MCP tool
@validate_input(YourInput)     # Pydantic validation
@track_performance             # Performance monitoring

テンプレート:

def your_tool(param: str, optional: int = 10) -> dict:
    """Comprehensive docstring (Claude sees this).

    Args:
        param: Description
        optional: Description with default

    Returns:
        Dictionary containing: key1, key2, key3
    """
    # Implementation
    return {"result": "data"}

新しいアナライザーの追加

概要: アナライザーは BaseAnalyzer を継承し、USPTO への準拠をチェックします。

最小限の例:

from mcp_server.analyzer_base import BaseAnalyzer

class YourAnalyzer(BaseAnalyzer):
    def __init__(self):
        super().__init__()
        self.mpep_sections = ["608", "2173"]

    def analyze(self, content: str) -> dict:
        issues = []
        if violation:
            issues.append({
                "type": "violation_name",
                "severity": "critical",
                "mpep_citation": "MPEP 608",
                "recommendation": "Fix description"
            })
        return {"compliant": len(issues) == 0, "issues": issues}

設定オプションの追加

mcp_server/config.py で Pydantic の設定を使用します:

# In config.py
class AppSettings(BaseSettings):
    enable_feature_x: bool = Field(default=False, description="Enable X")

# In your code
from mcp_server.config import get_settings
if get_settings().enable_feature_x:
    # Feature enabled

パフォーマンス監視の追加

@track_performance
def your_function(data):
    with OperationTimer("step1"):
        result1 = step1(data)
    with OperationTimer("step2"):
        result2 = step2(result1)
    return result2

RAG 検索パイプラインの変更

パイプライン:Query -> HyDE -> Vector+BM25 -> RRF -> Reranking -> Results

カスタマイズできる箇所: クエリの拡張、カスタムスコアリング、フィルタリング、再ランキング戦略

新しいスラッシュコマンドの追加

  1. .claude/commands/your-command.md を作成します
  2. フロントマターに description、model を追加します
  3. ワークフローの手順を記述します
  4. Claude Code を再起動します

テンプレート:

---
description: Brief command description
model: claude-sonnet-4-5-20250929
---

# Command Name

## When to Use
- Use case 1

## How It Works
Step 1: ...

開発のベストプラクティス

  1. 既存のパターンに従います
  2. 型ヒントを使用します
  3. docstring を記述します(Google スタイル)
  4. エラーを適切に処理します
  5. 入力を検証します(Pydantic)
  6. 操作をログに記録します
  7. パフォーマンスを監視します

よくある開発タスク

BigQuery クエリの追加: mcp_server/bigquery_search.py にメソッドを追加します

検証ルールの追加:

class YourInput(BaseModel):
    field: str

    @field_validator("field")
    @classmethod
    def validate_field(cls, v):
        if not meets_requirement(v):
            raise ValueError("Error message")
        return v

ログの追加:

from mcp_server.logging_config import get_logger
logger = get_logger()
logger.info("event_name", extra={"context": "data"})

クイックリファレンス:ファイルの場所

タスク主なファイル関連ファイル
MCP ツールの追加mcp_server/server.pymcp_server/validation.py
アナライザーの追加mcp_server/your_analyzer.pymcp_server/analyzer_base.py
設定の追加mcp_server/config.py.env、CLAUDE.md
BigQuery クエリの追加mcp_server/bigquery_search.py-
テストの追加scripts/test_your_feature.py-

主なパターン

MCP ツールのパターン:

@mcp.tool()
@validate_input(InputModel)
@track_performance
def tool_name(param: type) -> dict:
    """Docstring visible to Claude."""
    from module import Component
    if invalid:
        return {"error": "message"}
    result = process(param)
    return {"key": "value"}

アナライザーのパターン:

class YourAnalyzer(BaseAnalyzer):
    def analyze(self, content: str) -> dict:
        issues = []
        issues.extend(self._check_x(content))
        return {
            "compliant": len(issues) == 0,
            "issues": issues,
            "recommendations": self._generate_recommendations(issues)
        }

コメント