agentleFS
ulpi-ioulpi-io/browse/.agents/skills/build-dmg/SKILL.md

build-dmg

Skill15 starsChanged 8 months agoApache-2.0View on GitHub

Build a distributable DMG installer for any macOS Xcode project. Handles archiving, code signing, DMG creation with styled Finder window, and version management. Trigger on: "build a DMG", "create DMG installer", "package as DMG", "build for distribution", or when the user wants to distribute a macOS app outside the App Store.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If the project doesn't have one, create a minimal scripts/ExportOptions.plist:

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

build-dmg

Build a styled DMG installer from any macOS Xcode project.

Before Running

Detect the project settings by reading available files:

  1. App name — from package.json name, project.yml name, .xcodeproj directory name, or ask the user
  2. Scheme — run xcodebuild -list to discover available schemes, or ask the user
  3. Project/Workspace — auto-detected if only one .xcodeproj or .xcworkspace exists at root
  4. ExportOptions.plist — check if scripts/ExportOptions.plist exists. If not, ask the user for the path or whether to create one
  5. VERSION file — check if a VERSION file exists at project root
  6. xcodegen — check if project.yml exists (indicates xcodegen usage)
  7. Team ID — check existing build settings or ask the user

Present the detected configuration to the user and confirm before building.

Running the Build

The build script is at .claude/skills/build-dmg/helpers/build-dmg.sh. Run it directly from the project root with the required env vars:

APP_NAME="<app>" SCHEME="<scheme>" bash .claude/skills/build-dmg/helpers/build-dmg.sh

The script uses the current working directory as the project root. Do NOT copy the script into the project.

Required Environment Variables

VariableDescription
APP_NAMEDisplay name for the .app and DMG volume
SCHEMEXcode scheme to build

Optional Environment Variables

VariableDefaultDescription
PROJECTauto-detectedPath to .xcodeproj
WORKSPACE—Path to .xcworkspace (takes precedence over PROJECT)
INFO_PLIST<SCHEME>/Info.plistPath to Info.plist for version injection
EXPORT_OPTIONSscripts/ExportOptions.plistPath to ExportOptions.plist
TEAM_ID—Apple Development Team ID
VERSION_FILEVERSIONPath to VERSION file. Set to "none" to skip version management
USE_XCODEGEN0Set to "1" to run xcodegen generate before building
DMG_BACKGROUND—Path to a background image for the DMG window

After the Build

  1. Success — report the DMG path, version, and build number from the script output
  2. Failure — extract the error lines from xcodebuild output and summarize what went wrong
  3. Version bump — if the script bumped the VERSION file, remind the user to commit it

ExportOptions.plist

If the project doesn't have one, create a minimal scripts/ExportOptions.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>method</key>
    <string>development</string>
    <key>signingStyle</key>
    <string>automatic</string>
</dict>
</plist>

For distribution outside the App Store, change method to developer-id and ensure the team has a Developer ID certificate.

Do NOT create or modify ExportOptions.plist without asking the user first.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.