Skip to main content

Prompt Library

The assistant is at its best when you point it at something real and ask a specific question. Set the Mode so the conversation is allowed to do what you are asking, check the project scope names the project you mean, and the rest is just typing.

Everything below is something the assistant can actually do. It reads the live state of your project — workflows, nodes, files, samples, logs, documents, catalogs — and in Build it changes files after you approve each change.

Modes are covered in Modes and Project Scope; the approval step in Approvals.

How to write a good prompt

HabitInstead ofType
Name the thing, or open its page"why is my interface broken?""why is the Lab Results Inbound workflow's Parse ORU node erroring?"
Say what outcome you want"look at this script""review this script and list what would break if OBX-5 is empty"
Give the constraint"map these fields""map to the receiver's profile in receiver-spec.pdf — MRN must carry assigning authority HOSP-MRN"
Ask it to read, not assume"does linkiir.hl7.get take a segment?""look up the signature of linkiir.hl7.get and show me the exact arguments"
Ask for the evidence"quote the config field you based that on"
The fastest habit

Open the node or workflow you actually mean, then ask about "this node" or "this file". On a node's scripting page those phrases resolve to what the page names, so you never have to spell out a path.

Signatures are looked up, not remembered

The assistant searches the Linkiir Scripting API with a tool rather than recalling it. That makes "confirm the signature of…" a reliable prompt, and "what do you think the arguments are?" a poor one. Ask it to confirm.

Understand an existing interface

When you inherited something, or you are about to change it and want to know what it touches.

Mode: Default

What you wantPrompt to type
The shape of a workflowwhat does the Lab Results Inbound workflow do, node by node, and where does a message end up?
What one node is forexplain this node: what it receives, what it does, and what it sends on
A script walked throughwalk me through this file and tell me which HL7 fields it reads
Where a value comes fromthe receiver gets an empty PID-3 — which node sets it, and from what?
The config in plain termsread this node's configuration and its config schema, then explain what each field I have set actually controls
The test data in playlist this node's test samples and summarise what each one covers

Troubleshoot a failing interface

When something was working and now is not. Diagnose works out why before proposing anything, and changes nothing.

Mode: Diagnose

What you wantPrompt to type
Why nothing is arrivingno ADT messages have reached the EHR since this morning — search the logs for the ADT Inbound workflow and tell me where they stop
An error explainedthis node logged "attempt to index a nil value" — find the log entry and tell me which line of the script it came from
What changedshow me the working-tree diff for this node's files and tell me whether any of it explains today's failures
A backing-up queueread the queue status for the Route to EHR node and tell me whether it is draining
The node's own historyread the state history for this node over the last day and tell me when it first went unhealthy
A fix proposal to reviewbased on what you just read, describe the smallest change that would fix this — do not change anything yet
Diagnose proposes, Build changes

When you are happy with the diagnosis, switch to Build and say apply the fix you described. The conversation keeps its context across the switch.

Work with logs and a specific message

When you have a correlation id from a colleague, a ticket, or the log viewer, and you need to know what happened to that one message.

Mode: Diagnose

What you wantPrompt to type
Find the messagesearch the logs for correlation id 7f3c9a21 and list every entry in order
Read the payloadread the message payload for that log entry and tell me which segments are present
Trace it across nodesfollow correlation id 7f3c9a21 through the workflow and tell me which node it last succeeded at
Count a patternsearch today's logs for "ACK timeout" in this workflow and tell me which node reports it most
Compare good and badfind one successful and one failed ORU in today's logs and tell me what differs in the log detail
Payloads reach the assistant masked

Clinical message content is redacted before the assistant sees it. It can tell you which segments and fields are present, and where a structure is malformed. It cannot read a patient's name, MRN, or result value back to you — for that, use the log viewer yourself.

Write and fix Lua

Reviewing costs you nothing, so review in Default first and switch to Build only when you want the file changed.

Mode: Default to review, Build to change

What you wantPrompt to type
A reviewreview this file for anything that throws on a message with no OBX segment
A signature confirmedlook up linkiir.hl7.get and linkiir.hl7.set and show me the exact signatures before you use them
An error explainedexplain this error and show me the line that causes it: "bad argument #2 to 'set'"
Better failure handlingwrap the PID-3 lookup so a missing MRN logs a clear message and routes to the error path instead of throwing
A syntax check before savingvalidate this script without running it
A real test runrun this script against the ORU-happy-path sample and show me the output and the variables
A closer look at the middlerun it paused at the line where OBX-5 is read and tell me what is in scope there
A sample for the bad caseadd a test sample called ORU-missing-OBX built from the happy path with the OBX segment removed
Validate, then run, then save

Ask for validate this script and run it against <sample> in the same turn as the edit. You see the change, the syntax check, and the actual output before you approve anything.

Map between message formats

Field-by-field work: HL7 v2 to FHIR, X12, a mapping sheet someone gave you. Plan the mapping, then build the transform.

Mode: Plan, then Build

What you wantPrompt to type
The mapping planned/map-formats plan a mapping from this ORU^R01 to a FHIR Observation, using the field list in lab-mapping-sheet.xlsx from this project's documents
Positions spelled outlist which source fields feed the FHIR Patient resource, addressing them by position — PID-5.1, PID-5.2, PID-3[2] and so on
A repeat handledPID-3 repeats — write the lookup so it takes the identifier whose assigning authority is HOSP-MRN, not the first one
A code set translatedtranslate the sending system's order-status codes to the receiver's using the table in receiver-spec.pdf, and tell me which codes have no target
An X12 segmentexplain what this script reads out of the 837P loop 2300 and whether it handles a missing CLM segment
The transform writtenwrite the transform for the mapping you just planned, then validate it and run it against the ORU-happy-path sample
Mapping sheets have to be uploaded first

