All AEM as a Cloud Service skills: component development, Workflow model design, development, triggering, launchers, debugging, and triaging, Dispatcher config authoring, advisory, incident response, performance tuning, and security hardening, Rapid Development Environment (RDE) deployment, log inspection, snapshots, and troubleshooting via `aio aem rde`, Jackrabbit Oak query/index tuning (property, Lucene index definitions), and extracting/inventorying JCR queries (XPath, SQL2, QueryBuilder) across a codebase.
85%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
This pattern is executed by the code-assessment runbook — follow
../references/runbook.mdfor the full flow. This skill supplies the detection + recipe the runbook applies.
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.
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.createQuery / PredicateGroup.create).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.)Detection is performed by the analyzer (../scripts/analyze.sh), run by the runbook:
bash ../scripts/analyze.sh <workspace-root> --pattern tuning-oak-query-indexesMatch 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:
createQuery — JCR QueryManager.createQuery(...) and AEM QueryBuilder
builder.createQuery(...).getQueryManager — the JCR query entry point (Workspace.getQueryManager()).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.
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:
.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).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).fix: guided — never auto-apply: write the
corrected definition out for the developer to review and apply.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.
The skill never commits and never applies an index change to a live instance. See
../references/runbook.md for the full flow and handoff.
.tessl-plugin
skills
aem-rde
aem-workflow
code-assessment
content-distribution
create-component
assets
references
dispatcher
incident-response
references
dispatcher-foundation
performance-tuning
references
dispatcher-foundation
security-hardening
references
dispatcher-foundation
technical-advisory
references
dispatcher-foundation
workflow-orchestrator
references
dispatcher-foundation
ensure-agents-md
references
migration
references
dispatcher
legacy-ui
template-modernization
validation
scripts
dispatcher-tool
validate-migration