Level CLI can generate an Agent Skill that teaches a compatible coding agent how to use your installed version of lvl. You choose the coding agent, model, and token provider. Level supplies the CLI commands and the generated SKILL.md reference.
ℹ️ NOTE: Level does not host the language model or supply model tokens. Your coding agent runs in your environment and calls lvl with the permissions of your active Level session.
Before you begin
You need:
Level CLI installed and signed in.
A coding agent that can load the Agent Skills
SKILL.mdformat.Permission to install a user-level or project-level skill for that agent.
Run lvl --help, then run lvl auth status to confirm that the CLI is available and signed in to the intended Level organization.
Review the generated skill
Use these commands to inspect what the coding agent will receive:
lvl skill showprints the generated skill without installing it.lvl skill describe device listshows one command, its flags, and its JSON output shape.lvl skill describe automationshows every command under the automation group.lvl skill describeprints the complete generated command reference.
The skill is generated from the command tree in your installed CLI, so its commands and output definitions match that version of lvl.
Install the skill for your user account
Run lvl skill install.
The canonical skill is written to ~/.agents/skills/level/SKILL.md. This location is used by Codex, Cursor, Gemini CLI, and other agents that read the standard ~/.agents/skills directory.
If Claude Code is already configured on the computer, lvl also installs or links the skill at ~/.claude/skills/level. When symbolic links are unavailable, the installer copies the skill instead.
Install the skill in a project
Use a project-level installation when you want the skill to travel with one repository or working directory.
Change to the project directory with
cd YOUR_PROJECT_DIRECTORY.Run
lvl skill install --project.
The command writes the canonical skill to ./.agents/skills/level/SKILL.md. It also installs or links the Claude Code location at ./.claude/skills/level.
Review your coding agent's documentation to confirm which Agent Skills directory it reads.
⚠️ WARNING: A project-level skill may be committed to source control. Review the generated file and your repository policy before committing it. The generated skill does not contain your Level credentials, but it describes commands that can access your Level account when run in an authenticated environment.
Ask your coding agent to use lvl
Start a new coding-agent session in the same user or project context after installing the skill. Give the agent a clear target, expected result, and permission boundary.
The following prompts use blockquotes so they wrap on smaller screens. Replace the sample names with resources from your Level account.
Investigate without making changes
Use lvl to list every device in the Servers group. Return the device IDs, names, operating systems, online status, active alerts, and available updates. Do not make changes.
This shows how an agent can combine device, alert, and update data into one fleet summary.
Draft a diagnostic script
Use lvl to inspect web-01 and determine its operating system. Draft a read-only disk-usage script for that operating system. Show me the complete script, target device ID, shell, run-as setting, timeout, and exact lvl command. Do not create or run the script.
After reviewing the script, you can ask the agent to save it with lvl script create or run it with lvl script run.
Build a new automation
Use lvl skill describe automation to review the current automation commands and specification format. Draft a new automation named Disk Space Triage that targets the Servers group, runs a read-only disk diagnostic, and records the output. Write the proposed YAML specification to disk and explain every trigger, action, variable, and target. Do not create the automation.
After reviewing the specification, ask the agent to create it with lvl automation create -f AUTOMATION_SPEC.
⚠️ WARNING: Creating an automation from a specification applies a chain of mutations. It is not transactional. If one step fails, the automation can remain partially created. Review the full specification before creation and note the automation ID returned by any error.
Modify an existing automation safely
Export the Patch Servers automation with lvl automation spec. Propose the smallest YAML change needed to add a wait-for-approval step before patch installation. Show me the diff, then run lvl automation apply with --dry-run. Do not apply the change.
This workflow lets the agent inspect the current full-state specification, edit it, and preview how it would reconcile with the live automation.
⚠️ WARNING: Applying an automation specification can delete existing triggers or actions that are missing from the file. The apply is not transactional. Always review the complete file and dry-run result before applying it.
Build a monitor policy
Use lvl skill describe monitor policy and lvl skill describe monitor add to inspect the current monitor-policy and monitor payload formats. Draft a Server Health policy for the Servers tag with CPU, memory, and disk-free monitors. Include the proposed thresholds, durations, severities, alert recipients, and target tags. Write the YAML specification to disk and explain every setting. Do not create the policy.
After review, ask the agent to create the policy with lvl monitor policy create -f POLICY_SPEC.
Monitor-policy creation from a specification is also a non-transactional chain. A failure can leave a partially created policy, so review the returned policy ID and correct it with lvl monitor policy apply -f POLICY_SPEC if needed.
Modify an existing monitor policy
Export the Server Health monitor policy. Add a read-only script monitor that checks the application health endpoint. Show me the proposed script and policy diff, then run lvl monitor policy apply with --dry-run. Do not apply the change.
Monitor-policy apply reconciles the live policy with the file. Monitors missing from the specification can be deleted, so the agent should review the full exported policy rather than constructing a partial update.
Connect monitoring and remediation
Inspect the Server Health monitor policy and the Restart Web Service automation. Determine whether the current monitor type supports the intended remediation workflow. Draft the smallest policy and automation changes needed to alert first and run the existing remediation only after approval. Show both diffs and dry-run plans. Do not apply either change.
This prompt makes the agent inspect the installed CLI's current monitor and automation schemas before proposing a connected workflow.
Organize reusable resources
Use lvl to inventory scripts, automations, monitor policies, tags, device groups, and repository files related to patching. Identify duplicate names and ambiguous references. Propose a consistent grouping and naming plan. Do not rename, move, or delete anything.
A read-only inventory is a useful first step before asking an agent to reorganize shared resources.
Review commands before execution
Check these details before allowing a proposed command to run:
Confirm the active Level profile and organization with
lvl auth status.Confirm every device, group, script, automation, monitor policy, tag, or file reference.
Prefer IDs when names are ambiguous.
Review the complete script or full-state specification.
Require
--dry-runfor automation and monitor-policy apply commands.Confirm whether a command waits for completion or only requests asynchronous work.
Ask the agent to stop before creation, apply, delete, restart, shutdown, update installation, or another privileged action unless you intend to approve it.
⚠️ WARNING: Script creation and ad-hoc script runs default to the SYSTEM run-as setting unless you choose another value. Scripts and automation actions can make privileged changes to managed devices. Specify --run-as current_user when that is the intended scope, and review every script before running it.
Permanent delete commands require confirmation. In a non-interactive session, commands that require confirmation fail unless --yes is supplied. Some actions, including device restart and shutdown, request the action immediately and do not have a confirmation prompt.
Refresh the skill after upgrading lvl
The skill and command reference are generated from your installed CLI version. After upgrading lvl, run lvl skill install again.
For a project-level installation, run lvl skill install --project.
This keeps your coding agent's command index, flags, and JSON output definitions aligned with the installed binary.
Troubleshooting
The coding agent does not find the skill
Run
lvl skill installagain and note the reported destination.Confirm that your coding agent reads that Agent Skills directory.
Restart the coding-agent session after installing or updating the skill.
Use
lvl skill showto confirm that the CLI can generate the skill.
A command in the skill does not match lvl
Reinstall the skill with the same lvl binary that the coding agent will call. If multiple lvl binaries are on your PATH, run lvl --help, then use lvl skill describe COMMAND to inspect the current command.
The installed CLI and lvl skill describe are the source of truth for the available commands and flags.
