/jamf-cli-skills:jamf-clifrom jamf-cli-skills
Sets up the Jamf CLI for a session: verifies installation, loads the full command reference, and selects or creates a profile. Run before any Jamf Pro, Jamf Protect, or Jamf Platform administration task.
Ships in jamf-cli-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Work through these steps in order. Do not skip ahead.
Run via Bash:
which jamf-cli 2>/dev/null && jamf-cli version 2>/dev/null
If the command returns nothing (not installed):
Tell the user jamf-cli is not installed and use AskUserQuestion to offer:
brew tap Jamf-Concepts/tap
brew trust Jamf-Concepts/tap
brew install jamf-cli
After install, verify with jamf-cli version, then re-run /jamf-cli to continue setup.https://jamf-concepts.github.io/jamf-cli/ for all install options.Do NOT continue to Step 1 until jamf-cli is installed and which jamf-cli returns a path.
Fetch the full command reference using WebFetch:
URL: https://jamf-concepts.github.io/jamf-cli/llms-full.txt
Prompt: "Return the full content verbatim — this is a structured CLI reference that will be used as the command map for the rest of the session."
Treat the fetched content as the authoritative source for all available commands, subcommands, flags, and resource names for the remainder of the session.
Run via Bash:
jamf-cli config list 2>/dev/null
Parse the profile names from the output. Use AskUserQuestion with:
If no profiles exist, skip the question and go directly to the creation instructions below.
Existing profile selected: remember it as the active profile for this session. Confirm: "Using profile <name>. Ready for Jamf tasks."
"Create new profile" selected: tell the user to run one of the following (type ! <command> to run it here):
jamf-cli pro setup — Jamf Pro or Platform APIjamf-cli protect setup — Jamf ProtectThen ask them to re-run /jamf-cli to pick the new profile.
Always use jamf-cli via the Bash tool for all Jamf operations.
Command pattern: jamf-cli -p <active-profile> <subcommand> [flags]
jamf-cli -p <profile> <resource> --help--output json; omit for human-readable table outputdelete, apply replacing existing): confirm with the userThere is no --id flag. IDs are always positional arguments placed directly after the subcommand:
jamf-cli -p <profile> pro <resource> get <id>
jamf-cli -p <profile> pro <resource> update <id>
jamf-cli -p <profile> pro <resource> delete <id>
--name is not universal. Only resources with name-based lookup support it — check --help for the resource before assuming it exists. Never attempt --name and fall back if it fails; check first.
Standard lookup pattern when you have a name but need an ID:
# 1. List to find the ID
jamf-cli -p <profile> pro <resource> list -o json | jq '.results[] | select(.name == "My Resource") | .id'
# 2. Use the ID positionally
jamf-cli -p <profile> pro <resource> get <id>
Do not attempt to guess an ID or try --name on a resource that does not advertise it in --help.
Never guess the shape of a request body. Before constructing any JSON or YAML input for a mutating operation (create, update, apply, patch), load the authoritative OpenAPI spec for that resource.
Specs live in three locations depending on the command namespace:
| Command namespace | Spec location | Naming convention | Example |
|---|---|---|---|
pro <resource> (modern API) | specs/JamfProAPI.yaml | one 1.6 MB document for every resource — read one operation with Bash (step 2), not WebFetch | POST /v1/categories |
pro app-installers* (modern API) | specs/AppInstallers.yaml | one document for every App Installer command | POST /v1/app-installers/deployments |
pro classic-<resource> (Classic API) | specs/classic/schemas.json | request-body schemas, one per resource | specs/classic/resources.yaml lists resources and paths only |
pro blueprints, pro compliance-benchmarks, pro platform-devices, pro platform-device-groups, pro ddm-reports (Platform API) | specs/platform/ (see mapping below) | abbreviated, not derivable from the command name | compliance-benchmarks → compliance_benchmark_engine.json |
Platform spec filenames do not follow a <resource>-api.json rule — they are abbreviated and must be looked up explicitly:
| Command namespace | Spec file under specs/platform/ |
|---|---|
pro blueprints | blueprints_api.json |
pro compliance-benchmarks | compliance_benchmark_engine.json |
pro platform-devices | device_inventory_api.json (+ device_management_action_api.json for actions) |
pro platform-device-groups | device_group_inventory_api.json |
pro ddm-reports | declaration_reporting_service.json |
Steps:
If the command's --help lists --scaffold, run it first: it prints the body template from the same spec, with no fetch. Use the steps below when it does not, or to read what a field means.
Determine which namespace the command belongs to (shown in --help under "Platform:" vs other groups). Pick the correct spec location from the table above.
Load the spec for that namespace:
--scaffold prints, do not WebFetch specs/JamfProAPI.yaml: it is 1.6 MB and WebFetch truncates it before paths:. Use Bash to print one block from it instead:
curl -fsSL https://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/JamfProAPI.yaml | grep '^ /.*smart-groups'. The command name does not always appear in the path: it joins segments with - and sometimes renames them (computer-groups-smart-groups is /v3/computer-groups/smart-groups, sso-settings is /v3/sso, computer-inventory is /v4/computers-inventory). So grep for its most distinctive word, and try another word if nothing prints./vN versions of the same path are listed, the CLI sends the highest. create uses the collection key (/v1/categories:). get, update, patch and delete use the key with a path parameter (/v1/categories/{id}:) when one is listed. A settings resource has only the collection key, and its PUT is there. apply sends the collection key's POST to create and the parameter key's PUT to update.grep printed it: curl -fsSL https://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/JamfProAPI.yaml | awk '$0==" /v1/categories/{id}:"{p=1;print;next} p&&/^([^ ]| [^ ])/{p=0} p'$ref names: curl -fsSL https://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/JamfProAPI.yaml | awk '$0==" Category:"{p=1;print;next} p&&/^([^ ]| [^ ]| [^ ])/{p=0} p'curl: error means the fetch failed (network, proxy or HTTP status), not the key; say so to the user rather than retrying the grep. Empty output with no error means the key or schema name did not match exactly; go back to the grep.pro app-installers*): https://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/AppInstallers.yaml is small enough to WebFetch.https://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/classic/schemas.jsonhttps://raw.githubusercontent.com/Jamf-Concepts/jamf-cli/main/specs/platform/<file> — resolve <file> from the Platform mapping table above (e.g. compliance_benchmark_engine.json), do not assume <resource>-api.jsonExtract the request schema. In an OpenAPI spec it is requestBody → content → application/json → schema. In specs/classic/schemas.json, look the resource up under x-jamf-classic-resources, then read components.schemas.<schema>; the body is XML under its root element. Use that schema — and only that schema — to construct the body.
If you cannot confidently map the resource to a spec file, tell the user and ask them to confirm before proceeding. Do not fall back to guessing.
Prefer apply over create/update whenever it is available for the resource.
apply is a name-based upsert: it creates the resource if it does not exist, or replaces it if it does. It is idempotent and the correct default for configuration management.create and update are lower-level primitives. create will fail if the resource already exists; update requires knowing the ID and that the resource already exists.{id} in their path) have no apply — use get and update directly.Check --help to confirm whether apply is available before reaching for create/update.
Before writing any JSON body for create, update, or patch, run:
jamf-cli -p <profile> pro <resource> create --scaffold
This prints the exact JSON template the server expects. Use it together with the spec (see request body policy above) to construct a valid payload. Never write a body from memory.
Some resources are singletons — a single settings object with no collection. These use get and update with no ID or name argument:
jamf-cli -p <profile> pro <resource> get
jamf-cli -p <profile> pro <resource> update
Passing an ID or --name to a singleton command will fail. Singletons are identifiable in --help by the absence of a positional <id> argument and the absence of a list subcommand.
Classic API resources (commands under pro that map to /JSSResource/ paths) use XML request and response bodies — not JSON. When constructing a --from-file payload or piping input, the content must be valid XML. Run the command with --scaffold, or read the resource's schema in specs/classic/schemas.json, for the expected structure.
.idThe field name holding the object ID in a list response differs by resource. Do not assume .id. After running list -o json, inspect the actual response shape before writing a jq filter:
jamf-cli -p <profile> pro <resource> list -o json | jq '.' | head -40
Common patterns: .id, .computerAppleId, .udid. Always derive the field name from the actual output.
When the task involves Platform resources (blueprints, compliance-benchmarks, ddm-reports, platform-devices), always use pro platform-device-groups for all group operations — creating test groups, listing groups, resolving group IDs, assigning scope.
Never use Classic or Pro API group commands (pro computer-groups-smart-groups, pro computer-groups-static-groups, pro computer-groups, pro mobile-device-groups) for Platform workflows. These are incompatible:
| API | Group ID type | Works with Platform resources? |
|---|---|---|
pro platform-device-groups | UUID (cda24521-…) | Yes |
pro computer-groups-smart-groups / pro computer-groups-static-groups | Integer (42) | No |
Blueprint and benchmark scope fields accept only Platform device group UUIDs. Passing a Classic integer group ID will fail silently or be rejected by the API.
Pattern for creating a test group and scoping a blueprint to it:
# 1. Create the Platform device group
echo '{"name":"Test Group","deviceType":"COMPUTER","groupType":"STATIC"}' \
| jamf-cli -p <profile> pro platform-device-groups create
# 2. Get the new group's UUID
jamf-cli -p <profile> pro platform-device-groups list -o json \
| jq -r '.results[] | select(.name == "Test Group") | .id'
# 3. Scope the blueprint using that UUID
jamf-cli -p <profile> pro blueprints get --name "My Blueprint" -o json \
| jq '.scope.deviceGroups += ["<uuid>"]' \
| jamf-cli -p <profile> pro blueprints apply
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub jamf-concepts/jamf-cli --plugin jamf-cli-skills7 skills in this plugin
/jamf-auditRun Jamf Pro instance health audit, prioritize findings, explain issues, and offer remediation/jamf-backupGuide Jamf Pro and Jamf Protect config backup, compare with previous backups, and optionally initialize git tracking/jamf-bulkSafe batch operations on Jamf Pro — always previews before executing, requires explicit confirmation for mutations/jamf-investigateAd-hoc Jamf Pro investigation — answers natural language questions about a Jamf Pro instance by composing CLI commands/jamf-migrateCross-instance Jamf Pro and Jamf Protect migration — backup, diff, plan, and execute config promotion between instances/jamf-reportGenerate management-ready reports from Jamf Pro — patch compliance, device health, inventory, software installsOther plugins' skills for the same job