> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudthinker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# ロール別はじめてのプロンプト

> 自分のロールを選び、プロンプトをコピーして、約 10 分で自分のクラウド環境から実際の結果を得ましょう。

このチュートリアルを終える頃には、ライブ環境に対してロール固有のプロンプトを 1 つ実行し、フォローアップで精度を上げる方法を習得できます。**約 10 分**かかります。

<Info>
  **必要なもの:** 少なくとも 1 つのクラウド接続が設定されたワークスペース — 接続がなければエージェントは実際の結果を返せません。まだ設定していない場合は、先に [クイックスタート](/ja/quickstart) を完了してください。
</Info>

## 構文

エージェントには平易な言葉で話しかけてください。基本的なパターンは次のとおりです。

```text theme={null}
@agent #tool your request
```

* **`@agent`** — 担当エージェント: `@alex`（クラウド）、`@oliver`（セキュリティ）、`@tony`（データベース）、`@kai`（Kubernetes）、`@anna`（調整）。
* **`#tool`** *（省略可能）* — 出力の種類: `#dashboard`、`#report`、`#recommend`、`#alert`、`#chart`、`#kb`。
* **リクエスト内容** — 必要なことを自分の言葉で記述します。文脈情報はインラインで追記できます。

構文の詳細については、[CloudThinker 言語リファレンス](/ja/guide/language) を参照してください。

