Skip to content

AI Genie

AI Genie は AI を使ってテキストを変換するプロンプトテンプレートです。テキストを選択して Genie を呼び出し、提案された変更をレビューする — すべてエディタを離れることなく。

クイックスタート

  1. 設定 > 統合 で AI プロバイダーを設定する(AI プロバイダーを参照)
  2. エディタでテキストを選択する
  3. Mod + Y を押して Genie ピッカーを開く
  4. Genie を選択するかフリーフォームのプロンプトを入力する
  5. インライン提案をレビューする — 承認または拒否

Genie ピッカー

Mod + Y(またはメニュー ツール > AI Genie)を押すと、単一の統合入力を持つスポットライトスタイルのオーバーレイが開きます。

検索とフリーフォーム — 入力を開始すると、名前、説明、またはカテゴリで Genie がフィルタリングされます。Genie が一致しない場合、入力フィールドはフリーフォームのプロンプトフィールドになります。

クイックチップ — スコープが「selection」で入力が空の場合、よく使われるアクション(Polish、Condense、Grammar、Rephrase)のワンクリックボタンが表示されます。

2 段階フリーフォーム — Genie が一致しない場合、Enterを一度押して確認ヒントを確認し、再度Enterを押して AI プロンプトとして送信します。これにより誤送信を防ぎます。

スコープ切り替えTabを押してスコープを切り替えます: selection → block → document → all。

プロンプト履歴 — フリーフォームモード(一致する Genie なし)では、ArrowUp / ArrowDownで過去のプロンプトを循環できます。Ctrl + Rで検索可能な履歴ドロップダウンを開きます。ゴーストテキストで最近一致するプロンプトがグレーのヒントとして表示されます — Tabで受け入れます。

処理フィードバック

Genie を選択するかフリーフォームのプロンプトを送信すると、ピッカーにインラインフィードバックが表示されます:

  • 処理中 — 経過時間カウンター付きの思考中インジケーター。Escapeでキャンセル。
  • プレビュー — AI の応答がリアルタイムでストリーミングされます。Acceptで適用、Rejectで破棄。
  • エラー — 問題が発生した場合、Retryボタン付きでエラーメッセージが表示されます。

ステータスバーにも AI の進捗状況が表示されます — 実行中は経過時間付きのスピンアイコン、成功時は短い「Done」フラッシュ、エラーインジケーターと Retry/Dismiss ボタン。ステータスバーはF7で非表示にしていても、AI がアクティブな状態になると自動的に表示されます。

組み込み Genie

VMark には 4 つのカテゴリにわたる 13 の Genie が搭載されています:

編集

Genie説明スコープ
Polish明確さとフローを改善するSelection
Condenseテキストをより簡潔にするSelection
Fix Grammar文法とスペルを修正するSelection
Simplifyよりシンプルな表現を使うSelection

クリエイティブ

Genie説明スコープ
Expandアイデアをより豊かな文章に発展させるSelection
Rephrase同じことを別の言い方で表現するSelection
Vivid感覚的な詳細とイメージを追加するSelection
Continueここから書き続けるBlock

構造

Genie説明スコープ
Summarizeドキュメントを要約するDocument
Outlineアウトラインを生成するDocument
Headlineタイトルオプションを提案するDocument

ツール

Genie説明スコープ
Translate英語に翻訳するSelection
Rewrite in Englishテキストを英語で書き直すSelection

スコープ

各 Genie は 3 つのスコープのいずれかで動作します:

  • Selection — ハイライトされたテキスト。何も選択されていない場合、現在のブロックにフォールバックします。
  • Block — カーソル位置の段落またはブロック要素。
  • Document — ドキュメント全体のコンテンツ。

スコープはとして AI に渡すテキストの抽出範囲を決定します。

TIP

スコープが Selection でも何も選択されていない場合、Genie は現在の段落で動作します。

提案のレビュー

Genie が実行されると、提案がインラインに表示されます:

  • Replace — 取り消し線付きの元のテキスト、緑色の新しいテキスト
  • Insert — ソースブロックの後に緑色で表示される新しいテキスト
  • Delete — 取り消し線付きの元のテキスト

各提案には承認(チェックマーク)と拒否(X)ボタンがあります。

キーボードショートカット

アクションショートカット
提案を承認Enter
提案を拒否Escape
次の提案Tab
前の提案Shift + Tab
すべて承認Mod + Shift + Enter
すべて拒否Mod + Shift + Escape

ステータスバーインジケーター

AI が生成中、ステータスバーには経過時間カウンター付きのスピンするスパークルアイコン(「Thinking... 3s」)が表示されます。キャンセルボタン(×)でリクエストを停止できます。

