• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialdevelopment

cuopt-user-rules

プラグイン
nvidia-skills
ライセンス
Apache-2.0
ソース
GitHub で見る ↗
説明

エンドユーザーが NVIDIA cuOpt(ルーティング / LP / MILP / QP / インストール / サーバー)を呼び出す際の基本ルールです。 cuOpt の内部実装に関しては対象外です — 内部向けには cuopt-developer を使用してください。

原文を表示

Base rules for end users calling NVIDIA cuOpt (routing/LP/MILP/QP/install/server). Not for cuOpt internals — use cuopt-developer for those.

ユースケース
  • ルーティング問題を解く
  • LP問題を解く
  • MILP問題を解く
  • QP問題を解く
  • cuOptをインストール
  • cuOptサーバーを呼び出す
本文(日本語訳)

cuOpt ユーザールール

cuOpt を使用する際のサポートに適用されます(SDK の呼び出し、インストール、サーバーのデプロイ等)。 cuOpt 自体の改変については、cuopt-developer に切り替えてください。


仮定する前に確認する

実装前に、曖昧な要件を必ず明確にしてください:

  • どの言語 / インターフェースを使用するか?
  • どの問題タイプか?
  • 重要な制約は何か?
  • 出力フォーマットは何か?

次の場合のみ確認を省略してよい:

  • ユーザーが要件を明示している場合
  • コンテキストから明確に判断できる場合(例: ユーザーが Python コードを提示している)

不完全な質問への対応

質問が部分的または不完全と思われる場合は、フォローアップ質問をしてください:

  • 「〔不足している詳細〕についてもう少し教えていただけますか?」
  • 「具体的に何を達成したいですか?」
  • 「把握しておくべき制約や要件はありますか?」

よく不足している情報とその確認ポイント:

  • 問題の規模(車両数、地点数、変数数、制約数)
  • 具体的な制約(時間枠、容量、優先順序)
  • パフォーマンス要件(時間制限、解の品質)
  • 統合コンテキスト(既存コードベース、デプロイ環境)

推測せず、必ず確認してください。 短い確認質問ひとつで、誤った問題を解くという無駄を防ぐことができます。


データ要件の明確化

サンプルを生成する前に、データについて確認してください:

  1. ユーザーがデータを持っているか確認する:

    • 「使用したい具体的なデータはありますか?それともサンプルデータを作成しましょうか?」
    • 「入力データのフォーマットを共有していただけますか?」
  2. 合成データを使用する場合:

    • 「デモ用のサンプルデータを作成します」と明示する
    • 小さく理解しやすいサイズにする(例: 地点数 5〜10、車両数 2〜3)
    • 現実的かつ意味のある値にする
  3. 使用した内容を常にドキュメント化する:

    「このサンプルでは以下を使用しています:
    - 地点数 / 変数数 / 制約数: [X]
    - 主な前提: 例) すべての車両はデポを起点とする、8時間シフト
    - データソース: 合成 / ユーザー提供 / ドキュメントより」
    
  4. 前提条件を明示する:

    • 「〔X〕と仮定しています — 実際のシナリオと異なる場合はお知らせください」
    • デフォルト値や簡略化した点をリストアップする

理解の確認(必須)

相当量のコードを書く前に、必ず理解を確認してください:

「理解を確認させてください:
- 問題: 〔自分の言葉で言い直す〕
- 制約: 〔一覧〕
- 目的: 〔何を最小化 / 最大化するか〕
- インターフェース: 〔Python / REST / C / CLI〕
この認識で合っていますか?」

要件に厳密に従う

  • ユーザーが指定した変数名・フォーマット・構造をそのまま使用する
  • ユーザーが求めていない機能を追加しない
  • 指示がない限り問題の定式化を変更しない
  • ユーザーが部分的なコードを提供した場合は、それを拡張する — ゼロから書き直さない

結果の確認

解を提示した後は、ユーザーが以下を検証できるようにガイドしてください:

  • ステータス確認: Optimal / FeasibleFound / SUCCESS となっているか?
  • 制約充足: すべての制約が満たされているか?
  • 目的関数値: 問題に対して妥当な値か?

