Configures document upload, text/figure extraction, chunking, embedding, and RAG for chat interactions in Orchard Core 4.0. Covers AI profiles, chat sessions, vector search, file scanning, and document cleanup.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are an Orchard Core expert. Generate configuration, recipes, and code that let users and administrators attach documents to CrestApps AI chat surfaces, and let the model retrieve from them.
CrestApps.OrchardCore.AI.Documents is EnabledByDependencyOnly. It depends on CrestApps.OrchardCore.AI.Chat.Interactions and OrchardCore.Indexing, and comes along with any of the sub-features below..csv, .tsv, .xlsx, .xls) are non-embeddable; they are loaded into the conversation's tabular workspace instead.CrestApps.OrchardCore.AI.Documents.Elasticsearch or CrestApps.OrchardCore.AI.Documents.AzureAI (see orchardcore-ai-documents-elasticsearch and orchardcore-ai-documents-azureai).embedding slot, so the deployment must declare textEmbedding. It is locked once the index exists.orchardcore-ai-documents-extractors). Azure Blob Storage is optional (see orchardcore-ai-documents-azure-storage).OrchardCore.Antivirus to add ClamAV.| Feature | Feature ID | Depends on |
|---|---|---|
| AI Documents | CrestApps.OrchardCore.AI.Documents | CrestApps.OrchardCore.AI.Chat.Interactions, OrchardCore.Indexing (dependency only) |
| AI Documents for Chat Interactions | CrestApps.OrchardCore.AI.Documents.ChatInteractions | AI Documents |
| AI Documents for Profiles | CrestApps.OrchardCore.AI.Documents.Profiles | AI Documents, CrestApps.OrchardCore.AI.Chat.Core |
| AI Documents for Chat Sessions | CrestApps.OrchardCore.AI.Documents.ChatSessions | AI Documents, CrestApps.OrchardCore.AI.Chat |
| AI Documents - Azure Blob Storage | CrestApps.OrchardCore.AI.Documents.Azure | AI Documents |
| AI Documents indexing using Azure AI Search | CrestApps.OrchardCore.AI.Documents.AzureAI | AI Documents, OrchardCore.AzureAI |
| AI Documents indexing using Elasticsearch | CrestApps.OrchardCore.AI.Documents.Elasticsearch | AI Documents, OrchardCore.Elasticsearch |
| AI Documents (PDF) | CrestApps.OrchardCore.AI.Documents.Pdf | none |
| AI Documents (OpenXml) | CrestApps.OrchardCore.AI.Documents.OpenXml | none |
{
"steps": [
{
"name": "Feature",
"enable": [
"OrchardCore.Elasticsearch",
"CrestApps.OrchardCore.AI.Documents.Elasticsearch",
"CrestApps.OrchardCore.AI.Documents.ChatInteractions",
"CrestApps.OrchardCore.AI.Documents.Profiles",
"CrestApps.OrchardCore.AI.Documents.ChatSessions",
"CrestApps.OrchardCore.AI.Documents.Pdf",
"CrestApps.OrchardCore.AI.Documents.OpenXml"
],
"disable": []
}
]
}
Swap in OrchardCore.AzureAI and CrestApps.OrchardCore.AI.Documents.AzureAI for Azure AI Search, and keep only the sub-features you need.
textEmbedding (see orchardcore-ai-model-capabilities).The documents section is stored as InteractionDocumentSettings and guarded by ManageChatInteractionSettings:
| Field | Property | Default |
|---|---|---|
| Index profile | IndexProfileName | none |
| Top matching chunks | TopN | 3 |
| Document retrieval mode | RetrievalMode (Chunk or Hierarchical) | Chunk |
| Allow document uploads in chat interactions | AllowDocumentUploads | true |
| Allow image uploads in chat interactions | AllowImageUploads (needs a vision deployment) | false |
| Largest document that can be indexed | MaxIndexableCharacters (characters of extracted text, 0 means no limit) | 50000 |
| Describe figures in uploaded documents | DescribeFiguresInUploads (needs a deployment in the vision slot) | true |
{
"steps": [
{
"name": "Settings",
"InteractionDocumentSettings": {
"IndexProfileName": "AIDocuments",
"TopN": 3,
"RetrievalMode": "Chunk",
"AllowDocumentUploads": true,
"AllowImageUploads": false,
"MaxIndexableCharacters": 50000,
"DescribeFiguresInUploads": true
}
}
]
}
Chunk keeps chunk-level context. Hierarchical matches on chunks, then injects the full text of the matched documents. A document over the indexable limit is refused at upload instead of being stored unsearchable. Saving these settings still releases the tenant, because their readers in CrestApps.Core still use IOptions<InteractionDocumentOptions>.
AI Documents for Profiles adds an upload area to the Knowledge tab of AI profiles and profile-source templates. Profile documents are background knowledge shared by every session of the profile; files are uploaded, extracted, embedded, and removed atomically when the profile is saved. Only embeddable extensions are accepted.
The profile stores its settings in DocumentsMetadata:
| Property | Meaning |
|---|---|
Documents | The attached documents (ChatDocumentInfo) |
DocumentTopN | Chunks to include, default 3 |
RetrievalMode | Chunk or Hierarchical, blank uses the site default |
MaxIndexableCharacters | Blank uses the site limit |
DescribeFiguresInUploads | Blank follows the site setting |
A profile created from a template gets its own copies of the template's documents through IAIProfileTemplateApplicationHandler, and the copies are indexed.
AI Documents for Chat Sessions adds attachment to admin and front-end chat sessions and widgets. It is off per profile until you enable it on the Knowledge tab (AIProfileSessionDocumentsMetadata):
{
"steps": [
{
"name": "AIProfile",
"profiles": [
{
"Name": "support-chat",
"DisplayText": "Support Chat",
"Type": "Chat",
"Properties": {
"AIProfileSessionDocumentsMetadata": {
"AllowSessionDocuments": true,
"AllowSessionImageUploads": false
}
}
}
]
}
]
}
The Artificial Intelligence Chat widget follows the settings of the profile it uses. Image uploads also require a vision deployment.
OrchardUploadedFileScanner implements CrestApps.Core's IUploadedFileScanner and routes every upload from chat interactions, profiles, sessions, and widgets through Orchard Core's FileCreationService before storage. Each registered IFileEventHandler can reject the file, including the ClamAV handler of OrchardCore.Antivirus. Rejections and scan failures fail closed and are logged at Warning. Add your own policy with an IFileEventHandler (see orchardcore-file-upload-security and orchardcore-antivirus).
IDocumentFileStore, by default wwwroot/<tenant>/AIDocuments.AIDocument records; deleting a chat session removes its documents in a deferred task (AIChatSessionDocumentCleanupHandler), which hands the session to IConversationDocumentCleanupService so the stored files in IDocumentFileStore (for example Azure blobs), tabular artifacts, chunks, rows and the PDF, Word and PowerPoint workspaces are deleted too, even when no document rows are left (earlier releases left the stored files orphaned); removing a profile document cleans its chunks on save.[fig:N], which chat surfaces render as an image served by the figure endpoint; the same rule as the document download decides who can see it.| Agent | Comes with | Does |
|---|---|---|
| PowerPoint | AI Documents (OpenXml); PDF export also needs AI Documents (PDF) | Creates, edits, designs, reviews, previews, and exports .pptx decks |
| Word | AI Documents (OpenXml) | Writes, edits, reviews, previews, and exports .docx documents |
| AI Documents (PDF) | Creates, converts, edits, previews, and analyses PDFs |
They are system agents, always available to the primary model and not listed in agent pickers. Previews return as images that the chat UI stacks into a carousel.
public sealed class AuditDocumentEventHandler : IAIChatDocumentEventHandler
{
public Task UploadedAsync(AIChatDocumentUploadContext context, CancellationToken cancellationToken = default)
=> Task.CompletedTask;
public Task RemovedAsync(AIChatDocumentRemoveContext context, CancellationToken cancellationToken = default)
=> Task.CompletedTask;
}
public sealed class Startup : StartupBase
{
public override void ConfigureServices(IServiceCollection services)
{
services.AddScoped<IAIChatDocumentEventHandler, AuditDocumentEventHandler>();
}
}
| Service | Role |
|---|---|
IAIDocumentStore | Document records for every reference type (ReferenceId, ReferenceType) |
IDocumentFileStore | File storage, replaced by the Azure Blob feature |
IVectorSearchService | Keyed by provider name, filtered by reference |
AIDocumentsIndexingService | Writes chat interaction chunks to the index |
IAIChatDocumentEventHandler | Upload and removal events |
OrchardChatInteractionDocumentAuthorizationHandler, OrchardAIChatSessionDocumentAuthorizationHandler, OrchardAIProfileDocumentAuthorizationHandler | Decide who may upload, remove, and download |
The shared pipeline (readers, chunking, figure processing) is described in crestapps-core-document-processing.
textEmbedding on embedding deployments instead of "Purpose": "Embedding". Legacy records are projected automatically.FileCreationService; a custom IFileEventHandler that rejects files now also blocks AI document uploads.InteractionDocumentOptions from CrestApps.Core; this settings screen still releases the shell on save.| Symptom | Check |
|---|---|
| Index not configured warning | Select an index profile in Settings > Artificial Intelligence. |
| No AI Documents index type | Enable CrestApps.OrchardCore.AI.Documents.Elasticsearch or .AzureAI. |
| Vector search service not available warning | The selected index's provider feature is not enabled. |
| Upload refused | The scan rejected it, the type has no reader, or the extracted text is over the indexable limit. |
| No attach button in a session | Enable Allow session document uploads or Allow session image uploads on the profile. |
| Figures never described | No deployment fills the vision slot, or figure description is turned off. |
What SKILL.md sets; muted values are Claude Code's defaults
/crestapps-orchardcore:orchardcore-ai-documentsfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts.Other plugins' skills for the same job