/outsystems-ai-skills:outsystems-advanced-sqlfrom outsystems-ai-skills
Formats and reviews OutSystems Advanced SQL nodes with uppercase clauses, tab-indented fields, leading commas, explicit joins, CamelCase aliases, and {Entity}.[Attribute] syntax. Use when writing or reviewing SQL in OutSystems.
Ships in outsystems-ai-skills. 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.
Use an Aggregate first. Use Advanced SQL only when Aggregates can't express the query (HAVING, subqueries, UNION, WITH, window functions, bulk UPDATE/DELETE, performance-critical joins).
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY. (SELECT TOP n / SELECT DISTINCT stay on the SELECT line.), so a missing comma is visible at a glance.AND / OR on the left, one condition per line, indented with a TAB under WHERE / HAVING.INNER JOIN, LEFT JOIN, RIGHT JOIN. Never a bare JOIN. Each join goes on its own line under FROM, with its ON condition on the same line.COUNT, SUM, ISNULL, AS, IN, DESC.{Entity}.[Attribute]. Never physical table names (OSUSR_...).{Employee} AS Manager, not {Employee} e or {Employee} AS Mgr.AS OrderCount, not AS counter or AS cnt.SELECT *; list columns in the same order as the output structure./* GetCustomerOverOrderLimit
Returns active customers whose number of open orders exceeds their OrderLimit.
Params: @ExcludedUserId, @FromDate */
SELECT TOP 200
COUNT({Order}.[Id]) AS OrderCount
,{Customer}.[Id]
,{Customer}.[Name]
,{Customer}.[OrderLimit]
,AccountManager.[Name] AS AccountManagerName
FROM
{Customer}
INNER JOIN {Order} ON {Order}.[CustomerId] = {Customer}.[Id]
LEFT JOIN {User} AS AccountManager ON AccountManager.[Id] = {Customer}.[AccountManagerId]
WHERE
{Order}.[IsActive] = 1
AND {Order}.[IsCancelled] = 0
AND {Customer}.[IsActive] = 1
AND {Customer}.[IsBlocked] = 0
AND {Customer}.[OrderLimit] > 0
AND {Customer}.[CreatedBy] <> @ExcludedUserId
AND {Customer}.[CreatedOn] > @FromDate
GROUP BY
{Customer}.[Id]
,{Customer}.[Name]
,{Customer}.[OrderLimit]
,AccountManager.[Name]
HAVING
COUNT({Order}.[Id]) > {Customer}.[OrderLimit]
ORDER BY
OrderCount DESC
Header comments, inline comments and aliases are written in English, whatever language the user writes in.
Every SQL node starts with a block comment: query name, one-line purpose, parameters. Explain any non-obvious join or filter inline with --.
Get<Entity>By<Filter>, Count<Entity>By<Filter>, Update<Entity><What> (same as Aggregates).@CustomerId, @FromDate.<Purpose>Row (e.g. CustomerOrderCountRow) or the entity itself when returning only that entity's columns.Expand Inline = Yes on user-controlled input without sanitising:
IN (...): build with BuildSafe_InClauseIntegerList / BuildSafe_InClauseTextList (Sanitization extension).ORDER BY: validate against a whitelist of column names.EncodeSql().IsActive = 1) unless the query is explicitly about inactive records.TOP n / Max. Records) when feeding UI lists; page with OFFSET ... FETCH for large result sets.All the rules above apply unchanged. The only difference: TOP n (SQL Server) is replaced by LIMIT n, placed on its own line at the left margin as the last clause.
/* GetCustomerOrderCount
Returns active customers with their number of open orders.
Params: none */
SELECT
COUNT({Order}.[Id]) AS OrderCount
,{Customer}.[Id]
,{Customer}.[Name]
FROM
{Customer}
INNER JOIN {Order} ON {Order}.[CustomerId] = {Customer}.[Id]
WHERE
{Customer}.[IsActive] = 1
AND {Order}.[IsActive] = 1
GROUP BY
{Customer}.[Id]
,{Customer}.[Name]
ORDER BY
OrderCount DESC
LIMIT 200
Use the node's Test button with realistic parameter values and check the Executed SQL tab for the generated statement.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub maiurnarendra/outsystems-ai-skills --plugin outsystems-ai-skills13 skills in this plugin
/outsystems-action-flowsStandards for OutSystems action logic (Server, Client and Service Actions) - singular action names and Get actions in _BL, flow layout (top to bottom, True down, False right, For Each Cycle to the right, straight connectors, Dummy routing), If/Assign/Switch labels, Is/Has Booleans, built-in functions and list actions before loops and JavaScript, descriptions, comments and exceptions. Use when creating, editing or reviewing any OutSystems action logic./outsystems-architectureOutSystems architecture design rules based on the 3-layer Architecture Canvas (End-user, Core, Foundation) and allowed dependency directions. Use when designing a new OutSystems application, adding a dependency between modules, splitting or merging modules, or reviewing an architecture for violations./outsystems-code-reviewReview the OutSystems code changed for a work item on two independent axes - Standards (the team's naming, layout, CRUD, SQL and architecture rules) and Spec (does it do what the user story or bug asks, no more and no less). Reads modules live from Service Studio through the Service Studio MCP, never edits them, and returns one report with a verdict. Use when the user asks to code-review a work item, user story, bug or set of OutSystems actions before testing or deployment./outsystems-crud-conventionsOutSystems entities and _CS actions - entity and attribute naming (CamelCase, singular, A_B only for many-to-many, Is/Has Booleans), Public and Expose Read Only, static entities, <Entity>_CreateOrUpdate (Source/Id) and <Entity>_Delete wrappers, and specific or bulk actions such as <Entity>_UpdateStatusAll. Use when creating or renaming entities or attributes, or writing actions in a _CS module./outsystems-data-modelDesign OutSystems entities before they are built. Interviews the developer one question at a time (business terms, owning _CS module, static vs regular entity, relationships and many-to-many, delete rules, attributes, indexes, volume, sensitive data), checks the terms against a project glossary and the existing data model, and writes an entity proposal with the decisions and their reasons. Use when the user wants to design, model or plan new entities or a data model for an OutSystems feature, before creating them./outsystems-debuggingDiagnose OutSystems bugs to a confirmed root cause before fixing - runtime errors (Service Center / ODC logs, error IDs), performance (slow screens, queries, timers, integrations) and front-end issues, especially JavaScript in Reactive and Mobile apps. Gathers evidence from logs, the browser and the model (read-only), tests one hypothesis at a time, and reports root cause, fix and regression check. Use when the user reports an error, wrong data, a slow screen or a front-end problem.