Generates setup, recipes, and extension code for CrestApps Orchard Core Taxation module's tax forms, returns, and e-filing features. Covers form formulas, filing schedules, return services, and e-filing channels.
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.
Read when SKILL.md points to them.
You are an Orchard Core expert. Generate accurate setup, recipes and extension code for the filing features of the CrestApps Taxation module. Taxation determines tax (orchardcore-taxation); these features turn the figures modules give into the forms and returns a business files. The site prepares, works out and records; the business files with the agency and pays, unless a pack adds an electronic channel.
CrestApps.OrchardCore.Taxation in the web/startup project. Your modules reference CrestApps.OrchardCore.Taxation.Abstractions (models, ITaxReturnService, IEFilingService, the Add* helpers) or CrestApps.OrchardCore.Taxation.Core (TaxFormEvaluator, ITaxFormFunctionProvider, TaxFormRecipeSeeder).ITaxReturnDataProvider.ITaxReturnForm class; write code only for what a formula can't do. A tax form of the same name wins over a class.{ "steps": [...] }. All C# classes are sealed, except view models.| Feature | ID | Depends on |
|---|---|---|
| Tax Forms | CrestApps.OrchardCore.Taxation.TaxForms | none (Payroll turns it on) |
| Tax Returns | CrestApps.OrchardCore.Taxation.Returns | Sales Tax (CrestApps.OrchardCore.Taxation), Tax Forms |
| Tax E-Filing | CrestApps.OrchardCore.Taxation.EFiling | Tax Returns |
Sales Tax depends only on Tax Tables, so a site that keeps its own books files returns without Commerce.
{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.Taxation",
"CrestApps.OrchardCore.Taxation.TaxForms",
"CrestApps.OrchardCore.Taxation.Returns",
"CrestApps.OrchardCore.Taxation.EFiling"
],
"disable": []
}
]
}
| Location | Feature | Permission |
|---|---|---|
| Commerce > Taxation > Tax Registrations (the Returns card holds the filing schedule) | Sales Tax | ManageTaxation |
| Commerce > Taxation > Tax Forms | Tax Forms | ManageTaxForms (security critical) |
| Commerce > Taxation > Tax Returns | Tax Returns | ManageTaxReturns |
| Permission | Grants |
|---|---|
ManageTaxForms | Add, edit, turn off and delete tax forms |
ManageTaxReturns | See returns, Prepare, Prepare again, Mark ready to file, Reopen, delete a draft with no payment |
FileTaxReturns | Mark as filed, Amend, record and remove payments, file electronically; implies ManageTaxReturns |
All are in TaxationPermissions (CrestApps.OrchardCore.Taxation.Core) and given to Administrator by default.
A TaxForm (ITaxFormManager, YesSql collection TaxForms) is any form a module prepares from its own records: Name, DisplayName, Description, Source, Jurisdiction, Period (Year or Quarter), HasRecipientStatements, StatementPerJurisdiction, RecipientCondition, MissingTaxIdNote, Values (yearly TaxFormValue: Name, Year, Amount; the latest year at or before the filing's), Checks (TaxFormCheck: a Condition that must be true and the Note when it isn't), Fields, Statement (how a recipient's statement prints) and Enabled.
TaxFormField | Use |
|---|---|
Number, Label | The box or line, such as 5a and "5a Taxable social security wages" |
Level | Recipient (one recipient's records) or Filing (every reported recipient's) |
Formula | Orchard Core's Data Pipelines formula language: [5a] reads a field, 'text', arithmetic, comparisons, AND/OR/NOT, ROUND, GREATEST, LEAST, IF, COALESCE, IN, plus the form functions |
AddToFiling | A recipient field also totaled on the filing |
AcceptsReportedAmounts | The source adds amounts reported to it (Payroll's pay codes: Pay codes report to it) |
Print | Never, Always, WhenNotZero on the recipient's statement |
TaxFormFormulas.Compile orders fields by what they read and refuses a cycle, an unknown field or function, two fields of one number at one level, a filing field numbered like a totaled recipient field, and aggregates; TaxFormHandler runs it on save and import. Every form can call VALUE(name, [fallback]), TOTAL(number), RECIPIENTS(), ISACCOUNT(number, shape), FILINGYEAR() and FILINGQUARTER(). Sources add their own (Payroll's WAGES, TAX, DEPOSITS...; Tax Returns' AMOUNT, ONTIME...): see references/formulas-and-extensions.md.
Sources registered today: Payroll (PayrollConstants.TaxFormSource, see orchardcore-payroll) and Sales tax returns (TaxationConstants.SalesTaxFormSource, SalesTax). With more than one source, Add tax form lists them (Create?source=SalesTax).
services.AddTaxFormSource(name, displayName, description, reportedAmountsLabel), or services.AddTaxFormSource(new TaxFormSource(...) { HasRecipients = false, HasPeriod = false, RequiresJurisdiction = false }) for forms with only filing fields (the editor hides recipients, the statement and the period).services.AddTaxFormFunctions<T>(), an ITaxFormFunctionProvider whose Source names the source (null for every form). A function reads what the source handed over with TaxFormFormulaContext.DataOf<T>(context).form.Put(settings), travelling in Properties) and add a card to the editor with a DisplayDriver<TaxForm>.TaxFormRecipientInputs and the filing's data, call TaxFormEvaluator.Evaluate (with ReportedAmount for fields that accept reported amounts), and store the result (recipients reported, the filing's fields, the notes of failed checks) in your own record.ITaxFormUsage (services.AddTaxFormUsage<T>()) so a used form can't be deleted.TaxFormRecipeSeeder.SeedAsync(moduleId, recipeFileName): it adds the forms the site doesn't have yet, by name, without running the recipe's other steps.A MerchantTaxRegistration has a Filing schedule (TaxFilingSchedule), or none when it files no return here:
| Property | Meaning |
|---|---|
Frequency | Monthly, Quarterly or Annual (TaxFilingFrequencies) |
DueMonthsAfterPeriod, DueDay | Due on DueDay of the month DueMonthsAfterPeriod after the period's last month (default the 20th of the next month); a day past the month's end is its last day |
MoveToNextBusinessDay | A due date on a weekend moves to the Monday after (default on) |
Form | The return form of the periodic returns; empty for the generic form (Generic) |
AnnualForm, AnnualDueMonthsAfterYear, AnnualDueDay | A yearly reconciliation return filed besides the monthly or quarterly ones |
TaxReturnPeriod (Frequency, Start, End, keys such as 2026-10, 2026-Q3, 2026; Parse, For, Between) and TaxFilingSchedule.DueDateOf(period, annualReconciliation) work out periods and due dates. ITaxReturnService.ListPeriodsAsync(from, to) lists, for every active registration with a schedule, the periods that end in the span, each with its due date and current return (TaxReturnPeriodSummary).
{
"steps": [
{
"name": "MerchantTaxRegistration",
"MerchantTaxRegistrations": [
{
"Name": "Michigan sales, use and withholding",
"JurisdictionId": "us-mi",
"RegistrationNumber": "12-3456789",
"IsActive": true,
"Filing": { "Frequency": "Monthly", "DueMonthsAfterPeriod": 1, "DueDay": 20, "MoveToNextBusinessDay": true, "Form": "US-MI-5080", "AnnualForm": "US-MI-5081", "AnnualDueMonthsAfterYear": 2, "AnnualDueDay": 28 }
}
]
}
]
}
A TaxReturn (YesSql collection TaxReturns) has its registration, jurisdiction, form, period and due date, the Lines the providers gave (TaxReturnLine: Kind, JurisdictionId, TaxType, FormLine, Category, Amount, TaxAmount), the form's Boxes, AmountDue, Payments, Notes and a status Draft, Ready, Filed or Amended. One return per registration, form and period is current; an amendment is a new return with AmendsId and Amendment (1, 2...) and counts what was paid earlier (PaidWithEarlier). AmountPaid and Balance are worked out.
ITaxReturnService | Does |
|---|---|
PrepareAsync(registrationId, periodKey, annualReconciliation, user) | A new draft, or the draft prepared again; refuses a ready or filed return |
PrepareAgainAsync, MarkReadyAsync, ReopenAsync | Draft only; draft to ready; ready back to draft |
MarkFiledAsync(taxReturn, filedOn, confirmationNumber, channel, user) | Refuses a day before the period ends; works the boxes out again as filed that day; the corrected return becomes Amended |
AmendAsync | A new draft correcting a filed return |
RecordPaymentAsync(taxReturn, payment, user), RemovePaymentAsync(taxReturn, paymentId, user) | Records what was paid; no money moves |
GetFormsAsync(includeDisabled) | The return forms: enabled tax forms of the SalesTax source, then ITaxReturnForms under names no tax form has |
A draft past its due date is worked out as filed today (site time zone), so a late return shows its penalty. Each call returns a TaxReturnResult.
| Extension | Register | Responsibility |
|---|---|---|
ITaxReturnDataProvider (Name, ContributeAsync(TaxReturnDataContext)) | services.AddTaxReturnDataProvider<T>() | Adds a period's figures to context.Lines (and context.Notes); every provider runs for every return. Kinds in TaxReturnLineKinds: GrossSales, ExemptSales, TaxableSales, UseTaxPurchases, Withholding, Credit, ExcessCollected, or a form's own |
ITaxReturnForm (Name, DisplayName with [JsonIgnore], ComputeAsync(TaxReturnFormContext)) | services.AddTaxReturnForm<T>() | A return form in code; sets Boxes and AmountDue; context.FiledOn is the day it counts as filed |
ITaxReturnObserver (ChangedAsync(TaxReturnChange)) | services.AddTaxReturnObserver<T>() | Hears Prepared, Ready, Reopened, Filed, Amended, PaymentRecorded, PaymentRemoved after the change is saved in the session and before it commits: post to the books, record a payroll tax deposit |
using CrestApps.OrchardCore.Taxation;
using CrestApps.OrchardCore.Taxation.Models;
using CrestApps.OrchardCore.Taxation.Services;
public sealed class LedgerTaxReturnDataProvider : ITaxReturnDataProvider
{
private readonly ILedgerTaxQueries _ledger;
public LedgerTaxReturnDataProvider(ILedgerTaxQueries ledger)
{
_ledger = ledger;
}
public string Name => "Ledger";
public async Task ContributeAsync(TaxReturnDataContext context, CancellationToken cancellationToken = default)
{
var sales = await _ledger.SalesAsync(context.Registration.JurisdictionId, context.Period.Start, context.Period.End, cancellationToken);
context.Return.Currency = "USD";
context.Lines.Add(new TaxReturnLine { Kind = TaxReturnLineKinds.GrossSales, Amount = sales.Gross });
context.Lines.Add(new TaxReturnLine { Kind = TaxReturnLineKinds.TaxableSales, TaxType = TaxTypeNames.SalesTax, Amount = sales.Taxable, TaxAmount = sales.TaxCollected });
context.Lines.Add(new TaxReturnLine { Kind = TaxReturnLineKinds.UseTaxPurchases, TaxType = TaxTypeNames.UseTax, Amount = sales.UseTaxPurchases, TaxAmount = sales.UseTax });
}
}
// services.AddTaxReturnDataProvider<LedgerTaxReturnDataProvider>();
A tax form of the SalesTax source is a return form (TaxFormReturnForm): it has filing fields only, its formulas read the return's lines, and the field named by SalesTaxFormSettings.AmountDueField (the Sales tax return card, AmountDue when empty) becomes AmountDue. Every field becomes a box and a failed check a note. SalesTaxFormHandler refuses an amount due field that isn't a filing field. The generic form ships as Tax Returns: generic return form (TaxReturnsGenericForm, fields GrossSales, ExemptSales, TaxableSales, SalesTax, UseTaxPurchases, UseTax, Withholding, ExcessCollected, TotalTax, Credits, AmountDue), seeded by Tax Returns' migration. TaxReturnTaxFormUsage keeps a form with returns or registrations.
{
"steps": [
{
"name": "TaxForms",
"Forms": [
{
"Name": "US-MI-5080",
"DisplayName": "Michigan sales, use and withholding monthly return",
"Source": "SalesTax",
"Jurisdiction": "US-MI",
"Values": [ { "Name": "DiscountRate", "Year": 2020, "Amount": 0.005 } ],
"Fields": [
{ "Number": "6", "Label": "6 Total tax", "Level": "Filing", "Formula": "TAX('TaxableSales', 'us-mi') + TAX('UseTaxPurchases')" },
{ "Number": "7", "Label": "7 Discount", "Level": "Filing", "Formula": "IF(ONTIME(), LEAST(ROUND([6] * VALUE('DiscountRate'), 2), 15), 0)" },
{ "Number": "8", "Label": "8 Penalty", "Level": "Filing", "Formula": "IF(ONTIME(), 0, ROUND(LEAST([6] * 0.05 * MONTHSLATE(), [6] * 0.25), 2))" },
{ "Number": "21", "Label": "21 Amount due", "Level": "Filing", "Formula": "[6] - [7] + [8] - TAX('Credit')" }
],
"Properties": { "SalesTaxFormSettings": { "AmountDueField": "21" } }
}
]
}
]
}
The TaxForms step (Forms, matched by id then name, fields replaced with the recipe's) and the Tax Forms deployment step carry forms; a source's settings ride in Properties.
The Payments card is built through IDisplayManager<TaxReturnPaymentEntry> (Return, and the TaxReturnPayment being recorded as Payment: Amount, PaidOn, Reference, Method, Properties). A pack adds a DisplayDriver<TaxReturnPaymentEntry> that edits what its observer needs into Payment.Properties (such as the account paid from), checks entry.Return so its fields show only on its returns, and adds a model error to stop the payment. A sample is in references/formulas-and-extensions.md.
An EFileSubmission (collection TaxReturns) is one attempt: TargetType, TargetId, Format, Transport, the built file (base64 Content), Status (Created, Submitted, Accepted, Rejected, Failed), IsTest, Options, ExternalId, ConfirmationNumber, Messages.
| Interface | Register | Responsibility |
|---|---|---|
IEFileTargetProvider (TargetType, FindAsync, CanFileAsync, AcceptedAsync) | services.AddEFileTargetProvider<T>() | Describes a document as an EFileTarget (NotFileableReason when it can't be filed now), checks who may file, marks it filed once accepted. Built in: TaxReturn (ready, period over, FileTaxReturns) |
IEFileFormat (Name, DisplayName, CanWrite, WriteAsync(target, submission)) | services.AddEFileFormat<T>() | Writes an EFilePayload (FileName, ContentType, Content, Problems that stop the submission). Built in: Tax return (JSON) |
IEFileTransport (Name, DisplayName, IsManual, SupportsTestSubmissions, CanSend, SendAsync, CheckAsync) | services.AddEFileTransport<T>() | Sends the file and asks for the answer (EFileTransportResult). Built in: Manual (Download and file by hand) |
IEFilingService.SubmitAsync(EFileSubmissionRequest, user) (Target, Format, Transport, IsTest, Options) refuses a test through a channel that takes none, a target already accepted (a test acceptance doesn't count) or with a submission waiting; it builds the file, sends it (a throwing channel leaves Failed) and records the answer. The SubmitAsync(target, format, transport, user) extension sends no options and no test. CheckAsync asks a non-manual channel; RecordAnswerAsync(submission, accepted, confirmationNumber, filedOn, message, user) records the answer to a manual one. An accepted real submission marks the return filed (MarkFiledAsync with the confirmation number and channel); if that fails, it stays Submitted. The Tax e-filing acknowledgements background task (every 15 minutes) checks up to 50 pending submissions.
IsTest (the Test submission box, shown when a channel offered takes tests) or answered with EFileTransportResult.IsTest is recorded with the agency's answer, but its acceptance never calls the target provider: the return stays ready to file.IDisplayManager<EFileSubmissionRequest>; a pack's driver edits its choices into request.Options (checking request.Target), which the format and channel read from submission.Options.A state's own XML schema and gateway are an IEFileFormat and an IEFileTransport in a pack; a sample transport is in references/formulas-and-extensions.md. The TaxReturns step (entries TaxReturns, matched by ItemId) with the Tax Returns deployment step, and the EFileSubmissions step (entries Submissions) with the E-File Submissions deployment step, move returns and submissions between sites.
| Symptom | Check |
|---|---|
| No periods on Tax Returns | No active registration has a filing schedule (Files no return here), or none is effective in the year shown |
| A return has no figures | No ITaxReturnDataProvider is registered: Tax Returns ships none |
| Return shows a note and no boxes | The form's formulas don't compile, or a check failed (the note names it) |
| Mark as filed refused | The filed day is before the period ends, or the return isn't ready |
| File electronically missing | Tax E-Filing off, the return isn't ready, or its period isn't over |
| A test was accepted but the return isn't filed | By design: file it for real |
| The change was not saved | An ITaxReturnObserver threw; see the log |
| Can't delete a tax form | An ITaxFormUsage reports it in use (Payroll filings, returns, registrations); turn it off |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/crestapps-orchardcore:orchardcore-tax-filingfrom 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