Skip to main content

Build a script with AI

Ask an AI assistant to write a script for you. Build script with AI gives the assistant a link to the API reference of the module you're in, and the assistant then asks what you need.

It's in the Script Console and in the editors of fragments, gadgets, macros, web triggers and scheduled jobs.

Before you begin​

  • You need the Administer Jira global permission, or Confluence administrator rights.
  • You need access to an AI assistant. Script Master doesn't call any AI service itself.

Build a script​

  1. Open the item's editor, or the Script Console.

  2. Above the code, select Build script with AI. A menu opens.

    The Build script with AI menu with Claude, ChatGPT, Gemini and any other LLM or coding agent

  3. Select with Claude, with ChatGPT or with Gemini. The assistant opens in a new browser tab with the prompt filled in.

  4. Send the prompt. The assistant reads the API reference and asks what you want to build.

  5. Describe the script, for example A fragment for the work item panel that lists the linked work items and their status.

  6. Copy the code the assistant writes into the Script Master editor.

  7. Test it, then select Save.

Result: The item holds the assistant's code. Check what the code does before you turn the item on: the assistant can make mistakes.

Use another assistant or a coding agent​

  1. Select Build script with AI > with any other LLM or coding agent. A dialog opens with the prompt.
  2. Select Copy prompt.
  3. Paste the prompt into your assistant, coding agent or terminal app, and describe the script you need.

What the prompt says​

The prompt is two sentences: a link to the module's API reference, and a request to ask you what to write. For fragments it reads:

Read the Fragments API reference: https://docs.apportunity.xyz/script-master/code-editor/fragments-ai-prompt

Once you've reviewed it, ask me what fragment to write.

It holds nothing from your site. What you then tell the assistant goes to that AI service under its own terms.

The API references are written for AI assistants, and you can read them too: