Claude Code / AI Agent Sharing Thread

Hi all,

I have been using Claude Code with SysIDE in VSCode with a decent amount of success. I wanted to share what is working for me so far, and see if anyone else has lessons learned to share.

The biggest help so far has been making a custom MCP to connect Claude with SysIDE’s CLI model validation tools, which live in the vscode extensions directory. Thank you to the SysIDE team for making these transparent, by the way! With this connection Claude can easily review models to make sure the code has no errors. It looks to me that the SysML v2 LSP is a wrapper for these CLI tools, so I just access them directly rather than going through the LSP. Claude can help you construct this MCP pretty easily, but I can share my code if people are interested.

Another useful thing is a sysml-patterns.md rule where common modeling patterns are kept. Examples:

## Abstract Part with Multiplicity Pattern

Use when a component contains N sub-parts that must each be individually addressable:

```sysml
abstract part <slots> slotName : PartType [N];
part <s1> name1 :> slotName;
part <s2> name2 :> slotName;
// ... N total named specializations
```

- The `abstract part` declares the typed slot with multiplicity `[N]`
- Each named part specializes it with `:>`
- Short aliases in `< >` are optional but useful for cross-referencing



## ISQ Attributes with SI Default Values

For attributes with known fixed values, assign them inline using SI units.

**Operator choice — `:>` vs `:`**:
- Prefer `:>` (subsetting) when the ISQ name is a **Feature** (attribute instance). This is the common case for physical quantities like `ISQ::voltage`, `ISQ::frequency`, `ISQ::electricCurrent`, `ISQ::mass`, `ISQ::temperature`.
- Use `:` (typing) when the ISQ name is only an **AttributeDefinition** (no instance exists to subset). Example: `ISQ::TemperatureValue` is a definition — there is no feature named `TemperatureValue` to redefine. When in doubt, try `:>` first; if validation fails with "cannot subset a definition", switch to `:`.

```sysml
// ISQ Features — use :> (subsetting)
attribute inputVoltage      :> ISQ::voltage          = 28  [SI::V];
attribute inputCurrentMax   :> ISQ::electricCurrent  = 1.8 [SI::A];
attribute frequencyStepSize :> ISQ::frequency        = 500000    [SI::Hz];  // 0.5 MHz
attribute dataRateMax       :> ISQ::frequency        = 28000000  [SI::Hz];  // 28 MHz

// Temperature min/max — no dedicated ISQ feature; use : with TemperatureValue
attribute operatingTempMin  : ISQ::TemperatureValue;   // e.g. -40 °C — assign value separately
attribute operatingTempMax  : ISQ::TemperatureValue;   // e.g. +85 °C

// Single temperature — use :> with the ISQ::temperature feature (preferred)
attribute temperature       :> ISQ::temperature;
```

Hey Mason,

I’ve recently been thinking about doing something similar for Claude Code, maybe setting it up as one or more skills. Could you share the code for what you did with the MCP?

Thanks :slight_smile:

Hi Axel,

I’m using Claude code as well, and I’ve made a few changes since my original post. I still use the syside CLI as the main method of checking if the language is syntactically correct, but I just put the CLI commands in a “sysml-check” skill instead of an MCP, to reduce the json bloat. I found the commands at ~/.vscode/extensions/sensmetry.syside-modeler-0.8.7-linux-x64/bundled/syside-cli/bin/.

This tool made by some folks at gitlab is really nice. It basically indexes the model and can be used by agent for faster querying and model navigation. Basically, instead of agents reading a bunch of text files and inferring connections, this tool can query an element by name and just give a list of related elements. You could do this with syside automator and some python scripts as well, but the nomograph utility works great right out of the box. It has an MCP, but again I just provide the CLI commands in a skill.

The problem I still struggle with is defining what counts as “good” modeling, aside from syntactically correct code. Ultimately the definition of good is subjective and project dependent. With better way to assess model quality, there could be a subagent write and check loop, which theoretically would result in better models. For now, I just have templates that I defined by hand, with instructions to “make your code look like this”. If anyone has suggestions for how to do this or put on some more guardrails, let me know! Maybe the rules could even be defined as SysML requirements, but that might be too cute.