From iris-dev
Hard gate checklist that catches common ObjectScript mistakes before showing code to the user. Covers Quit/Return, postfix syntax, $IsObject checks, SQL table names, SQLCODE, HTML escaping, arithmetic, $ListBuild, %Status, transactions, storage blocks, %INLIST, and '= in SQL strings.
How this skill is triggered — by the user, by Claude, or both
Slash command
/iris-dev:objectscript-guardrailsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Do not show ObjectScript code until this checklist passes.**
Do not show ObjectScript code until this checklist passes.
Quit value inside For/While/Try — use Return valueQuit:key="" — NO spaces in condition, alone on its own line'$IsObject(obj) after every %OpenId before touching propertiesCatalog.Item → SQL Catalog.Item (not Catalog_Item)0 = success (falsy). Check SQLCODE = 0 not just SQLCODE& FIRST, then <, then >1.8 not 9/5. Parenthesize everything"" not $ListBuild() — $ListLength($ListBuild()) = 1$$$ISERR(sc) / $$$ThrowOnError(sc). Never return $$$OK after catching an errorIf $TLevel > 0 { TROLLBACK } — never Return inside TSTART without rollbackStorage Default { ... } in UDL — omit entirely. IRIS auto-generates storage. Writing one causes ERROR #5559 in IRIS 2025.1+.%INLIST is SQL-only. In ObjectScript method code use $ListFind(list, value) > 0. Writing Return (x %INLIST list) causes ERROR #1010.'= in SQL strings: '= is the ObjectScript not-equal operator. Inside SQL string literals, use <>. "WHERE Tags '= ''" → parser sees ' as start of SQL string.If violations found:
⚠️ ObjectScript review flagged [N] issues — correcting:
- [rule]: [wrong] → [correct]
Then show corrected code.
If clean:
✅ ObjectScript review passed.
Then show code.
// WRONG → CORRECT
Quit 0 (inside For) → Return 0
Quit:key = "" → Quit:key=""
..%OpenId(id).Prop → Set obj=..%OpenId(id) If '$IsObject(obj){...}
SELECT FROM Catalog_Item → SELECT FROM Catalog.Item
If SQLCODE { "not found" } → If SQLCODE = 100 { "not found" }
celsius * 9 / 5 + 32 → (celsius * 1.8) + 32
Set lst = $ListBuild() → Set lst = ""
// Storage / Operators:
Storage Default { <Type>...</Type> } → (omit entirely — IRIS auto-generates)
Return (tag %INLIST myList) → Return ($ListFind(myList, tag) > 0)
"WHERE Tags '= ''" → "WHERE Tags <> ''"
npx claudepluginhub intersystems-community/iris-agentic-devAutomatically reviews generated ObjectScript code for common LLM mistakes including QUIT/RETURN misuse, method call syntax, error handling patterns, globals usage, and timestamp formats before presenting to the user.
Checks ABAP code against Clean ABAP principles (naming, language constructs, constants, variables, error handling, formatting). Useful for code reviews and quality audits.
Applies 38 automated code review rules for ADVPL/TLPP sources using regex, AST, and cross-file analysis. Use after generating/editing ADVPL code, before marking tasks complete, or when asked to review code.