完了後、3 秒間短い「Done」チェックマークが点滅します。エラーが発生した場合、ステータスバーに Retry と Dismiss ボタン付きでエラーメッセージが表示されます。

ステータスバーはF7で非表示にしていても、AI がアクティブな状態(実行中、エラー、または成功)になると自動的に表示されます。


カスタム Genie の作成

独自の Genie を作成できます。各 Genie は YAML フロントマターとプロンプトテンプレートを持つ単一の Markdown ファイルです。

Genie の保存場所

Genie はアプリケーションデータディレクトリに保存されます:

プラットフォームパス
macOS~/Library/Application Support/com.vmark.app/genies/
Windows%APPDATA%\com.vmark.app\genies\
Linux~/.local/share/com.vmark.app/genies/

メニュー ツール > Genie フォルダを開く からこのフォルダを開きます。

ディレクトリ構造

サブディレクトリはピッカーの カテゴリ になります。好きなように Genie を整理できます:

genies/
├── editing/
│   ├── polish.md
│   ├── condense.md
│   └── fix-grammar.md
├── creative/
│   ├── expand.md
│   └── rephrase.md
├── academic/          ← カスタムカテゴリ
│   ├── cite.md
│   └── abstract.md
└── my-workflows/      ← 別のカスタムカテゴリ
    └── blog-intro.md

ファイル形式

すべての Genie ファイルには 2 つの部分があります: フロントマター(メタデータ)と テンプレート(プロンプト)。

markdown
---
description: Improve clarity and flow
scope: selection
category: editing
---

You are an expert editor. Improve the clarity, flow, and conciseness
of the following text while preserving the author's voice and intent.

Return only the improved text — no explanations.

{{content}}
```---
description: Improve clarity and flow
scope: selection
category: editing
---

You are an expert editor. Improve the clarity, flow, and conciseness
of the following text while preserving the author's voice and intent.

Return only the improved text — no explanations.

{{content}}

ファイル名polish.mdはピッカーで「Polish」という表示名になります。

フロントマターフィールド

フィールド必須デフォルト
descriptionいいえピッカーに表示される短い説明
scopeいいえselectionblockdocumentselection
categoryいいえグループ化のカテゴリ名サブディレクトリ名
actionいいえreplaceinsertreplace
contextいいえ120(なし)
modelいいえプロバイダーのデフォルトを上書きするモデル識別子プロバイダーのデフォルト

Genie 名 — 表示名は常に ファイル名.mdなし)から取得されます。例: fix-grammar.mdはピッカーで「Fix Grammar」と表示されます。表示名を変更するにはファイル名を変更します。

プレースホルダー

プレースホルダーはすべての Genie の核心です。Genie が実行されると、VMark は:

  1. スコープに基づいてテキストを 抽出 する(選択テキスト、現在のブロック、またはドキュメント全体)
  2. テンプレート内のすべてのを抽出されたテキストで 置換 する
  3. 入力されたプロンプトをアクティブな AI プロバイダーに 送信 する
  4. 応答をインライン提案としてストリームで 返す

例えば、このテンプレートの場合:

markdown
Translate the following text into French.

{{content}}

ユーザーが「Hello, how are you?」を選択した場合、AI は次を受け取ります:

Translate the following text into French.

Hello, how are you?

AI は「Bonjour, comment allez-vous ?」と応答し、選択されたテキストを置き換えるインライン提案として表示されます。

プレースホルダー

プレースホルダーは、AI に読み取り専用の周辺テキストを提供します — これにより、近くのブロックを変更せずにトーン、スタイル、構造を合わせることができます。

仕組み:

  1. フロントマターでcontext: 1またはcontext: 2を設定して±1 または±2 の隣接ブロックを含める
  2. テンプレート内の周辺テキストを挿入したい場所にを使用する
  3. AI はコンテキストを見ますが、提案はのみを置き換えます

複合ブロックはアトミック — 隣接ブロックがリスト、テーブル、引用ブロック、または details ブロックの場合、構造全体が 1 つのブロックとしてカウントされます。

スコープ制限 — コンテキストはselectionblockスコープでのみ機能します。documentスコープの場合、コンテンツはすでにドキュメント全体です。

フリーフォームプロンプト — ピッカーでフリーフォームの指示を入力すると、VMark はselectionblockスコープに対して自動的に±1 の周辺ブロックをコンテキストとして含めます。設定は不要です。

後方互換性のない Genie は以前と同様に動作します。テンプレートにが含まれていない場合、周辺テキストは抽出されません。

例 — AI が受け取るもの:

context: 1を設定し、3 段落のドキュメントの 2 番目の段落にカーソルがある場合:

[Before]
First paragraph content here.

[After]
Third paragraph content here.

その方向に隣接するブロックがない場合(例: コンテンツがドキュメントの先頭または末尾にある場合)、[Before][After]セクションは省略されます。

actionフィールド

デフォルトでは、Genie はソーステキストを 置き換え ます。action: insertを設定すると、代わりにソースブロックの後に出力を 追加 します。

replaceの使用: 編集、言い換え、翻訳、文法修正 — 元のテキストを変換するもの全般。

insertの使用: 続きを書く、コンテンツの下に要約を生成する、コメントを追加する — 元のテキストを削除せずに新しいテキストを追加するもの全般。

例 — insert アクション:

markdown
---
description: Continue writing from here
scope: block
action: insert
---

Continue writing naturally from where the following text leaves off.
Match the author's voice, style, and tone. Write 2-3 paragraphs.

Do not repeat or summarize the existing text — just continue it.

{{content}}
```---
description: Continue writing from here
scope: block
action: insert
---

