forge-app-builder
Plan, build, scaffold, or safely extend Atlassian Forge apps using current official documentation. Use for fresh Forge apps,…
Optimizes Atlassian Forge apps to reduce platform consumption and avoid unnecessary costs using Atlassian's "Optimise Forge platform costs" guidance. Use when the user asks to optimize Forge app costs, reduce Forge invocations, lower GB-seconds, reduce storage or log usage, tune
Claude Code
$ npx -y skills add atlassian/forge-skills --skill forge-cost-optimizer --agent claude-code
Codex
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a codex -y
Cursor
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a cursor -y
Gemini CLI
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a gemini-cli -y
GitHub Copilot
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a github-copilot -y
OpenCode
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a opencode -y
Windsurf
$ npx skills add atlassian/forge-skills --skill forge-cost-optimizer -a windsurf -y
name: forge-cost-optimizer description: > Optimizes Atlassian Forge apps to reduce platform consumption and avoid unnecessary costs using Atlassian's "Optimise Forge platform costs" guidance. Use when the user asks to optimize Forge app costs, reduce Forge invocations, lower GB-seconds, reduce storage or log usage, tune memory, replace polling, improve scheduled triggers, reduce KVS writes, move work to the frontend, use bridge APIs, batch API calls, add caching, or evaluate Forge Remote trade-offs. By default, perform an audit first and offer to make the recommended changes after presenting the audit. Only modify files immediately when the user explicitly asks the agent to implement or apply optimizations.
Optimize Forge apps for lower platform consumption while preserving correctness, security, and maintainability. This skill turns Atlassian's Forge cost optimization guidance into an actionable agent workflow.
Base recommendations on Atlassian's official guide: <https://developer.atlassian.com/platform/forge/optimise-forge-costs/>
If live Forge documentation tools are available, search the Forge docs for the exact module or API before changing code that depends on current manifest syntax, bridge APIs, storage APIs, trigger filters, or Forge Remote behavior.
Prioritize changes that reduce unnecessary work:
1. **Avoid invocations entirely** — move safe work to UI Kit / Custom UI frontend, use context from the bridge, replace polling with events, add trigger filters. 2. **Do less work per invocation** — bulk API calls, field selection, source-side filtering, pagination, early exits, bounded concurrency. 3. **Reduce billed data volume** — trim resolver payloads, reduce KVS reads/writes, avoid large log payloads, use entity properties where appropriate. 4. **Tune compute cost** — right-size `memoryMiB`, reduce duration, offload only when the operational trade-off is justified.
Never reduce costs by weakening authorization, exposing secrets to the frontend, skipping required validation, dropping necessary error handling, or making data stale beyond the user's business requirements.
When the user asks to optimize an existing Forge app, immediately inspect the app before asking questions unless the target app directory is ambiguous.
**Default behavior is audit-first:** complete the cost optimization audit, present prioritized recommendations, and ask the user whether they want the agent to make the recommended changes. Do not modify files during the initial audit unless the user explicitly requested implementation in the same prompt, such as "make the changes", "apply the optimizations", "fix these issues", or "update the code".
Read, in order:
1. `manifest.yml` / `manifest.yaml` — functions, modules, triggers, scheduled triggers, remotes, resources, permissions, endpoint mappings, `memoryMiB`. 2. `package.json` — dependencies, scripts, Forge package versions. 3. Backend/resolver code — `src/**`, handlers referenced by the manifest, storage usage, API calls, logging, async control flow. 4. Frontend code — UI Kit or Custom UI resources, bridge usage, `invoke()` patterns, render lifecycle, caching, payload needs. 5. Any tests or fixtures that describe behavior to preserve.
After the audit, offer clear next-step options such as implementing all quick wins, implementing selected high-impact changes, or collecting usage measurements first. If the user explicitly requested implementation upfront, make safe, localized improvements after the audit findings are understood and explain trade-offs.
Identify which cost drivers the app likely uses:
| Driver | Inspect | Common signals | |---|---|---| | Function GB-seconds | `manifest.yml`, handlers | many resolver calls, slow sequential APIs, high `memoryMiB`, heavy transforms | | Invocations | frontend `invoke()`, triggers | calls on render, chatty UI, scheduled polling, broad event subscriptions | | KVS / Custom Entities | `storage.*` usage | writes on every request, loops over keys, low TTL cache churn, large values | | Logs | `console.*` | full event/API payload logging, debug logs in hot paths | | Forge SQL | SQL client usage | frequent compute requests, long queries, oversized stored data | | Remote / egress | `remotes`, fetch calls | external polling, compute offload candidates, Runs on Atlassian implications |
When usage metrics are unavailable, mark estimates as qualitative: `High`, `Medium`, `Low`, or `Unknown`.
Prefer removing function invocations over making them cheaper.
Check for:
Keep logic in the backend when it requires `asApp()`, Forge storage, secrets, external credentials, cross-user authorization checks, or sensitive business rules.
Check `scheduledTrigger`, `trigger`, and `webtrigger` modules.
Recommended changes:
Atlassian Forge lets you build and deploy apps directly on the Atlassian platform - issue panels, Confluence macros, dashboard gadgets, and more.
Plan, build, scaffold, or safely extend Atlassian Forge apps using current official documentation. Use for fresh Forge apps,…
Performs a lightweight pre-release readiness review of Atlassian Forge apps across manifest/module wiring, architecture, runtime…
Guides building and deploying Atlassian Forge Teamwork Graph connector apps that ingest external data into Atlassian's Teamwork…
Diagnoses and fixes issues in Atlassian Forge apps. Use this skill whenever a Forge app has errors, crashes, shows blank UI,…
Guide a first-time Forge builder through building Forge Guru, a Rovo Agent that answers Forge questions. Use for Forge…
Performs a white-box security review of Atlassian Forge apps using structured, Forge-specific security rules and evidence-driven…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.