$npx -y skills add atlassian/forge-skills --skill forge-app-builderGuides building, deploying, troubleshooting, and installing Atlassian Forge apps — custom extensions built with the Forge CLI (forge create, forge deploy, forge install). Use when the user wants to create a Forge app (issue panels, dashboard gadgets, Confluence macros, global pag
| 1 | # Forge App Builder |
| 2 | |
| 3 | **When building a Forge app, the agent MUST complete this workflow in order. Do not skip steps. Do not substitute manual instructions for running the scripts below.** |
| 4 | |
| 5 | ## Critical Rules |
| 6 | |
| 7 | 1. **Always use `forge create`** to scaffold apps — it registers the app and generates a valid app ID |
| 8 | 2. **Never manually scaffold** — apps without valid app IDs cannot be deployed |
| 9 | 3. **If `forge create` fails, STOP** — inform the user and provide the manual command |
| 10 | 4. **Never ask for API tokens in chat** — direct users to run `forge login` in their terminal and enter credentials there |
| 11 | 5. **Always ask the user to choose** when multiple options exist (developer spaces, sites) — never pick on their behalf |
| 12 | 6. **Always ask the user for their Atlassian site URL during installation** — never try to discover it from other apps, environment variables, or any other source |
| 13 | 7. **Always run the deploy script for deploy and install** — do not give the user only manual `forge deploy` / `forge install` commands as the primary outcome; run `scripts.deploy_forge_app.py` yourself |
| 14 | 8. **Set `ATL_FORGE_ATTRIBUTION_SKILL_NAME=forge-app-builder` on `forge` commands run for this skill** — prefix `forge` invocations with this env var: ones you run in the shell (e.g. `forge developer-spaces list`, `forge lint`) **and the interactive `forge create` command you hand the user as a fallback**. The bundled scripts set it automatically; other commands shown in this skill omit it for brevity — add it when you run them. The only exclusions are `forge login` and `forge tunnel` (user-run auth / live-dev commands). |
| 15 | |
| 16 | ## MCP Server Prerequisites |
| 17 | |
| 18 | This skill works best with the following MCP servers. The scripts and CLI workflow function without them, but the agent will lack access to up-to-date Forge documentation for template selection, module configuration, and code patterns. |
| 19 | |
| 20 | |
| 21 | | MCP Server | Required? | Purpose | |
| 22 | | ------------- | -------------------- | ------------------------------------------------------------------------- | |
| 23 | | **Forge MCP** | Strongly recommended | Template lookup, module discovery, manifest syntax, UI Kit/backend guides | |
| 24 | | **ADS MCP** | Optional | Atlaskit component/token/icon lookup (Custom UI apps only) | |
| 25 | |
| 26 | |
| 27 | If MCP servers are not connected, inform the user that code guidance may be based on the model's training data and could be outdated. Recommend they verify against [developer.atlassian.com/platform/forge](https://developer.atlassian.com/platform/forge/). |
| 28 | | |
| 29 | |
| 30 | ## Agent Workflow |
| 31 | |
| 32 | **Complete steps 0–5 in order. Run the scripts yourself; do not only instruct the user to run them.** |
| 33 | |
| 34 | ### Step 0: Prerequisites (Install Automatically If Missing) |
| 35 | |
| 36 | **Before any other steps**, call the `forge-development-guide` tool to get the current Node.js version requirement and CLI setup instructions. Then check and install prerequisites: |
| 37 | |
| 38 | 1. **Node.js** — Run `node -v`. If missing or below the version specified in the development guide: |
| 39 | - **macOS (Homebrew):** `brew install node` |
| 40 | - **nvm:** `nvm install <version>` then `nvm use <version>` |
| 41 | - **fnm:** `fnm install <version>` then `fnm use <version>` |
| 42 | - **Other:** [https://nodejs.org](https://nodejs.org) (LTS) |
| 43 | 2. **Forge CLI** — Run `forge --version`. If missing: |
| 44 | ```bash |
| 45 | npm install -g @forge/cli |
| 46 | ``` |
| 47 | 3. **Forge login** — Run `forge whoami`. If not logged in: |
| 48 | - **Never ask for or accept API tokens in chat** — tokens are sensitive; the user must enter them only in their terminal |
| 49 | - Direct the user to create an API token: [https://id.atlassian.com/manage/api-tokens](https://id.atlassian.com/manage/api-tokens) |
| 50 | - Tell the user to run `forge login` **in their own terminal** (not via the agent). The CLI will prompt for: |
| 51 | - Atlassian email |
| 52 | - API token (paste only in the terminal when prompted) |
| 53 | - Example message: *"You need to log in to Forge. Create an API token at [https://id.atlassian.com/manage/api-tokens](https://id.atlassian.com/manage/api-tokens), then run `forge login` in your terminal. Enter your email and to |