agentleFS
colinc86colinc86/gloss/.claude/skills/run-app/SKILL.md

run-app

Skill0 starsChanged 43 days agoMITView on GitHub

How to build, launch, drive, and screenshot the Gloss macOS app from the command line so a change can be verified in the real app, not just in tests. Used by the built-in /run skill and by any session that needs to see the UI.

13 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use release.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • MicrosoftSkill

    release

    Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 12 edited versions we read keep these.

  • 0

    Distinctive

    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 window-id lookup fails, fall back to screencapture -x /tmp/gloss-shot.png for the whole screen.

    line 46

“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “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

Run the app

Scheme and project names contain spaces; always quote them.

Build

xcodebuild -project "Gloss.xcodeproj" -scheme "Gloss" \
  -configuration Debug -destination 'platform=macOS' \
  build 2>&1 | grep -E 'error:|warning: .*Gloss|BUILD' 

The build uses Xcode's default DerivedData, the same location Xcode's ⌘R uses, so there is exactly one copy of the app registered with Launch Services (two copies made gloss:// links land in a stale build once). Find it with:

APP=$(ls -d ~/Library/Developer/Xcode/DerivedData/Gloss-*/Build/Products/Debug/"Gloss.app" | head -1)

Never pass -derivedDataPath.

Launch

APP=$(ls -d ~/Library/Developer/Xcode/DerivedData/Gloss-*/Build/Products/Debug/"Gloss.app" | head -1)
pkill -x "Gloss" 2>/dev/null
open -n "$APP" --args --root "$PWD" --host local
sleep 2

Supported launch arguments (add to AppLaunchOptions when new ones are needed): --root <path>, --host <alias|local>, --open <path>, --reset-db (uses a throwaway database under $TMPDIR, never the real one), --db <path> (opens or creates the database at that path, never the real one: launch once to create it, quit, seed rows with sqlite3, relaunch — the only way to put notes awaiting review or resolve in front of the app without an agent session; gloss:// links are not an alternative, they reach the installed app), --follow (start with Herdr follow mode on), --appearance dark|light (force one appearance for the run; -AppleInterfaceStyle Dark does not work on macOS 26). Debug builds also take --integrations-env <path> (a KEY=VALUE file of GitHub and Atlassian keys loaded into the run's credential store, so no key is ever typed into a field; with --reset-db the store is in memory and nothing persists) and --atlassian-site <site> when the file does not name the site. Those keys only ever read; check a live session with log show --info --predicate 'subsystem == "com.cnc.Gloss" AND category == "integrations"' and expect only GET lines.

Screenshot

osascript -e 'tell application "Gloss" to activate'
sleep 1
screencapture -x -l "$(osascript -e 'tell application "System Events" to get id of first window of process "Gloss"')" /tmp/gloss-shot.png

If the window-id lookup fails, fall back to screencapture -x /tmp/gloss-shot.png for the whole screen. Read the PNG with the Read tool to inspect it.

Drive it

  • The app registers the gloss:// URL scheme. A note link (and an open of a web URL through an ssh host) must carry &token=$(cat ~/Library/Application\ Support/Gloss/url-token); without it the app refuses, since any web page can open such links. open "gloss://open?host=local&path=/abs/path&token=$(cat ~/Library/Application\ Support/Gloss/url-token)" opens a file (without the token the app asks the user to confirm first); gloss://note?host=..&path=..&line=12&text=... creates a note. Use these from scripts instead of simulating clicks.
  • Logs: log stream --predicate 'subsystem == "com.cnc.Gloss"' --level debug in the background while reproducing.
  • Quit cleanly with osascript -e 'tell application "Gloss" to quit' so the database closes properly.

Tests

xcodebuild -project "Gloss.xcodeproj" -scheme "Gloss" \
  -destination 'platform=macOS' test 2>&1 | grep -E 'Test Case.*(failed|passed)|error:|\*\* TEST'

Swift package tests for Packages/* run faster with swift test --package-path Packages/<Name>.

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.