skil.li

Skillie header reference

The header is a block of comments near the top of the script.

#!/usr/bin/env python3

# @skilli.schemaVersion 1
# @skilli.title Convert Currency
# @skilli.mode compact
# @skilli.packageName Money
# @skilli.icon 💱
# @skilli.description Converts an amount with today's rate
# @skilli.argument1 { "type": "text", "placeholder": "Amount" }
# @skilli.argument2 { "type": "dropdown", "placeholder": "To", "data": [{ "title": "Dollars", "value": "USD" }, { "title": "Pounds", "value": "GBP" }] }
# @skilli.needsConfirmation false

How it is read

Keys

KeyRequiredValueWhat it does
schemaVersionno (write it)1Any other value: not a skillie.
titleyestextThe name in the launcher, Settings and the card. Ask and run_skillie find it by title; keys and links by its file path. Keep it unique: create_skillie refuses a title taken, and a .skilli file with the same title replaces yours.
modeyessilent, compact, fullOutput, inlineWhat a run shows. See Modes.
descriptionnoone lineUnder the title in Settings, in the card a link asks with, in list_skillies, and what Ask matches against.
packageNamenotextGroups skillies in Settings → Skillies ("Developer Utils").
iconnoemoji, or an image fileAn emoji, or a path to a PNG/JPEG: absolute, or relative to the script's folder. Web addresses are not loaded. Without one: a terminal icon.
argument1, argument2, argument3noJSON objectUp to three arguments, passed as $1, $2, $3. See Arguments.
needsConfirmationnotrue / false (default)true: asks in the card before every run, from anywhere, even when run_skillie is allowed without asking, and Always is never offered. An inline skillie's automatic line reads do not ask. For what changes or deletes things. It asks; it does not sandbox.
showsRunningnotrue (default) / falsefalse: no "Running…" card while it runs. For a skillie that draws something of its own (a confetti cannon). Its final line or its error still shows. skil.li only.
refreshTimeno10s, 5m, 1h, 1dInline only: how old its line may get before it is read again. 10 seconds at least. Without it: 10 s in the launcher, 1 min in the menu bar.
currentDirectoryPathnoa path, ~ allowedThe folder it runs in. Default: the script's own folder.
forRecordingsnotrue / false (default)true: a skillie for recordings. A recording's ⌘K lists it (when it needs no argument), and runs it with the recording's folder in SKILLI_RECORDING (running.md); Settings → Recorder → After each transcript can mark one to run on every recording once its transcript is made (never one with needsConfirmation: nobody is there to answer). Run elsewhere, SKILLI_RECORDING is not set.
recordingTimeoutSecondsnowhole seconds from 120 to 86400Overrides the process limit when the skillie is run on a recording.
afterRecordingEditsnotrue / false (default)true also runs the skillie after saved transcript edits when selected under After each transcript.

Modes

ModeWhile it runsAfter it runs
silent"Running…" cardIts last non-empty line, for 2 seconds.
compact"Running…" cardIts last non-empty line, about 4 seconds.
fullOutput"Running…" cardAll of its output in the card (scrolls), about 20 seconds.
inlineNothing shownIts last non-empty line is shown in its launcher row, and in the menu bar if you put it there. Run with ↩ it behaves like compact.

In every mode: a run that prints nothing closes the card with nothing said; a run that exits with a non-zero status shows its last line (all of it in fullOutput) as a failure, or "… failed (exit N)" when it printed nothing.

An inline skillie with no arguments runs by itself: each time the launcher opens and its line is older than refreshTime, and on its own timer when it is in the menu bar. Keep it fast (10 seconds at most) and free of side effects. An inline skillie with arguments only runs when you run it.

Arguments

Each argument is one JSON object on one line:

# @skilli.argument1 { "type": "text", "placeholder": "Query" }
# @skilli.argument2 { "type": "password", "placeholder": "Token", "optional": true }
# @skilli.argument3 { "type": "dropdown", "placeholder": "Size", "data": [{ "title": "Small", "value": "s" }, { "title": "Large", "value": "l" }] }
FieldValueMeaning
typetext, password, dropdownRequired. Anything else: the argument is ignored.
placeholdertextWhat the launcher asks for. Default: "Argument" ("Choose" for a dropdown).
optionaltrue / false (default)An optional argument can be left empty; the script still gets it, as an empty string.
percentEncodedtrue / false (default)The value is percent-encoded before the script gets it (for a URL).
data[{ "title": …, "value": … }]Dropdown only, required: the choices. value defaults to title. A dropdown without choices is ignored.

Comment style by language

LanguageShebangComment
Shell#!/bin/bash, #!/bin/zsh, #!/bin/sh#
Python#!/usr/bin/env python3#
Ruby#!/usr/bin/env ruby#
Perl#!/usr/bin/perl#
Node#!/usr/bin/env node//
JavaScript for Automation#!/usr/bin/osascript -l JavaScript//
Swift#!/usr/bin/swift//

What each interpreter needs installed (nothing, Xcode's Command Line Tools, Homebrew) is in the collection's guide: What runs on every Mac.

Website-only keys

The community collection's build (website/build.py) also reads @skilli.requires (xcode-tools, homebrew:<formula>), to say on the website what a skillie needs. The app ignores it. See skillies/README.md.

Edit this page on GitHub ↗