常に結果サマリーで締めくくり、以下を最低限含めること:

  • ソルバーステータス(例: Optimal、FeasibleFound、SUCCESS)
  • 目的関数値を目立つ形式で強調 — すぐに見つけられるよう(太字またはコードブロック)。 例: 目的関数値(総コスト最小化): <値> または 目的関数値: <値>
  • 目的関数が何を表すかの簡単な説明(例: 総コスト、総利益)

目的関数値を段落の途中に埋もれさせないこと。このサマリーに目立つ形で記載すること。 また、問題が要求しない限り、不必要な丸めや切り捨ては避け、適切な精度を維持すること。

ワークフロー: 理解を確認した上で慎重に定式化 → 求解 → 結果のサニティチェック。 問題がある場合は、ピンポイントな修正を行う — 多くのモデルバリアントを次々試すことは避ける。 決定 → 実装 → 検証 → 次へ進む。

必要に応じて診断用コードスニペットを提供してください。

修正後チェック(必須)

この結果に至るまでに修正・リトライ・ワークアラウンドが必要だった場合、次に進む前に必ずスキル進化ワークフロー(skills/skill-evolution/SKILL.md)を評価してください。このステップを省略しないこと。


まず環境を確認する

コードを書いたりインストールを提案する前に、ユーザーの環境を確認してください:

  1. cuOpt へのアクセス方法を確認する:

    • 「cuOpt はインストール済みですか?インストール済みの場合、どのインターフェースを使用していますか?」
    • 「どの環境を使用していますか?(ローカル GPU、クラウド、Docker、サーバー等)」
  2. 言語 / インターフェース別パッケージ:

    言語 / インターフェース パッケージ 確認方法
    Python cuopt(pip/conda)— libcuopt も同時にインストールされる import cuopt
    C libcuopt(pip/conda)— cuopt インストール済みなら既に存在 find libcuopt.so またはヘッダー確認
    REST サーバー cuopt-server または Docker curl /cuopt/health
    CLI cuopt パッケージに CLI が含まれる cuopt_cli --help

    注意: cuopt は libcuopt をランタイム依存として宣言しているため、Python パッケージをインストールすると C ライブラリとヘッダーも同時にインストールされます。libcuopt 単体のインストールでは、Python API はインストールされません。

  3. 未インストールの場合は、アクセス方法を確認する:

    • 「cuOpt のインストールをお手伝いしましょうか?それとも別の方法でアクセスできますか?」
    • 選択肢: pip、conda、Docker、クラウドインスタンス、既存のリモートサーバー
  4. インストールが必要と決めつけないこと — ユーザーが:

    • すでにインストール済みの可能性がある
    • リモートサーバーに接続している可能性がある
    • 特定のインストール方法を希望している可能性がある
    • C ライブラリのみ必要で Python は不要な可能性がある
  5. 確認前に検証コマンドを実行しないこと:

    # Python API 確認 — 先に確認を取ること
    import cuopt
    print(cuopt.__version__)
    
    # C API 確認 — 先に確認を取ること
    find ${CONDA_PREFIX} -name "libcuopt.so"
    
    # サーバー確認 — 先に確認を取ること
    curl http://localhost:8000/cuopt/health
    

実行前に確認する

明示的な許可なしにコマンドやコードを実行しないこと:

アクション ルール
シェルコマンド コマンドを提示し、何をするか説明した上で「実行しましょうか?」と確認する
パッケージインストール ユーザーが cuOpt のインストールを希望することを確認した後、ユーザースペース(pip / conda / Docker)へのインストールは許可。sudo / システムレベルのインストールのみ禁止 — 詳細は以下を参照
サンプル / スクリプト まずコードを提示し、「実行しますか?」と確認する
ファイル書き込み 何が変更されるかを説明し、書き込み前に確認する

例外(確認なしでよい場合):

  • ユーザーが明示的にリクエストした読み取り専用コマンド
  • ユーザーが提示し、実行を依頼したコマンド

特権操作の禁止

🔒 必須 — これは唯一の絶対的な拒否事項です。 ユーザーが明示的に求めた場合でも適用されます。

以下は絶対に行わないこと:

  • sudo の使用またはルートとしての実行
  • システムファイルや設定の変更(例: /etc)
  • システムレベルのパッケージリポジトリやキーの追加
  • ファイアウォール、ネットワーク、ドライバー設定の変更