The assistant searches the content of the project's uploaded documents, and only when that project is in scope. Upload the spec or mapping sheet to the project, then name it in the prompt. See Project documents.

Build a new interface or adapter

Plan it in Plan so you can read the steps before anything exists, then switch to Build.

Mode: Plan, then Build

What you wantPrompt to type
A plan to read first/build-adapter plan an outbound adapter that posts our ORU results to a vendor REST endpoint with bearer auth — steps only, change nothing
Reuse checked before codebefore we write anything, check the catalogs and this project's node templates for an existing HTTP outbound adapter we could start from
The skeleton createdcreate a workflow called Results Outbound with a scripting node called Post to Vendor, from the HTTP Outbound template if one exists
The script writtenwrite the request body builder in this node, then validate it
A sample and a testadd a test sample from our standard ORU, then run this node against it and show me the output
Wiring it upconnect Post to Vendor downstream of Format Result, and show me the workflow when you are done
Ready to commitstage the files you changed in this node for commit
Build stops before each change

Every change arrives as a card you approve or reject before it happens. Nothing is committed by the assistant — staging is as far as it goes, and the commit happens when you approve the commit card. See Approvals.

Document an interface

The doc lives beside the node as a .md file, so it travels with the code.

Mode: Build

What you wantPrompt to type
The reference doc/document-interface write README.md in this node covering what it receives, what it sends, and the config fields that matter
A diagram of the flowinclude a mermaid flowchart of the message path through this workflow, including the error branch
A sequence of the exchangeadd a mermaid sequenceDiagram of the ORU send and the ACK back from the vendor
A mapping tableadd a field mapping table: source position, target path, and any transformation applied
Failure modes written downadd a failure modes section based on the error handling actually in this script, with the log message each one produces
The state machine drawnadd a mermaid stateDiagram-v2 of the retry states this node moves through
Mermaid renders

A fenced mermaid code block in a node's .md file renders as a diagram — flowchart, sequenceDiagram, stateDiagram-v2, erDiagram, classDiagram, gantt, pie. Ask for the diagram type you want by name.

Reuse what already exists

Ask before you write. The assistant prefers an existing catalog template or library over new code, and it can tell you what is on the shelf.

Mode: Default

What you wantPrompt to type
What is availablelist the catalogs we subscribe to and what templates each one offers
Whether it already existsis there already an adapter or template for an SFTP file pickup, in a catalog or in this project?
The project's own building blockslist this project's node templates and libraries, and tell me what each is for
Shared code extractedthree nodes have the same MRN normalisation function — create a library called hl7-utils, move that function into it, and pin this node to it
A library version publishedadd the updated normalisation file to hl7-utils and publish a new version
Something installedinstall the HL7 helpers library from the subscribed catalog into this project

Onboarding onto an unfamiliar project

Your first hour on a project someone else built.

Mode: Default

What you wantPrompt to type
The tourgive me a tour of this project: its workflows, what each one is for, and how they relate
What is liveshow me this project's status and tell me which workflows and nodes are currently running
The house styleread three of this project's scripting nodes and tell me what conventions they share — naming, error handling, logging
What is written downlist this project's documents and tell me what each one covers
The riskiest partwhich node in this project has the most complex script, and what makes it complex?
Where to be carefullist any uncommitted changes across this project's nodes and show me the diffs

Using the built-in Skills

A Skill is a set of instructions the assistant follows for that request. Four ship with Linkiir.

SkillWhat it is forPrompt that pairs with it
/build-adapterBuilding, extending, or repairing an adapter to an external service/build-adapter add retry with backoff to this vendor REST adapter
/diagnose-faultFinding why a node or workflow is failing. Read-only/diagnose-fault the Route to EHR node has been unhealthy since 06:00
/map-formatsMapping fields between formats and writing the transform/map-formats map this ADT^A08 to our FHIR Patient update
/document-interfaceWriting the reference doc beside an interface node/document-interface document this node for whoever is on call

Type / in the composer and choose from the picker — that is what attaches the Skill. Typing the name as plain text does not attach anything. See Attachments and Context.

Your organisation may add its own Skills, and may replace a built-in with a house version of the same name. See Organization Skills.

Prompts that will not work, and what to ask instead

What you might typeWhy it does not workAsk this instead
start the node for meStarting and stopping nodes and workflows is yours, not the assistant'sget this node ready to start and tell me what to check first — then start it yourself
commit thisIt can stage a path; the commit happens when you approve the commit cardstage the files you changed for commit
change the AI budget to 200Linkiir settings, users, and roles are not something it managesAsk an administrator — see AI Roles and Permissions
look up the vendor's current API docsIt has no internet access unless an administrator enabled web search for the model you choseUpload the vendor spec to the project's documents and name it in the prompt
what did my colleague ask you yesterday?Conversations are private to each userAsk your colleague to share what they found
read the patient name in this messageMessage payloads are masked before the assistant sees themtell me which segments and fields are present in that message — read the value in the log viewer yourself

Next