<Steps>
  <Step title="チャットを開く">
    [app.cloudthinker.io](https://app.cloudthinker.io) にサインインし、左サイドバーの **New chat** をクリックします。

    **成功状態:** 空の会話パネルが開き、`@` と入力するとエージェントピッカーが表示されます。
  </Step>

  <Step title="ロールのクイックウィンを実行する">
    自分のロールに合ったタブを選び、クイックウィンを貼り付けてから、出力の形を確認したらフォローアップを試してみましょう。

    <Tabs>
      <Tab title="クラウド / DevOps">
        **目標:** 使っていないクラウドへの支払いをやめる。1 分以内に無駄がどこにあるか確認する。

        **必要なもの:** [AWS](/ja/guide/connections/aws)、[Azure](/ja/guide/connections/azure)、または [GCP](/ja/guide/connections/gcp) 接続。エージェント: [@alex](/ja/guide/agents/alex)。

        **クイックウィン — アイドル状態および過剰プロビジョニングのリソースを見つける:**

        ```text theme={null}
        @alex find EC2 instances with <20% CPU utilization over the last 30 days, plus any unattached EBS volumes and unused Elastic IPs
        ```

        Alex がクラウド API を照会し、使用率メトリクスと結合して、月間節約見込み額付きのランク付きリストを返します。

        **フォローアップ:**

        ```text theme={null}
        @alex #recommend right-sizing for the top 5 by waste
        @alex #dashboard cost trend by service for this quarter
        @alex draft a reserved-instance plan for the stable workloads above
        ```
      </Tab>

      <Tab title="セキュリティ">
        **目標:** 監査担当者や攻撃者よりも先に最も危険な設定ミスを見つける。

        **必要なもの:** AWS、Azure、または GCP 接続。エージェント: [@oliver](/ja/guide/agents/oliver)。

        **クイックウィン — センシティブなポートへのパブリックアクセスを発見する:**

        ```text theme={null}
        @oliver list security groups with 0.0.0.0/0 access on database, SSH, or RDP ports across all regions
        ```

        Oliver がリソースオーナー、リージョン、重大度ランキング付きで違反ルールを返します。

        **フォローアップ:**

        ```text theme={null}
        @oliver #report SOC 2 compliance status with prioritized remediation
        @oliver audit IAM policies for privilege-escalation paths
        @oliver check for IMDSv1 instances or unencrypted EBS volumes
        ```
      </Tab>

      <Tab title="データベース">
        **目標:** 遅いと思っているクエリではなく、実際に問題を引き起こしているクエリを見つける。

        **必要なもの:** [PostgreSQL](/ja/guide/connections/postgresql) または [MySQL](/ja/guide/connections/mysql) 接続。エージェント: [@tony](/ja/guide/agents/tony)。

        **クイックウィン — 過去 24 時間で最も遅いクエリ:**

        ```text theme={null}
        @tony show the top 10 queries by total time over the last 24 hours on production PostgreSQL, with execution count and P95 latency
        ```

        Tony が `pg_stat_statements` (または相当するもの) から取得し、影響度でランク付けして、コストが集中している箇所を示します。

        **フォローアップ:**

        ```text theme={null}
        @tony #recommend indexes for the top 3 queries above
        @tony explain why query #2 isn't using the existing index
        @tony #dashboard query latency P95 trends by endpoint
        ```
      </Tab>

      <Tab title="Kubernetes">
        **目標:** 次の OOMKill や予算レビューの前に、ポッドが過剰・過小・アンバランスになっている箇所を把握する。

        **必要なもの:** [Kubernetes 接続](/ja/guide/connections/kubernetes)。エージェント: [@kai](/ja/guide/agents/kai)。

        **クイックウィン — クラスター全体のポッドリソースの無駄:**

        ```text theme={null}
        @kai analyze pod resource usage vs requests across all namespaces, surface the largest over- and under-provisioned workloads
        ```

        Kai がリクエスト / 制限と実際の使用量を結合し、ノードコストへの影響でデルタをランク付けします。

        **フォローアップ:**

        ```text theme={null}
        @kai #recommend HPA policies for the variable workloads above
        @kai find nodes with <30% utilization for consolidation
        @kai check for pods without resource limits or liveness probes
        ```
      </Tab>

      <Tab title="SRE / オンコール">
        **目標:** アラートから根本原因までの時間を短縮する。生のログではなく、構造化された調査を得る。

        **必要なもの:** [Pulse](/ja/guide/pulse/overview) が設定済みで、運用するシステムへの接続がある。調整用エージェント: [@anna](/ja/guide/agents/anna)。

        **クイックウィン — アクティブなアラートを調査する:**

        ```text theme={null}
        @anna investigate the current incident: pull related metrics, recent deploys, and topology, then propose the top 3 likely causes ranked by evidence
        ```

        Anna が関連する専門家に委任し、並行して証拠を収集し、行動できる仮説ラダーを返します。

        **フォローアップ:**

        ```text theme={null}
        @anna #report draft a postmortem from this conversation
        @anna pull the matching runbook and walk through the approval gates
        @anna check whether this pattern matches any past incident in memory
        ```
      </Tab>

      <Tab title="エンジニアリングリーダー">
        **目標:** 4 回のミーティングをスケジュールせずに、コスト、セキュリティ、パフォーマンス、信頼性を横断した統合ビューを得る。

        **必要なもの:** カバーしたいドメインの接続が設定済み。エージェント: [@anna](/ja/guide/agents/anna)。

        **クイックウィン — マルチエージェント四半期レビュー:**

        ```text theme={null}
        @anna coordinate a quarterly infrastructure review:
        - @alex top cost optimization opportunities and savings
        - @oliver security posture and compliance gaps
        - @tony database performance hotspots
        - @kai Kubernetes utilization and risk
        Consolidate into an executive summary with prioritized actions.
        ```

        Anna が委任し、収集し、重複を排除して、4 つのタブの代わりに 1 つのエグゼクティブブリーフを返します。

        **フォローアップ:**

        ```text theme={null}
        @anna #report quarterly business review in slide-deck format
        @anna track the open actions from last quarter — what shipped, what slipped
        @anna draft a roadmap that aligns cost reduction with reliability work
        ```
      </Tab>
    </Tabs>

    **成功状態:** エージェントが約 30 秒以内に返答し、一般的なベストプラクティスではなく、自分の環境で認識できるリソース、クエリ、またはルールを名指しします。
  </Step>

  <Step title="会話を洗練させる">
    エージェントは会話のコンテキストを保持するので、最初からやり直さずに結果の上に積み上げましょう:

    * **最初から具体的に。** 「us-east-1 の過去 30 日間の EC2 コスト」は「コストを見せて」より優れています。
    * **再開しないで、絞り込む。** 「上記の項目のうち RDS をドリルダウンして」で機能します。
    * **ツールを組み合わせる。** まず `#dashboard` で形を確認し、同じトピックのアクションに `#recommend` を使います。
    * **[Anna](/ja/guide/agents/anna) に調整を任せる。** 複数のドメインにまたがる場合は、`@anna` から始めて専門家を指定します。

    **成功状態:** フォローアップのプロンプトが、会話の前半の内容を再入力せずに参照した回答を返します。
  </Step>
</Steps>

## 完了の確認

* [x] ロールのクイックウィンが認識できるリソースやクエリを名指ししたした結果を返した
* [x] 少なくとも 1 つのフォローアッププロンプトが最初の回答を再入力せずにその上に構築された
* [x] `#dashboard`、`#report`、`#recommend` がどのような形の出力を生成するか予測できる

## 次のステップ

今実行したすべてのプロンプトは、[CloudThinker の仕組み](/#how-cloudthinker-works) で説明されている 検出 → 分析 → 解決 → 検証 ループの 1 パスです — 以下のモジュールはそのループを継続的に実行します。最初のモジュールを設定しましょう:

<CardGroup cols={2}>
  <Card title="Code Review" icon="code-pull-request" href="/ja/guide/code-review/setup">
    リポジトリを接続し、次のプルリクエストで @cloudthinker-ai からレビューコメントを受け取ります。
  </Card>

  <Card title="CostOps" icon="dollar-sign" href="/ja/guide/infrastructure/cloudkeepers">
    CloudKeepers をオンにして費用を継続的に監視し、節約機会を発見事項として提示します。
  </Card>

  <Card title="インシデント対応" icon="triangle-exclamation" href="/ja/guide/pulse/setup">
    Pulse にアラートをルーティングして、ターミナルを開く前にエージェントが調査します。
  </Card>

  <Card title="Skills" icon="wand-magic-sparkles" href="/ja/guide/skills/custom-skills">
    チームの手順をエージェントに教えて、チームのやり方で実行させます。
  </Card>
</CardGroup>
