Agent skill

Orchardcore Query Indexing

by OrchardCMS in OrchardCMS/OrchardCore

Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search.

BSD-3-ClauseAuto-check passedDatabases

Install Orchardcore Query Indexing

skills CLI
$ npx skills add OrchardCMS/OrchardCore --skill orchardcore-query-indexing -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OrchardCMS/OrchardCore orchardcore-query-indexing --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OrchardCMS/OrchardCore.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/orchardcore-query-indexing .claude/skills/orchardcore-query-indexing && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
orchardcore-query-indexing
GitHub stars
8.2k
Token cost
~1.8k tokens
SKILL.md length
500 words
Files
2 (incl. references)
Skills in repo
17
Repo updated
First seen
Licence
BSD-3-Clause

At a glance

Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search.

  • Works in 7 steps: Pick a source → Create via recipe or manager → Execute → …
  • The user needs to define a query
  • SKILL.md covers Decide what you need, Workflow A: define and run a…, Workflow B: index content for… and Quick Reference, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Orchardcore Query Indexing is an agent skill from OrchardCMS/OrchardCore. Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search. Use when the user needs to define a query, index content for search, write an index handler, register an indexing source, or add query/index recipe steps.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/indexing.md`).

It sits in Databases, covering Search implementation and SQL. It works with SQL and Elasticsearch. The repository describes itself as: Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework. The licence is BSD-3-Clause.

When your agent uses it

  • The user needs to define a query
  • Index content for search
  • Write an index handler
  • Register an indexing source

Example prompts

  • “Use the orchardcore-query-indexing skill to work with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles…”
  • “/orchardcore-query-indexing”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Pick a source
  2. Create via recipe or manager
  3. Execute
  4. Create an index profile
  5. Index custom part/field data
  6. Register the handler
  7. Reset / rebuild

What it can do on your machine

Read from SKILL.md and the folder at commit bfbe92f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are csharp and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Orchardcore Query Indexing loads about 1.8k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 500 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OrchardCMS/OrchardCore at commit bfbe92f, republished under its BSD-3-Clause licence (© OrchardCMS). 500 words, ~1,814 tokens.

Download SKILL.mdSave it as .claude/skills/orchardcore-query-indexing/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
orchardcore-query-indexing
description
Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search. Use when the user needs to define a query, index content for search, write an index handler, register an indexing source, or add query/index recipe steps.

OrchardCore Query & Indexing

This skill guides you through OrchardCore's query and indexing systems following project conventions.

Two distinct systems, often confused:

  • Queries (OrchardCore.Queries) — named, stored queries executed on demand (SQL, Lucene, Elasticsearch sources). Return raw rows or content items.
  • Indexing (OrchardCore.Indexing + providers) — build full-text index profiles that mirror content into Lucene/Elasticsearch/Azure AI Search for searching. Driven by index handlers.

Separate again from YesSql SQL index tables (MapIndex + SchemaBuilder) — those are relational indexes for fast DB queries, covered by the orchardcore-data-migration skill, not here.

Decide what you need

GoalSystem
Run a stored SQL/Lucene query, expose via GraphQL/APIQueries
Make content searchable (full-text)Indexing (index profile + provider)
Index a custom part/field's data into searchIContentPartIndexHandler / IContentFieldIndexHandler
Fast relational lookup by a columnYesSql MapIndex → see orchardcore-data-migration
Run a search box over an indexSearch (ISearchService)

Workflow A: define and run a query

Step 1: Pick a source

Query has Name, Source (Sql/Lucene/Elasticsearch), ReturnContentItems, and source-specific metadata (e.g. a SQL Template).

Step 2: Create via recipe or manager

Recipe step:

json
{
  "name": "queries",
  "Queries": [
    {
      "Source": "Sql",
      "Name": "RecentPosts",
      "Template": "select DocumentId from ContentItemIndex where ContentType = 'BlogPost'",
      "ReturnContentItems": true
    }
  ]
}

Programmatically:

csharp
var query = await _queryManager.NewAsync("Sql", data);
await _queryManager.SaveAsync(query);
Step 3: Execute
csharp
var query = await _queryManager.GetQueryAsync("RecentPosts");
var results = await _queryManager.ExecuteQueryAsync(query, new Dictionary<string, object>
{
    ["maxResults"] = 10,
});
foreach (var item in results.Items) { /* JsonObject or ContentItem */ }

SQL templates are Liquid-rendered (parameters become Liquid vars), parsed by SqlParser, then run via Dapper. ReturnContentItems = true loads ContentItems by DocumentId; otherwise rows are returned as JsonObject.

Step 1: Create an index profile

A profile binds a provider (Lucene/Elasticsearch/AzureAISearch) + a type (Content) + which content types to index.

json
{
  "name": "CreateOrUpdateIndexProfile",
  "indexes": [
    {
      "Name": "BlogPostsLucene",
      "IndexName": "blogposts",
      "ProviderName": "Lucene",
      "Type": "Content",
      "Properties": {
        "ContentIndexMetadata": {
          "IndexLatest": false,
          "IndexedContentTypes": [ "BlogPost" ],
          "Culture": "any"
        },
        "LuceneIndexMetadata": { "AnalyzerName": "standard", "StoreSourceData": true }
      }
    }
  ]
}

Content changes raise indexing tasks; ContentIndexingService resolves the content item and calls every part/field index handler to build a DocumentIndex, which the provider stores.

Step 2: Index custom part/field data

For a custom part, implement ContentPartIndexHandler<TPart>:

csharp
public class AliasPartIndexHandler : ContentPartIndexHandler<AliasPart>
{
    public override Task BuildIndexAsync(AliasPart part, BuildPartIndexContext context)
    {
        var options = DocumentIndexOptions.Keyword | DocumentIndexOptions.Store;
        foreach (var key in context.Keys)
        {
            context.DocumentIndex.Set(key, part.Alias, options);
        }
        return Task.CompletedTask;
    }
}

Fields use ContentFieldIndexHandler<TField> with BuildFieldIndexContext. context.Keys are the index field names to populate; DocumentIndexOptions flags control storage:

FlagEffect
Storekeep the value retrievable from the index
Keywordindex as a non-analyzed keyword (exact match)
Sanitizestrip HTML before indexing
Noneanalyzed full-text (default text)
Show full SKILL.md (194 more words)Show less
Step 3: Register the handler
csharp
services.AddScoped<IContentPartIndexHandler, AliasPartIndexHandler>();
// field:
services.AddScoped<IContentFieldIndexHandler, MyFieldIndexHandler>();
Step 4: Reset / rebuild

Recipe steps ResetIndex (re-sync from last position) and RebuildIndex (drop + rebuild) manage existing indexes. The admin Search/Indexing UI exposes the same.

Quick Reference

Query APIs
TypeMember
IQueryManagerNewAsync, SaveAsync, GetQueryAsync, ExecuteQueryAsync, ListQueriesAsync
IQuerySourceName, ExecuteQueryAsync(query, parameters) — implement to add a source
IQueryResultsIEnumerable<object> Items
Indexing APIs
TypeMember
IIndexProfileManagerNewAsync, CreateAsync, UpdateAsync, FindByNameAsync, SynchronizeAsync, ResetAsync
IDocumentIndexHandlerBuildIndexAsync, DocumentsAddedOrUpdatedAsync, DocumentsDeletedAsync
IContentPartIndexHandler / IContentFieldIndexHandlerBuildIndexAsync(...) to populate DocumentIndex
IIndexManager (per provider)CreateAsync, RebuildAsync, DeleteAsync, ExistsAsync
IDocumentIndexManagerAddOrUpdateDocumentsAsync, DeleteDocumentsAsync
DocumentIndexSet(name, value, options) overloads; Types enum
Register an indexing source
csharp
services.AddIndexingSource<TIndexManager, TDocumentIndexManager, TIndexNameProvider>(
    providerName, implementationType);
// e.g. the Lucene module: services.AddLuceneIndexingSource(implementationType);

ISearchService.SearchAsync(IndexProfile index, string term, int start, int size) → SearchResult. Providers: OrchardCore.Search.Lucene, .Elasticsearch, .AzureAI.

Gotchas

  • "Index" is overloaded: full-text index profiles (this skill) vs YesSql MapIndex tables (orchardcore-data-migration). Don't mix them.
  • Query recipe step is queries; index profile step is CreateOrUpdateIndexProfile. Older lucene-index / ElasticIndexSettings steps are deprecated — prefer CreateOrUpdateIndexProfile.
  • IndexLatest: true indexes draft (latest) versions; false indexes published. Match to your search UI.
  • SQL query Template is Liquid first, then SQL — parameters are Liquid variables, not ADO placeholders.

References

  • references/indexing.md — index profiles, handlers, DocumentIndex, providers, recipe steps
  • src/docs/reference/modules/Queries/README.md (repo)
  • src/docs/reference/modules/Indexing/README.md (repo)
  • src/docs/reference/modules/{Lucene,Elasticsearch,SQLIndexing}/README.md (repo)
  • AGENTS.md (repo root) — build commands

© OrchardCMS, BSD-3-Clause. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .agents/skills/orchardcore-query-indexing of OrchardCMS/OrchardCore.

  • SKILL.md
  • references/indexing.md

Open the folder on GitHubat commit bfbe92f

Compare with similar skills

Orchardcore Query Indexing next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Orchardcore Query Indexing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Orchardcore Query Indexing this skillOrchardCMS/OrchardCore8.2k—~1.8kAutomated safety check: PassBSD-3-Clause
Postgrestimescale/pg-aiguide1.9k—~941Automated safety check: PassApache-2.0
Pp Pokeapimvanhorn/printing-press-library2.1k—~7.6kAutomated safety check: NotesApache-2.0
Nuxt Contentsecondsky/claude-skills227—~4.3kAutomated safety check: PassMIT
SQL Database Support for pRESTprest/prest4.6k—~1.6kAutomated safety check: PassMIT
Crudwujun728/jun_java_plugin239—~2.8kAutomated safety check: PassNone

Similar skills

  • Postgres

    timescale/pg-aiguide

    A skill your agent uses for any PostgreSQL database work — table design, indexing, data types, constraints, extensions (pgvector, PostGIS, TimescaleDB), search, and migrations.

    1.9k GitHub stars~941 tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Pp Pokeapi

    mvanhorn/printing-press-library

    PokéAPI as a fully offline Pokédex with SQL, full-text search, type math, and a damage calculator no other Pokémon tool ships as a CLI.

    2.1k GitHub stars~7.6k tokensUpdated today
    Backend & APIsAuto-check: notes
  • Nuxt Content

    secondsky/claude-skills

    Nuxt Content v3 Git-based CMS for Markdown/MDC content sites.

    227 GitHub stars~4.3k tokensUpdated 12 days ago
    Frontend & DesignAuto-check passed
  • Guides classifying, gap-analyzing and scaffolding support for a new SQL database in pREST, from Postgres-compatible variants to entirely new dialects.

    4.6k GitHub stars~1.6k tokensUpdated today
    DatabasesAuto-check passed
  • Crud

    wujun728/jun_java_plugin

    一键生成完整业务模块代码(SQL/Entity/DAO/XML/Repository/Service/Controller/Mapper/POJO),用于创建新的业务功能

    239 GitHub stars~2.8k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • Npgsqlrest

    NpgsqlRest/NpgsqlRest

    Build and modify REST APIs with NpgsqlRest — exposing PostgreSQL as HTTP endpoints from two sources (database functions/procedures/tables/views, and plain .sql files), driven by SQL comment…

    133 GitHub stars~7k tokensUpdated today
    DatabasesAuto-check: notes

More from OrchardCMS/OrchardCore

All 17 skills in this repo
  • Orchardcore Video Producer

    OrchardCMS/OrchardCore

    Produces narrated Orchard Core videos (feature walkthroughs, module overviews, pull request demos) with one unified look and specification - 1080p, Orchard Core logo, colors and fonts, the same…

    8.2k GitHub stars~2k tokensUpdated today
    Auto-check passed
  • Orchardcore Admin Edit Views

    OrchardCMS/OrchardCore

    Creates and updates OrchardCore admin edit views using the ocat- CSS class conventions.

    8.2k GitHub stars~3.7k tokensUpdated today
    Auto-check passed
  • Orchardcore Asset Manager

    OrchardCMS/OrchardCore

    Builds, watches, and manages frontend assets in OrchardCore.

    8.2k GitHub stars~1.5k tokensUpdated today
    Auto-check passed
  • Orchardcore Data Migration

    OrchardCMS/OrchardCore

    Creates and updates OrchardCore data migrations (DataMigration classes with CreateAsync/UpdateFromX).

    8.2k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Orchardcore Display Management

    OrchardCMS/OrchardCore

    Controls how OrchardCore renders content — placement.json rules, display drivers, shapes, zones, alternates, and editor groupings (tabs/cards/columns).

    8.2k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Orchardcore Docs Writer

    OrchardCMS/OrchardCore

    Authors OrchardCore documentation — MkDocs Material pages, module README docs, nav entries, admonitions, tabbed content, and redirects.

    8.2k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Orchardcore Query Indexing

What does Orchardcore Query Indexing do?

Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search. Orchardcore Query Indexing is an agent skill from OrchardCMS/OrchardCore. Works with OrchardCore queries and indexing — SQL/Lucene/Elasticsearch queries, full-text index profiles, content part/field index handlers, and search.

When should I use Orchardcore Query Indexing?

Orchardcore Query Indexing fits situations like: the user needs to define a query; index content for search; write an index handler; register an indexing source.

How do I install Orchardcore Query Indexing in Claude Code?

Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-query-indexing -a claude-code`. Or copy the skill folder (.agents/skills/orchardcore-query-indexing in OrchardCMS/OrchardCore) into .claude/skills/orchardcore-query-indexing in your project. Claude Code loads it when a task matches its description.