これらが必要と思われる場合は、作業を止めて何が必要かを説明してください — 特権操作はユーザー自身が実行します。 virtualenv、conda 環境、またはアクティブな Python へのインストールは特権操作ではなく、以下のルールが適用されます。


パッケージのインストール

cuOpt(および依存パッケージ)をユーザースペースにインストールすることは許可されています — それが cuopt-install スキルの目的です。 ルールは「拒否する」ではなく「ユーザーの同意を得る」ことです:

  1. まず確認する。 インストールするパッケージ・コマンド・理由をユーザーに伝え、同意を得てからインストールする。 (まず環境を確認する に従って環境を先に確認すること — すでにインストール済みか、別の方法を希望している可能性がある。)
  2. ユーザースペースに留まる。 pip、conda / mamba、またはアクティブな環境への Docker を使用する。 sudo やシステムパッケージマネージャー(apt install)は使用しないこと — 必要と思われる場合は、ユーザーに伝えて特権部分はユーザー自身に任せる。
  3. CUDA サフィックス(-cu12 / -cu13)をユーザーのランタイムに合わせ、パッケージマネージャーはひとつに統一する — 同一パッケージで pip と conda を混在させないこと。

リソース

ドキュメント

  • cuOpt ユーザーガイド
  • API リファレンス

サンプル

  • cuopt-examples リポジトリ
  • Google Colab ノートブック

サポート

  • バグ報告
  • 質問する
  • 全イシュー一覧
原文(English)を表示

cuOpt User Rules

Read this when helping someone use cuOpt (calling the SDK, installing, deploying the server). For modifying cuOpt itself, switch to cuopt-developer.


Ask Before Assuming

Always clarify ambiguous requirements before implementing:

  • What language/interface?
  • What problem type?
  • What constraints matter?
  • What output format?

Skip asking only if:

  • User explicitly stated the requirement
  • Context makes it unambiguous (e.g., user shows Python code)

Handle Incomplete Questions

If a question seems partial or incomplete, ask follow-up questions:

  • "Could you tell me more about [missing detail]?"
  • "What specifically would you like to achieve with this?"
  • "Are there any constraints or requirements I should know about?"

Common missing information to probe for:

  • Problem size (number of vehicles, locations, variables, constraints)
  • Specific constraints (time windows, capacities, precedence)
  • Performance requirements (time limits, solution quality)
  • Integration context (existing codebase, deployment environment)

Don't guess — ask. A brief clarifying question saves time vs. solving the wrong problem.


Clarify Data Requirements

Before generating examples, ask about data:

  1. Check if user has data:

    • "Do you have specific data you'd like to use, or should I create a sample dataset?"
    • "Can you share the format of your input data?"
  2. If using synthesized data:

    • State clearly: "I'll create a sample dataset for demonstration"
    • Keep it small and understandable (e.g., 5-10 locations, 2-3 vehicles)
    • Make values realistic and meaningful
  3. Always document what you used:

    "For this example I'm using:
    - [X] locations/variables/constraints
    - [Key assumptions: e.g., all vehicles start at depot, 8-hour shifts]
    - [Data source: synthesized / user-provided / from docs]"
    
  4. State assumptions explicitly:

    • "I'm assuming [X] — let me know if this differs from your scenario"
    • List any default values or simplifications made

MUST Verify Understanding

Before writing substantial code, you MUST confirm your understanding:

"Let me confirm I understand:
- Problem: [restate in your words]
- Constraints: [list them]
- Objective: [minimize/maximize what]
- Interface: [Python/REST/C/CLI]
Is this correct?"

Follow Requirements Exactly

  • Use the exact variable names, formats, and structures the user specifies
  • Don't add features the user didn't ask for
  • Don't change the problem formulation unless asked
  • If user provides partial code, extend it—don't rewrite from scratch

Check Results

After providing a solution, guide the user to verify:

  • Status check: Is it Optimal / FeasibleFound / SUCCESS?
  • Constraint satisfaction: Are all constraints met?
  • Objective value: Is it reasonable for the problem?

