Tuning Oak Query Indexesのロゴ

Tuning Oak Query Indexes

組織
adobe
tuning-oak-query-indexes

AEM Cloud Service expert skill — check a JCR/Oak query is actually served by an index and, when it is not, propose the property/Lucene index-definition change so the query is answered by the index instead of in-memory filtering or sorting. Use for "query is slow", "traversal warning", "is my query indexed", "tune oak index", or a scan that flags a JCR/QueryBuilder query. The analyzer locates every query-construction site (createQuery, getQueryManager, Sling findResources / queryResources, PredicateGroup.create / new PredicateGroup); the recipe assesses each flagged query against the supplied index definition(s). Resolution is user-supplied: the index definition(s) are required input — if none is provided the whole pattern is deferred, never guessed. Guided fix — the developer reviews and applies the proposed index change; never auto-apply.

概要

公開者adobe
リポジトリskills
スキル名tuning-oak-query-indexes
スター
298
フォーク
92
同梱ファイル
3
ライセンスApache-2.0
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 3個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/adobe/skills/tree/main/plugins/aem/cloud-service/skills/code-assessment/tuning-oak-query-indexes
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/adobe/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/plugins/aem/cloud-service/skills/code-assessment/tuning-oak-query-indexes .claude/skills/tuning-oak-query-indexes
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

関連するリクエストがあるとすぐに、モデルが自動的にTuning Oak Query Indexesを読み込みます。

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

Tuning Oak query indexes — AEM as a Cloud Service

This pattern is executed by the code-assessment runbook — follow ../references/runbook.md for the full flow. This skill supplies the detection + recipe the runbook applies.

Overview

An Oak query only uses an index for the parts the index actually covers. Any WHERE/ORDER BY/fulltext field without a matching, correctly-flagged property definition gets evaluated node-by-node in memory — same for a wrong nodetype or path scope, even if every field is indexed. An uncovered query traverses the repository: slow, traversal-warning-logged, and a load risk at scale. This pattern finds exactly which fields/conditions aren't covered and what index-definition change fixes each one.

Classification — confirm this pattern applies

  • A JCR/QueryBuilder query is slow, logs a traversal/TraversingIndex warning, or you're adding/changing a query and need to confirm it's served by an index rather than in-memory filtering or sorting.
  • The user asks "is my query indexed", "tune the oak index", "why is this query slow", or a scan flagged a query-construction site (createQuery / PredicateGroup.create).
  • Not this pattern: an explicitly unbounded query (p.limit=-1 / setLimit(-1)) — that's unbounded-query; this pattern is about index coverage, not result-set size. (A query can be both — assess index coverage here, bound it there.)

Discovery

Detection is performed by the analyzer (../scripts/analyze.sh), run by the runbook:

bash
bash ../scripts/analyze.sh <workspace-root> --pattern tuning-oak-query-indexes

Match criteria (what the detector flags) — query-construction sites, matched on written names (parse-level, no type resolution). These mirror the Java-API anchors the folded extracting JCR queries guide used, so moving detection from grep to code keeps the same capture:

  • any invocation named createQuery — JCR QueryManager.createQuery(...) and AEM QueryBuilder builder.createQuery(...).
  • any invocation named getQueryManager — the JCR query entry point (Workspace.getQueryManager()).
  • any invocation named findResources or queryResources — the Sling ResourceResolver query APIs, which run a real indexed repository query.
  • PredicateGroup.create(...) (a create invocation whose receiver's trailing simple name is PredicateGroup) and new PredicateGroup(...) — QueryBuilder predicate-group construction.

One finding per distinct source line, with the call as the snippet. The detector locates where queries are built; it does not judge coverage — that requires the query text (read the surrounding code) and the index definition(s) (see Resolution contract).

Known limits (out of a parse-level Java detector's reach — use the extracting guide's manual fallback): non-Java queries (XPath/SQL2 in JSP/HTL/config, stored dam:query / Smart-Collection predicate strings, query-string form) and queries hidden behind a non-JCR wrapper method whose body has no direct query call.

Resolution contract

user-supplied — the required input is the Oak/Lucene index definition(s) the query could use. The whole assessment is a comparison of the query against its candidate index definition(s), so:

  • Required input — the index definition(s). This skill does not run without them. Accept any of: a FileVault .content.xml under an /apps/.../install package, a JSON export, or the live dump at GET /system/console/status-oak-index-defn.json (admin auth).
  • If no index definition is available, DEFER THE WHOLE PATTERN with a single line — e.g. tuning-oak-query-indexes: deferred — index definition not provided. Do not emit a per-query skip for every finding, and do not emit a coverage assessment from the query alone (a guess reads as a finding and gets acted on as one).
  • When index definitions ARE supplied, assess each flagged query's coverage and propose the index-definition change where a field is uncovered. fix: guided — never auto-apply: write the corrected definition out for the developer to review and apply.

Recipe

Read recipe.md in full before assessing or proposing any change: the input contract, the Section A/B segregation, the field-construct → required-flag table, the two scoping gotchas, the index-size/storage pitfalls, the common mistakes, the target-index selection, explain verification, and the two-section report shape. Ground truth for every claim is the bundled AI agent indexing guide; build a query inventory from scratch with the bundled extracting JCR queries guide.

Handoff

The skill never commits and never applies an index change to a live instance. See ../references/runbook.md for the full flow and handoff.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Tuning Oak Query Indexes」では何ができますか?

AEM Cloud Service expert skill — check a JCR/Oak query is actually served by an index and, when it is not, propose the property/Lucene index-definition change so the query is answered by the index instead of in-memory filtering or sorting. Use for "query is slow", "traversal warning", "is my query indexed", "tune oak index", or a scan that flags a JCR/QueryBuilder query. The analyzer locates every query-construction site (createQuery, getQueryManager, Sling findResources / queryResources, PredicateGroup.create / new PredicateGroup); the recipe assesses each flagged query against the supplie...

TypingMindでTuning Oak Query Indexesを使うメリットは何ですか?

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

TypingMindにTuning Oak Query Indexesをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/adobe/skills/tree/main/plugins/aem/cloud-service/skills/code-assessment/tuning-oak-query-indexesを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Tuning Oak Query Indexesを使えるAIモデルはどれですか?

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

Tuning Oak Query Indexesで使えるAIモデルの数に制限はありますか?

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

AIスキル「Tuning Oak Query Indexes」は無料ですか?

はい。adobeがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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