Continue writing naturally from where the following text leaves off.
Match the author's voice, style, and tone. Write 2-3 paragraphs.

Do not repeat or summarize the existing text — just continue it.

{{content}}

modelフィールド

特定の Genie のデフォルトモデルを上書きします。シンプルなタスクには安価なモデル、複雑なタスクにはより強力なモデルを使いたい場合に便利です。

markdown
---
description: Quick grammar fix (uses fast model)
scope: selection
model: claude-haiku-4-5-20251001
---

Fix grammar and spelling errors. Return only the corrected text.

{{content}}
```---
description: Quick grammar fix (uses fast model)
scope: selection
model: claude-haiku-4-5-20251001
---

Fix grammar and spelling errors. Return only the corrected text.

{{content}}

モデル識別子は、アクティブなプロバイダーが受け付けるものと一致する必要があります。

効果的なプロンプトの書き方

出力形式を具体的に指定する

AI に何を返すべきか正確に伝えます。これがないと、モデルは説明、ヘッダー、またはコメントを追加する傾向があります。

markdown
<!-- Good -->
Return only the improved text — no explanations.

<!-- Bad — AI may wrap output in quotes, add "Here's the improved version:", etc. -->
Improve this text.

役割を設定する

AI に動作の軸となるペルソナを与えます。

markdown
<!-- Good -->
You are an expert technical editor who specializes in API documentation.

<!-- Okay but less focused -->
Edit the following text.

スコープを制約する

AI が変更すべきでないものを伝えます。これにより過剰な編集を防ぎます。

markdown
<!-- Good -->
Fix grammar and spelling errors only.
Do not change the meaning, style, or tone.
Do not restructure sentences.

<!-- Bad — gives the AI too much freedom -->
Fix this text.

プロンプトで Markdown を使う

プロンプトテンプレートで Markdown 書式を使えます。AI に構造化された出力を生成させたい場合に役立ちます。

markdown
---
description: Generate a pros/cons analysis
scope: selection
action: insert
---

Analyze the following text and produce a brief pros/cons list.

Format as:

**Pros:**
- point 1
- point 2

**Cons:**
- point 1
- point 2

{{content}}
```---
description: Generate a pros/cons analysis
scope: selection
action: insert
---

Analyze the following text and produce a brief pros/cons list.

Format as:

**Pros:**
- point 1
- point 2

**Cons:**
- point 1
- point 2

{{content}}

プロンプトを集中させる

1 つの Genie、1 つの仕事。複数のタスクを 1 つの Genie にまとめないで — 代わりに別々の Genie を作成してください。

markdown
<!-- Good — one clear job -->
---
description: Convert to active voice
scope: selection
---

Rewrite the following text using active voice.
Do not change the meaning.
Return only the rewritten text.

{{content}}
```---
description: Convert to active voice
scope: selection
---

Rewrite the following text using active voice.
Do not change the meaning.
Return only the rewritten text.

{{content}}

カスタム Genie の例

学術 — アブストラクトの作成

markdown
---
description: Generate an academic abstract
scope: document
action: insert
---

Read the following paper and write a concise academic abstract
(150-250 words). Follow standard structure: background, methods,
results, conclusion.

{{content}}
```---
description: Generate an academic abstract
scope: document
action: insert
---

Read the following paper and write a concise academic abstract
(150-250 words). Follow standard structure: background, methods,
results, conclusion.

{{content}}

ブログ — フックの生成

markdown
---
description: Write an engaging opening paragraph
scope: document
action: insert
---