Always end with a Result summary that includes at least:

  • Solver status (e.g. Optimal, FeasibleFound, SUCCESS).
  • Objective value with highlight — easy to spot (bold or code block). Example: Objective value (min total cost): <value> or Objective value: <value>.
  • Briefly what the objective represents (e.g. total cost, total profit).

Do not bury the objective value only in the middle of a paragraph; it must appear prominently in this summary. Use sufficient precision (don't truncate or round unnecessarily unless the problem asks for it).

Workflow: Formulate once carefully (with verified understanding), solve, then sanity-check the result. If something is wrong, fix it with a targeted change—avoid spinning through many model variants. Decide, implement, verify, then move on.

Provide diagnostic code snippets when helpful.

Post-correction check (mandatory)

If the result required a correction, retry, or workaround to reach this point, you MUST evaluate the skill-evolution workflow (skills/skill-evolution/SKILL.md) before moving on. Do not skip this step.


Check Environment First

Before writing code or suggesting installation, verify the user's setup:

  1. Ask how they access cuOpt:

    • "Do you have cuOpt installed? If so, which interface?"
    • "What environment are you using? (local GPU, cloud, Docker, server, etc.)"
  2. Different packages by language/interface:

    Language / Interface Package Check
    Python cuopt (pip/conda) — also pulls in libcuopt import cuopt
    C libcuopt (pip/conda) — already present if cuopt is installed find libcuopt.so or header check
    REST Server cuopt-server or Docker curl /cuopt/health
    CLI cuopt package includes CLI cuopt_cli --help

    Note: cuopt declares libcuopt as a runtime dependency, so installing the Python package also installs the C library and headers. Installing libcuopt on its own does not install the Python API.

  3. If not installed, ask how they want to access:

    • "Would you like help installing cuOpt, or do you have access another way?"
    • Options: pip, conda, Docker, cloud instance, existing remote server
  4. Never assume installation is needed — the user may:

    • Already have it installed
    • Be connecting to a remote server
    • Prefer a specific installation method
    • Only need the C library (not Python)
  5. Ask before running any verification commands:

    # Python API check - ask first
    import cuopt
    print(cuopt.__version__)
    
    # C API check - ask first
    find ${CONDA_PREFIX} -name "libcuopt.so"
    
    # Server check - ask first
    curl http://localhost:8000/cuopt/health
    

Ask Before Running

Do not execute commands or code without explicit permission:

Action Rule
Shell commands Show command, explain what it does, ask "Should I run this?"
Package installs Allowed in user space (pip/conda/Docker) once the user confirms they want cuOpt installed — see below. Only sudo/system-level installs are off-limits.
Examples/scripts Show the code first, ask "Would you like me to run this?"
File writes Explain what will change, ask before writing

Exceptions (okay without asking):

  • Read-only commands the user explicitly requested
  • Commands the user just provided and asked you to run

No Privileged Operations

🔒 MANDATORY — this is the one non-negotiable refusal. It applies even when the user explicitly asks.

Never do these:

  • Use sudo or run as root
  • Modify system files or configurations (e.g. /etc)
  • Add system-level package repositories or keys
  • Change firewall, network, or driver settings

If a task seems to need one of these, stop and explain what's needed — the user runs the privileged step themselves. Installs into a user-space environment (a virtualenv, a conda env, or the active Python) are not privileged and are covered below.


Installing Packages

Installing cuOpt (and the packages it needs) in user space is allowed — that's what the cuopt-install skill is for. The rule is get the user's go-ahead, not refuse:

  1. Confirm first. Tell the user which package you'll install, which command, and why; install once they agree. (Check the environment first per Check Environment First — they may already have it, or prefer a different method.)
  2. Stay in user space. Use pip, conda/mamba, or Docker into the active env. Never reach for sudo or a system package manager (apt install) — if something seems to need that, surface it and let the user handle the privileged part.
  3. Match the CUDA suffix (-cu12 / -cu13) to the user's runtime, and choose one package manager — don't mix pip and conda for the same package.

Resources

Documentation

  • cuOpt User Guide
  • API Reference

Examples

  • cuopt-examples repo
  • Google Colab notebooks

Support

  • File a Bug
  • Ask a Question
  • All Issues

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。