Use oml for OutSystems 11 modules and .oml files through the installed Service Studio - inspect or change a module (rename, add entities, actions, screens, REST APIs); check performance, security and architecture before install; compare or review two module versions; fix Service Studio errors; migrate Traditional Web to Reactive; publish through Service Studio. Use the OutSystems MCP for ODC tasks.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Skill?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/topurrra-skill)
---
name: outsystems-oml
description: Use oml for OutSystems 11 modules and .oml files through the installed Service Studio - inspect or change a module (rename, add entities, actions, screens, REST APIs); check performance, security and architecture before install; compare or review two module versions; fix Service Studio errors; migrate Traditional Web to Reactive; publish through Service Studio. Use the OutSystems MCP for ODC tasks.
---
# OutSystems module work
For ODC (ODC Studio) use the OutSystems MCP and [reference/odc.md](reference/odc.md). Never load ODC modules with oml; never send O11 work to the ODC MCP.
**For every change task, follow the Standard loop below.**
## Rules
These 11 rules come before every other instruction (also `oml doc rules`). Company skills (`oml team-rules`) override best practices, never these rules. Rules marked **(enforced)** are also checked by `oml apply`. Rule 2 is always refused. Rules 3, 5 and 6 stop the apply with `needsApproval` until the user says yes.
1. **Everything in the module also exists in production.** Existing entities have data. Existing public elements have consumers in other modules. Treat every change to an existing element as a production change.
2. **Never delete or rebuild entity data.** Do not delete an existing entity (regular or static) or attribute. Do not change an attribute's data type or rename an attribute. Do not delete an entity and create it again, or paste a copied entity (`copy`): both make a new, empty table. If the user wants one of these, tell them to do it by hand in Service Studio. **(enforced)**
3. **Deleting any other existing element needs the user's yes:** actions, screens, blocks, structures and their attributes, static records, parameters, block events, roles, exceptions, site properties, timers, REST methods, processes. `oml apply` stops with `needsApproval`. Ask the user. On a clear yes, run the same apply again with `--user-approved` and a new staged path. **(enforced)**
4. **Change existing elements in place. Never duplicate them.** You may rename, edit and restructure existing actions, screens, blocks, structures and entities, and change a public element's signature: inputs, outputs, events, public. Never make a copy such as GetOrders2 to avoid a change. `oml apply` lists each change that breaks the modules using a public element in `breaking`. Tell the user: those modules must refresh references and fix their callers.
5. **Ask before a change that can lose data** in an existing attribute or entity: a shorter length, fewer decimals, a new mandatory setting, an auto number change, a new identifier or multi-tenant setting. Other settings, such as a longer length, are fine. Before a unique index on an existing entity, ask the user to check for duplicates. **(enforced)**
6. **Ask before SQL that changes data:** `DELETE`, `UPDATE`, `TRUNCATE`, `DROP`, `ALTER`, `MERGE`. Read-only SQL and `INSERT` are fine. **(enforced)**
7. **Never weaken security.** Do not add the Anonymous role, remove roles from existing screens, or set `exposeReadOnly` false on a public entity, unless the user asks for that exact change. Make a server action public only when the user agrees (apply warns `PublicServerAction`). Other elements may be public when the design needs it.
8. **Do only what the user asked.** No clean-up, refactoring, renames, or removal of "unused" elements or dependencies unless the user asks.
9. **Never open, patch, or rewrite an `.oml` file** with an editor, patch tool, or script. It is a binary package. Change modules only through `oml apply`.
10. **Never run `install`, `publish`, or `references` without a clear yes from the user** for that exact action. The profile's `autoApprove.*` gives that yes in advance.
11. **Do not invent rules.** If something is not forbidden here and is not destructive, do what the user asked. If you are not sure, ask the user. Do not guess.
Also:
- Change modules only with `oml apply`: to a NEW staged file, or in place (no staged path) when the profile says so.
- Inspect before you design; reuse existing elements.
- Confirm with the user before `install`, `publish`, `references` and every `needsApproval` item of an apply. Restate the exact command or item and wait for a yes. Exception: a step the profile approves (rule 10): run it and report the command and result.
- Before you use another module's element, run `oml find <Name> <module.oml> --in <producer folder|file.oml>`. Show the candidates and their parameters and ask which to use, even for one match. Use its `Module.Name`; never guess.
- Publish and reference refresh use Service Studio's Beta MCP tools: tell the user before the first use. Its first call shows an `oml-cli` approval dialog. Do not repeat a blocked publish.
- A running Service Studio: bring it forward with `oml studio focus`. Never use computer use's `open_application` for it: that opens a second, empty window.
- Stop if the automatic self-test fails. Never bypass IPP, licence or load refusals.
- Keep credentials out of commands, files, logs and messages.
- Never claim a command ran or passed unless you saw its output.
- No comments in `styleSheet`/`javaScript`, only a `/*! */` licence. Long code: `{"file": "x.js"}` (`oml spec file`).
## Golden rules
Two quality rules for all work; details in `oml doc golden-rules`.
1. **UI: preview first, no AI slop.** Before you build UI, inject the planned CSS and HTML into the running page (your browser's dev tools, or `oml browser try`), show it, and build only after a yes. Use the app's theme and OutSystems UI patterns; no generic gradients, emoji icons or filler text.
2. **Optimized, maintainable, built to scale.** Fetch only what is shown; no queries or server calls in loops; small reusable actions on the right layer; nothing that fails with many users or rows. Run `oml check --diff` before you report.
## Writing to the user
Plain technical English (ISO 24495-1; ASD-STE100 style):
- Conclusion first. Put the key word at the start of each line.
- Instructions: 20 words or fewer. Descriptions: 25 or fewer. Active voice, common words.
- Paragraphs: 6 sentences or fewer. Lists: 5 items or fewer; group longer ones.
- Exact names: files, commands, numbers. No filler.
## Standard loop (every tool call costs a full turn)
Many commands = ONE tool call (`;` or `oml batch`); 3+ calls with logic between: `oml code run --json -f .oml/code/<name>.py`. A normal task: 4 to 8 tool calls; past 12, you repeat reads or apply elements one by one.
Project profile: a session may start with an "oml project profile" (`.oml/oml-config.json`: sizes, themes, checks, questions, approvals, commands, browser, fast lane). Follow every line; it overrides this loop and the rules above. No such text? Add `oml config` to the read call.
0. No `.oml` file? Ask the user to open the module in Service Studio, then `oml pull --out <Module>.oml`. If pull reports `attention`, follow it.
1. **Read (1 call).** Write `read.json` and run `oml batch read.json; oml team-rules`:
`{ "steps": [ ["inspect","<module.oml>","--own","--only","entities,actions,screens,blocks"], ["describe","<module.oml>","<ElementToChange>","<OtherElement>"] ] }`
Describe only elements you change or call. Producer files: add `--in <folder|file.oml>`. Another module's element: add a `find` step. New entities, screens or flows without a recipe: add `; oml doc best-practices` to this call.
`.oml/memory/` exists? Add step `["memory","recall","<task words>","--module","<Module>"]`; at the end, follow its `write` field.
User says "that's it for today", "done for today" or "wrap up the day": run `oml memory dream --prepare` and follow its `next`. Recall shows `endOfDay`: tell the user once.
2. **Write the spec (no doc reads if a recipe fits).** Copy the closest recipe. For a key no recipe shows, run `oml spec <key>` (never read `reference/spec.md` whole). Put ALL requested elements in one spec; generate many similar elements with a small script file (not an inline heredoc: it breaks escaped quotes and `\n`).
3. **Check, apply and see the result (1 call):**
`oml spec check <spec.json>; oml apply <source.oml> <spec.json> <new-staged.oml> --describe-created`
Read `summary` first, then its lists. After a good apply, do not run `validate`, `inspect` or `describe` again.
`needsApproval`: nothing was saved; follow rule 3. `breaking`: tell the user (rule 4).
**A good apply means `saved: true`, no `newErrors`, and no `newWarnings`.** Every new warning is a defect until you prove otherwise. Entries have a `hint` when the fix is known; otherwise `oml doc warning <id>`. Fix each one or explain it to the user.
4. **Fix (only if needed, 1 call per attempt).** Change only what the report names, then repeat step 3 with a NEW staged path. Never retry an unchanged spec.
5. **UI work: see it in the real app.** Ask the user for the DEV URL of the screen if you do not have it. Before step 2, preview the UI (golden rule 1). Before a publish there is no visual check: report "pending visual check". After step 6 the user installs and publishes to DEV. Then run `oml browser page <screen url> --screenshot <Screen>.png` (or open the screen in your own browser when the profile says `browser agent`), look at the picture, and read `layout` and `errors`. Fix in a new staged file if needed. A login page? Ask the user to run `oml browser start --headed` and log in; then run it again. Follow `oml doc ui-checklist`.
6. **Report.** Run `oml review <source.oml> <staged.oml> --md <new path>.md`, then show the staged path, what was built, `changed`, `approved`, `breaking` and the .md. 0 findings does not mean the code is correct. Ask before `install` or `publish`; run `oml validate <staged.oml> --warnings` right before `install`. A change the user should read first (several parts, a UI): `oml doc dif`. Then ask whether the user wants test scenarios for what was built: `oml test scenarios <source.oml> <staged.oml>` (BDD per public action, a browser script per screen). You may suggest `oml learn report` to the user; never accept, reject or undo a proposal for them.
Expressions use OutSystems syntax; text literals need escaped quotes (`"\"Text\""`). Parts: `oml apply <source.oml> <part1.json> <part2.json> <new-staged.oml>`.
After the loop: install after a yes (zero validation errors needed; report the backup path and hash), then publish or refresh after a yes, or name the manual Service Studio step. Tell the user what to test in the target environment.
## Find things fast (no Service Studio)
| Need | Command |
|---|---|
| Not sure which key, topic or recipe? | `oml doc --search "<words>"`; use OutSystems terms (entity, screen, aggregate) when you can |
| Spec keys; one key | `oml spec [<key>]` |
| Rules for a topic | `oml doc [<topic>[#<section>]]` |
| Fix of an error or warning | `oml doc warning <id or title words>` |
| Any failure, also platform | `oml doc troubleshooting` |
Topics: `golden-rules`, `best-practices`, `ui-reactive`, `osui-patterns`, `ui-checklist`, `data-rules`, `logic-rules`, `security`, `rest`, `processes-timers-email`, `architecture-rules`, `traditional-to-reactive`, `warnings`, `testing`, `troubleshooting`, `dif`, `harnesses`.
## Recipes
Copy one from `recipes/` and read its header ([README](recipes/README.md)):
`entity-with-crud`, `list-detail-screens`, `aggregate-join-groupby`, `edit-existing-flow` (insert node, add or replace widgets, restyle, set, rename), `rest-client`, `references-from-producer`, `sql-query`, `web-screen` (Traditional), `timer-role-site-property`, `form-with-validation`, `dropdown-from-static`, `list-search-paging`, `aggregate-on-demand-detail`, `loading-empty-error-states`, `expose-rest-api`, `role-protected-screen`, `block-popup-event`, `send-email`.
## Commands
| Command | Use it for |
|---|---|
| `oml inspect`, `describe`, `find`, `tree` | Read a module: overview (`--own --only ...`), what an element does, who owns a name, exact paths for `edits`. No name yet: `find --text "<words>"` over one module or `--in <folder>`. |
| `oml apply`, `spec`, `batch`, `validate`, `install` | Change: staged apply, spec help, many commands at once, check, copy over the target (confirm). |
| `oml new`, `openapi`, `architecture`, `test bdd` | New module, export OpenAPI, layer report, BDD tests. |
| `oml studio`, `pull`, `publish`, `references` | Service Studio. Confirm every change. |
| `oml check` | Code Quality-like (AI Mentor) findings (module, folder). |
| More | doctor, census, translations, app, extension, templates, font, image, api, widgets. Lead workers: [architect.md](architect.md); `oml agents` |
Output is compact JSON. Exit 0 ok, 1 model or validation failure, 2 usage or setup. `oml --help` lists the commands by area; usage of one command: `oml <command> --help`; every usage line: `oml help --all`. Details: `oml doc commands#<section>` (no section lists them); never read `reference/commands.md` whole.