From iris-code
Conventions and workflow for viewing and editing InterSystems IRIS code (ObjectScript classes, routines, includes) through the iris MCP tools. Use whenever reading, writing, compiling, or querying code on an IRIS server.
How this skill is triggered — by the user, by Claude, or both
Slash command
/iris-code:iris-objectscriptThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This skill covers how to use the `iris` MCP tools effectively and the ObjectScript
This skill covers how to use the iris MCP tools effectively and the ObjectScript
conventions to follow. The code lives on the IRIS server, not on local disk.
iris_list_documents (category CLS for classes, RTN for
routines) with a filter_pattern like MyApp.%, or iris_run_query against
%Dictionary.ClassDefinition for richer searches.iris_read_document("MyApp.Service.cls") returns the full source.
Always read before editing.iris_write_document. The Atelier API replaces the whole document; there is no
partial patch. Saving does not compile.iris_compile_documents(["MyApp.Service.cls"]). Inspect the
returned console. Anything other than a success message means it failed —
fix and recompile.Document names always include a type extension:
| Extension | Kind |
|---|---|
.cls | Class definition |
.mac | MAC routine (compiles to INT) |
.int | Intermediate routine |
.inc | Include file (macros) |
The package/class is dot-separated: MyApp.Domain.Customer → MyApp.Domain.Customer.cls.
Class MyApp.Greeter Extends %RegisteredObject
{
/// A class method returns a value with Quit.
ClassMethod Greet(name As %String = "world") As %String
{
Quit "hello "_name
}
/// Instance method; properties declared with Property.
Property Count As %Integer [ InitialExpression = 0 ];
Method Increment() As %Status
{
Set ..Count = ..Count + 1
Quit $$$OK
}
}
Set assigns, _ concatenates strings, ..Name accesses members, $$$OK is a
success status macro.{ }; each member (Method/Property/Parameter/Index)
is its own block.namespace; if omitted the server's configured
default is used. Confirm the namespace for anything important.IRIS_MCP_READ_ONLY=true), iris_write_document,
iris_delete_document, and iris_compile_documents are not available. Don't
attempt them — tell the user the server is view-only.Rich IntelliSense (hover, go-to-definition, completion) comes from the official
InterSystems Language Server in VS Code, not from these tools — see the
.vscode/ configuration in the project README. The MCP tools are for programmatic
view/edit/compile/query; the Language Server is for interactive editing.
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub nayrode/poc-iris-mcp --plugin iris-code