How do I install Orchardcore Query Indexing in Codex?

Run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-query-indexing -a codex`. Or copy the skill folder (.agents/skills/orchardcore-query-indexing in OrchardCMS/OrchardCore) into .agents/skills/orchardcore-query-indexing in your project. Codex loads it when a task matches its description.

Can I use Orchardcore Query Indexing in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OrchardCMS/OrchardCore --skill orchardcore-query-indexing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/orchardcore-query-indexing, .gemini/skills/orchardcore-query-indexing, .github/skills/orchardcore-query-indexing and .opencode/skills/orchardcore-query-indexing in your project.

What does Orchardcore Query Indexing need to run?

SKILL.md names no scripts, command-line tools or credentials: Orchardcore Query Indexing is instructions for the agent only.

Does Orchardcore Query Indexing access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Orchardcore Query Indexing safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Orchardcore Query Indexing use?

Orchardcore Query Indexing is published under the BSD-3-Clause licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Orchardcore Query Indexing use?

About 1.8k tokens (SKILL.md is roughly 7.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.4k tokens, read only when the agent opens those files.

What are the alternatives to Orchardcore Query Indexing?

Skills that share tags, products or a category with Orchardcore Query Indexing: Postgres (timescale/pg-aiguide, 1.9k stars), Pp Pokeapi (mvanhorn/printing-press-library, 2.1k stars), Nuxt Content (secondsky/claude-skills, 227 stars) and SQL Database Support for pREST (prest/prest, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Orchardcore Query Indexing?

OrchardCMS (a GitHub organization) maintains it in OrchardCMS/OrchardCore, which has 8,193 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 10, 2026.

Source: OrchardCMS/OrchardCore on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.