Not loaded · from iris-dev
Guides writing legacy InterSystems ObjectScript MAC routines: label-based structure, #include, $ZTRAP error traps, extrinsic functions, and Quit vs Return. Includes Atelier API access for reading/writing .mac files.
Claude Code won't load this skill
It ships in iris-dev at skills/, but Claude Code only loads skills/<name>/SKILL.md and folders listed under skills in plugin.json. Installing the plugin doesn't add it.
Before generating any .MAC code, verify all 8 items:
| # | Check | Wrong | Right |
|---|---|---|---|
| 1 | Routine entry | MYROUTINE() (parens) | MYROUTINE (no parens) |
| 2 | Label indentation | LABEL { (braces) | LABEL then tab-indented body |
| 3 | Include syntax | Include %occStatus | #include %occStatus |
| 4 | Extrinsic call | ##class(X).Method() | $$LABEL(args) or $$LABEL^RTN(args) |
| 5 | Error trap | none | Try { } Catch e { } or Set $ZTRAP="ERRHAN" |
| 6 | Cross-routine call | .Method() | Do LABEL^ROUTINE or $$FUNC^ROUTINE(args) |
| 7 | Variable scope | Method-scoped (class) | New var to create local scope |
| 8 | Return from subroutine | none | Quit or Return |
MYROUTINE
;Entry point - no parens, no braces
Set x = $$CALC(3,4)
Quit
;
CALC(a,b) ;Extrinsic function - called with $$CALC(a,b)
Quit a+b
;
HELPER ;Subroutine - called with Do HELPER
Write "done",!
Quit
MYROUTINE
Set $ZTRAP = "ERRHAN"
; ... code that might error ...
Quit
;
ERRHAN
Set err = $ZE
Set $ZTRAP = ""
Write "Error: ",err,!
Quit
VS Code's isfs:// provider does not always expose routines, so go at the Atelier REST
API directly. The document name includes the .mac extension.
# Read
iris-agentic-dev tool iris_doc --args '{"mode":"get","name":"MYROUTINE.mac"}'
# Write (checks the document out of source control first when one is configured)
iris-agentic-dev tool iris_doc --args '{"mode":"put","name":"MYROUTINE.mac","content":"MYROUTINE\n Quit\n"}'
# List MAC routines
iris-agentic-dev tool iris_doc --args '{"mode":"list","pattern":"*.mac"}'
Without the CLI, call Atelier with curl -K -, which reads the credential from stdin so it stays out
of the process list. IRIS_SCHEME is https for an HTTPS endpoint:
printf 'user = "%s:%s"\n' "${IRIS_USERNAME:-_SYSTEM}" "$IRIS_PASSWORD" \
| curl -s -K - "${IRIS_SCHEME:-http}://${IRIS_HOST:-localhost}:${IRIS_WEB_PORT:-52773}/api/atelier/v1/${IRIS_NAMESPACE:-USER}/doc/MYROUTINE.mac"
A PUT to the same URL with ?ignoreConflict=1 overwrites regardless of the server timestamp.
A PUT does not compile — follow it with POST /action/compile and a body of
["MYROUTINE.mac"], or use the iris_compile MCP tool. Always re-read after writing;
the PUT response body is not a reliable confirmation. See the compile skill.
result used after a For loop but never initialized → <UNDEFINED> if no rows#include file not found → check ^%INCLUDE global or .inc file spelling$$FUNC vs Do LABEL confusion: $$ for functions returning values, Do for subroutinesQuit value in a Do-called subroutine → exits subroutine cleanly; Quit with no value for voidWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
40 skills in this plugin
/ensemble-productionManage and observe IRIS Interoperability productions — lifecycle, logs, queues, and message tracing. Covers pyprod Python API, ObjectScript Ens.Director, and MCP tool flow./iris-agentic-devConfigure, connect, and troubleshoot the iris-agentic-dev MCP server (iris_execute/iris_query/iris_doc/docs_introspect/kb/etc.) against an IRIS container or instance. Use when its tools return IRIS_UNREACHABLE, when pointing it at a new IRIS, or when a connection edit "isn't taking effect." Covers the .iris-agentic-dev.toml config, live file-watch reload, the OrbStack port-discovery gotcha, and the docker-exec fallback./iris-agentic-dev-setupInstall the iris-agentic-dev binary, get an IRIS instance running, and register the MCP server. Use when the IRIS tools are missing, when check_config reports disconnected, or when the user asks to set up, install, or connect iris-agentic-dev./iris-ai-hubIRIS AI Hub (%AI.* classes, EAP builds): where the upstream docs are and which file covers what, how to check them against the installed build, and the %AI.Agent / %AI.Tool / %AI.ToolSet / ConfigStore / Wallet / MCP server facts measured on 2026.3.0AI builds 139 and 154. Load when building or debugging AI Hub agents, tools, providers or MCP servers./iris-connectivityUse when connecting to IRIS from Python, Java, JDBC, ODBC, or any external language. IRIS connection APIs have specific package names, port numbers, and syntax that differ from every other database./iris-container-graceful-shutdownIRIS data persists across container restarts ONLY if IRIS is stopped gracefully before docker stop. Without this, docker stop sends SIGKILL after grace period, leaving the WIJ (write image journal) dirty. Data recovers on next start but takes 30-300s. Load when: stopping IRIS containers, setting up docker-compose for production, or debugging "tables exist but rows are gone after restart".
npx claudepluginhub intersystems-community/iris-agentic-dev --plugin iris-devOther plugins' skills for the same job