Read the following draft and write a compelling opening paragraph
that hooks the reader. Use a question, surprising fact, or vivid
scene. Keep it under 3 sentences.

{{content}}
```---
description: Write an engaging opening paragraph
scope: document
action: insert
---

Read the following draft and write a compelling opening paragraph
that hooks the reader. Use a question, surprising fact, or vivid
scene. Keep it under 3 sentences.

{{content}}

コード — コードブロックの説明

markdown
---
description: Add a plain-English explanation above code
scope: selection
action: insert
---

Read the following code and write a brief plain-English explanation
of what it does. Use 1-2 sentences. Do not include the code itself
in your response.

{{content}}
```---
description: Add a plain-English explanation above code
scope: selection
action: insert
---

Read the following code and write a brief plain-English explanation
of what it does. Use 1-2 sentences. Do not include the code itself
in your response.

{{content}}

メール — プロフェッショナルな表現に

markdown
---
description: Rewrite in professional tone
scope: selection
---

Rewrite the following text in a professional, business-appropriate tone.
Keep the same meaning and key points. Remove casual language,
slang, and filler words.

Return only the rewritten text — no explanations.

{{content}}
```---
description: Rewrite in professional tone
scope: selection
---

Rewrite the following text in a professional, business-appropriate tone.
Keep the same meaning and key points. Remove casual language,
slang, and filler words.

Return only the rewritten text — no explanations.

{{content}}

翻訳 — 簡体字中国語へ

markdown
---
description: Translate to Simplified Chinese
scope: selection
---

Translate the following text into Simplified Chinese.
Preserve the original meaning, tone, and formatting.
Use natural, idiomatic Chinese — not word-for-word translation.

Return only the translated text — no explanations.

{{content}}
```---
description: Translate to Simplified Chinese
scope: selection
---

Translate the following text into Simplified Chinese.
Preserve the original meaning, tone, and formatting.
Use natural, idiomatic Chinese — not word-for-word translation.

Return only the translated text — no explanations.

{{content}}

コンテキスト対応 — 周辺に合わせる

markdown
---
description: Rewrite to match surrounding tone and style
scope: selection
context: 1
---

Rewrite the following content to fit naturally with its surrounding context.
Match the tone, style, and level of detail.

Return only the rewritten text — no explanations.

## Surrounding context (do not include in output):
{{context}}

## Content to rewrite:
{{content}}
```---
description: Rewrite to match surrounding tone and style
scope: selection
context: 1
---

Rewrite the following content to fit naturally with its surrounding context.
Match the tone, style, and level of detail.

Return only the rewritten text — no explanations.

## Surrounding context (do not include in output):
{{context}}

## Content to rewrite:
{{content}}

レビュー — ファクトチェック

markdown
---
description: Flag claims that need verification
scope: selection
action: insert
---

Read the following text and list any factual claims that should be
verified. For each claim, note why it might need checking (e.g.,
specific numbers, dates, statistics, or strong assertions).

Format as a bullet list. If everything looks solid, say
"No claims flagged for verification."

{{content}}
```---
description: Flag claims that need verification
scope: selection
action: insert
---

Read the following text and list any factual claims that should be
verified. For each claim, note why it might need checking (e.g.,
specific numbers, dates, statistics, or strong assertions).

Format as a bullet list. If everything looks solid, say
"No claims flagged for verification."

{{content}}

制限事項

  • Genie は WYSIWYG モードでのみ動作します。ソースモードでは、その説明のトースト通知が表示されます。
  • 同時に 1 つの Genie しか実行できません。AI がすでに生成中の場合、ピッカーは別の Genie を開始しません。
  • プレースホルダーは文字通りに置換されます — 条件分岐やループはサポートされていません。
  • scope: documentを使用すると、非常に大きなドキュメントはプロバイダーのトークン制限に達する場合があります。

トラブルシューティング

「AI プロバイダーが利用できません」 — 設定 > 統合を開いてプロバイダーを設定してください。AI プロバイダーを参照。

Genie がピッカーに表示されない — ファイルに.md拡張子があり、---フェンス付きの有効なフロントマターがあり、Genie ディレクトリ(1 レベル以上深いサブディレクトリではなく)にあることを確認してください。

AI がゴミか、エラーを返す — API キーが正しく、モデル名がプロバイダーに有効であることを確認してください。エラーの詳細はターミナル/コンソールを確認してください。

提案が期待と一致しない — プロンプトを改善してください。制約(「テキストのみを返す」、「説明しない」)を追加し、役割を設定するか、スコープを絞り込んでください。

関連情報