name: objectscript-xref-usage description: 'Query PXW_Xref.Data in InterSystems IRIS to find which ObjectScript classes, methods, and properties use or reference another class member. Use for xref questions, caller lookups, and "what classes use" requests.' argument-hint: 'Target class or member, for example %ISQL.Transformer' user-invocable: true
ObjectScript Xref Usage
Use this skill when the user asks which classes, methods, or properties use an ObjectScript class or member in the PXW xref database.
Data Model
PXW_Xref.Data stores xref relationships:
ItemType = 'CLS'identifies class relationships.ItemKey1is the referenced class name.ItemKey2is the referenced method or property name.CalledByTypeidentifies the caller document type.CalledByKey1is the calling class or document name.CalledByKey2is the calling method or property name.CalledByKey3identifies the call occurrence within the caller member.CalledByCommanddescribes the relationship kind.LineNumberis the source line in the caller member.
The caller columns are named CalledByKey1, CalledByKey2, and CalledByKey3.
Procedure
- Read the workspace VS Code settings and locate
pxw.xref.connection. - Use the
namespacevalue frompxw.xref.connectionas the namespace for every xref query. Do not infer it from the active connection, the target class, or another settings key. If the setting or its namespace is missing, stop and ask for it rather than choosing a fallback. - Never query
PXW_Xref.Datain%SYS. In particular, do not fall back to%SYSwhen the configured namespace is unavailable, and do not run SQL in%SYSfor this data. For this repository, the configured namespace isUSER. - Query
PXW_Xref.Datain that configured namespace withItemType = 'CLS'and the target class inItemKey1. - Select
CalledByKey1,CalledByKey2, andLineNumberfor the caller list. IncludeCalledByCommandwhen the relationship type matters. - Exclude rows where
CalledByKey1 = ItemKey1when the user wants external users rather than the target class's internal references. - Use
DISTINCTonly when duplicate relationship rows are not useful; preserve individual rows when the user needs every occurrence. - Resolve each returned class name to an existing workspace source file where possible. ObjectScript class names map to class files by replacing dots with path separators and appending
.cls; search the workspace source roots when the class is not at the repository root. - Render resolved class names as Markdown links to the workspace-relative file, using the xref
LineNumberas the link anchor when that line exists in the local source. Link the member name separately only when a precise member location is known. - Leave classes without a local source file as plain text and say that the source is not present in the workspace. Never fabricate file links or use
file:///vscode://URLs. - Report the calling class, calling member, and source line. State clearly whether internal self-references were excluded.
Query Template
SELECT DISTINCT
CalledByKey1,
CalledByKey2,
LineNumber
FROM PXW_Xref.Data
WHERE ItemType = 'CLS'
AND ItemKey1 = '<target-class>'
AND CalledByKey1 <> '<target-class>'
ORDER BY CalledByKey1, CalledByKey2, LineNumber
For a specific method or property, add:
AND ItemKey2 = '<target-member>'
Important Checks
- The xref database may contain stale or incomplete data, so use a direct source search to corroborate surprising results.
- Class names and member names may be returned in uppercase by IRIS SQL even when source uses mixed case.
- A direct search for the exact token can miss relationships represented by the xref builder, while the xref table can include internal implementation references. Explain this distinction when relevant.
Related skills
Next.js App Router Expert
Development
A skill that turns Claude into a Next.js App Router expert.
Claude CodeCursoradvanced
890
234
3,485
README Generator
Development
Creates professional and comprehensive README.md files for your projects.
claudeCursorWindsurfbeginner
259
72
1,383
API Documentation Writer
Development
Generates comprehensive API documentation in OpenAPI/Swagger format.
claudeCursorWindsurfintermediate
156
44
1,265