Skill deployer

From fritzprix/libr-agent · View interactive version

Skill deployer is an AI agent skill from the GitHub repository fritzprix/libr-agent. Deploy, install, update, or remove a validated custom skill in user_skills/ (global), .libragent/skills/ (workspace), or assistant scope from a local folder or a GitHub URL. Use when installing a skill from a GitHub URL, deploying a validated local skill after skill-creator, updating an installed sk

How to use this skill

Skill file

Skill Deployer

Install, update, or remove a validated custom skill in user_skills/ (global), .libragent/skills/ (workspace), or assistants/<id>/skills/ (assistant) from a local directory or a GitHub URL so agents load it on the next turn.

Every deployment runs skill-creator strict validation (validate_skill.py --strict) before and after copying. Authoring new skills is skill-creator's job. Shipping skills inside the app is a developer workflow (src-tauri/bundled_skills/), not this skill.

Never deploy custom skills to {dataDir}/system_skills/. It is a managed mirror of bundled skills; extras are deleted on app startup. A user asking for a "system skill" usually means global — deploy to user_skills/.

Scope Decision

| Scope | Choose when | Target | Override priority |

| --- | --- | --- | --- |

| workspace | Specific to the current project or session | {workspace-root}/.libragent/skills/{name}/ | Highest |

| assistant | For one assistant only (user supplies the ID) | {dataDir}/assistants/{id}/skills/{name}/ | Middle |

| global | Available in every session | {dataDir}/user_skills/{name}/ | Lowest |

Default to workspace when unsure — safest and easiest to remove. Read Workspace Root from the system prompt. To resolve {dataDir}, OS defaults, IDE import folders, and forbidden locations, see references/paths.md.

GitHub URL Routing

Always use deploy_skill.py — never improvise with git clone or manual shell copies. URL formats and every flag: references/github-install.md.

Install Flow (GitHub URL)

Step 1 — Inspect (`--inspect`)

Fetches at a pinned 40-character commit SHA, discovers SKILL.md folders, runs strict validation, and lists scripts without writing to disk:

python "<skill-deployer-base-dir>/scripts/deploy_skill.py" "<github-url>" --inspect

Step 2 — Review and Approve

Show the user: skill name and description, source URL and pinned commit SHA (warn for unknown repositories — SKILL.md becomes prompt instructions), target scope, and any scripts or executables.

Safety Gate: if the skill contains scripts or executables, deploy_skill.py refuses to install (exit code 4, [DEPLOY-APPROVAL-001]) unless --approve-scripts is passed. Never pass --approve-scripts until the user explicitly approves the script list.

Step 3 — Deploy

# Prompt-only skill
python "<skill-deployer-base-dir>/scripts/deploy_skill.py" "<github-url>" --scope workspace --workspace "<workspace-root>" --skill "<skill-name>"

# Skill with scripts (ONLY after user approval)
python "<skill-deployer-base-dir>/scripts/deploy_skill.py" "<github-url>" --scope workspace --workspace "<workspace-root>" --skill "<skill-name>" --approve-scripts

For global scope, install into the workspace first, then publish with skill-creator's skill.py deploy (user skills are written only that way):

python3 "<skill-creator-base-dir>/scripts/skill.py" deploy "<workspace-root>/.libragent/skills/<skill-name>"

The script records .skill-provenance.json (source URL, ref, pinned commit, scripts, timestamps) and rolls back automatically if post-deploy validation fails.

Deploying a Local Skill Folder

python "<skill-deployer-base-dir>/scripts/deploy_skill.py" "<skill-source-dir>" --scope workspace --workspace "<workspace-root>"
python "<skill-deployer-base-dir>/scripts/deploy_skill.py" "<skill-source-dir>" --scope assistant --assistant-id "<id>"

For global scope use python3 "<skill-creator-base-dir>/scripts/skill.py" deploy "<skill-source-dir>"; deploy_skill.py --scope global refuses new installs.

Add --dry-run to validate and print the target without copying, or --overwrite to replace an existing install.

Update and Remove

# Re-fetch from recorded provenance, validate, replace (rolls back on failure)
python "<skill-deployer-base-dir>/scripts/deploy_skill.py" --update "<skill-name>" --scope workspace --workspace "<workspace-root>"

# Delete the installed folder (never touches system_skills/)
python "<skill-deployer-base-dir>/scripts/deploy_skill.py" --remove "<skill-name>" --scope global

If an updated skill contains scripts, get user approval and pass --approve-scripts.

Post-Install Verification

On the next agent turn, check <available_skills> and report to the user:

  1. The skill name appears (or is gone after --remove).
  2. source matches the intended scope (workspace, assistant, or global).
  3. <location> matches the deployed path (user_skills for global, not system_skills).
  4. Source URL and pinned commit SHA are recorded in .skill-provenance.json.

Skills merge first-wins by lowercase name — workspace > assistant > agent import > global > system — so a workspace skill silently overrides a global one with the same name.

Common Mistakes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.