Routine Parameter Designのロゴ

Routine Parameter Design

コミュニティ
kitchen-engineer42
routine-parameter-design

Design and optimize function/method parameter lists when defining or refactoring API interfaces, method signatures, or function parameters. Apply best practices for parameter count, ordering, pass mechanisms, and documentation to create clear, efficient, and maintainable interfaces.

概要

公開者kitchen-engineer42
リポジトリpdf2skills
スキル名routine-parameter-design
スター
136
フォーク
34
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

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

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/kitchen-engineer42/pdf2skills/tree/main/skills_samples/Steve%20McConnell%20Code%20Complete%20A%20Practical%20Handbook%20of%20Software%20Construction_output/routine-parameter-design
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。

TypingMindで使用

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

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

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

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

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

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

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

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

スキルの指示

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

Routine Parameter Design

Use this skill when defining new functions, refactoring existing method signatures, or designing API interfaces to ensure proper parameter design.

When to Use

  • Defining or refactoring a function's parameter list
  • Designing API interfaces or method signatures
  • Reviewing code for parameter-related issues
  • Optimizing function interfaces for clarity and maintainability

Core Design Principles

1. Limit Parameter Count

  • Minimize the number of parameters to improve readability and usability
  • Consider using parameter objects or structs when parameters exceed 3-5 items
  • Each parameter should serve a distinct, necessary purpose

2. Order Parameters (Input-Modify-Output)

Arrange parameters in this specific sequence:

  1. Input parameters: Data the routine reads but does not modify
  2. Modify parameters: Data the routine both reads and modifies
  3. Output parameters: Data the routine writes but does not read

3. Choose Appropriate Pass Mechanisms

  • Pass by value: For primitive types and small objects that won't be modified
  • Pass by reference: For objects that need modification or to avoid copying overhead
  • Objects: Typically passed as object references (not individual fields)
  • Pointers: Follow the asterisk rule (use * consistently for pointer parameters)

4. Ensure Interface Consistency

  • Match actual parameters with formal parameter types
  • Follow language-specific conventions (e.g., C library ordering when applicable)
  • Maintain consistent ordering across related functions
  • Use similar parameter names for similar purposes across the codebase

5. Apply Modifiers Appropriately

  • Use const prefix to prevent modification of input parameters
  • Use in keyword to explicitly mark input-only parameters
  • Use out keyword to explicitly mark output-only parameters
  • Consider inout or equivalent for parameters that are both read and modified

6. Document and Name Clearly

  • Use descriptive, self-documenting parameter names
  • Write clear comments explaining parameter purpose and constraints
  • Document expected ranges, valid values, and edge cases
  • Include units of measurement when applicable

7. Validate Parameter Usage

  • Ensure the routine uses all passed parameters
  • Remove unused parameters to avoid confusion
  • If a parameter is temporarily unused, document why and when it will be used

8. Avoid Global Variables

  • Never use global variables as substitutes for parameters
  • Pass all required data explicitly through the parameter list
  • Global variables make code harder to test, understand, and maintain

Language-Specific Considerations

  • C/C++: Pay attention to pointer vs reference semantics, const correctness
  • Java: All objects are passed by reference; primitives by value
  • Visual Basic: Use ByVal and ByRef keywords explicitly
  • Always check language-specific syntax limitations and conventions

Review Checklist

  • Parameter count is minimized and reasonable
  • Parameters follow input-modify-output ordering
  • Pass mechanism is appropriate for each parameter
  • Modifiers (const, in, out) are used correctly
  • All parameters have clear names and documentation
  • All parameters are actually used by the routine
  • No global variables are used as parameter substitutes
  • Interface is consistent with related functions

よくある質問

AIスキル「Routine Parameter Design」では何ができますか?

Design and optimize function/method parameter lists when defining or refactoring API interfaces, method signatures, or function parameters. Apply best practices for parameter count, ordering, pass mechanisms, and documentation to create clear, efficient, and maintainable interfaces.

TypingMindでRoutine Parameter Designを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/kitchen-engineer42/pdf2skills/tree/main/skills_samples/Steve%20McConnell%20Code%20Complete%20A%20Practical%20Handbook%20of%20Software%20Construction_output/routine-parameter-designを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Routine Parameter Designを使えるAIモデルはどれですか?

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

Routine Parameter Designは何個のAIモデルで使えますか?

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

AIスキル「Routine Parameter Design」は無料ですか?

kitchen-engineer42がGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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