Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Run as Root - safe one-command sudo for AI agents

    1

    Your agent runs one command as root through the Linux desktop's own polkit dialog — you approve the exact command, and it never sees your password.

    Free

    Security scanned
    Run as Root - safe one-command sudo for AI agents

    Run as Root - safe one-command sudo for AI agents

    Example session with this skill installed

    I'm setting up this project but the build just failed with "Permission denied" when it tried to install build-essential. Can you install the build tools for me?

    • Read your context and instructions
    • Compiled the run as root

    I need root to install those packages, so I'll use the

    run-as-root skill — you'll approve the exact command in your desktop's password dialog, and I never see your password.

    First I confirmed you're at a local graphical session (this skill refuses to run otherwise):

    Type=x11   Active=yes   Remote=no   ✓
    

    A password dialog is about to open. Here is exactly what it will show:

    Root command: /usr/local/bin/run-as-root
    Why: Install the build tools
    Command: /usr/bin/apt-get install -y build-essential
    
                            [ Cancel ]   [ Authenticate ]
    

    The command I ran

    timeout 180 pkexec /usr/local/bin/run-as-root \
      $'\nWhy: Install the build tools\nCommand:' \
      /usr/bin/apt-get install -y build-essential
    

    Result: you authenticated, exit code 0.

    Reading package lists... Done
    Building dependency tree... Done
    The following NEW packages will be installed:
      build-essential dpkg-dev g++ gcc make ...
    Setting up build-essential (12.9ubuntu3) ...
    

    ✅ Build tools installed. The run was recorded to the audit trail — review it anytime with journalctl -t run-as-root. Re-running your build now.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    The problem

    Coding agents constantly hit commands that need root — apt install, systemctl, writing to /etc. The usual answers are all bad:

    • Give the agent your password (sudo -S, an askpass script) — the agent now holds your password.
    • Passwordless sudo (NOPASSWD) — the agent has permanent, invisible root.
    • Stop and make you run it — breaks your flow, and you paste commands without reading them.

    What it does

    run-as-root gives the agent a fourth option: escalate one command at a time through your desktop's own polkit password dialog.

    • The dialog shows the agent's stated reason and the true command line.
    • You type your password into the operating system's prompt — never into the agent.
    • The password travels polkit's own path (authentication agent → polkit-agent-helper-1 → polkitd). No part of the agent's code touches it.
    • Every run is written to the authpriv audit log with the full command.

    Why this beats the alternatives

    MethodProblemrun-as-root
    Password to the agentAgent holds your secretAgent never sees it
    NOPASSWD sudoPermanent, invisible rootOne command, one dialog, logged
    Hand it back to youBreaks flow; blind pasteYou approve the exact command inline

    Use cases

    • Let an agent install build dependencies, drivers, or packages mid-task.
    • Approve systemctl, mount, usermod, or writes to /etc, /usr, /opt.
    • Keep a full, reviewable audit trail of everything an agent ran as root.

    Known limitations

    • Linux desktop only (X11 or Wayland) with a running polkit agent.
    • Tested on Linux Mint 22.3 / Cinnamon / polkit 124; other desktops and distros use standard polkit and should work, but are untested.
    • Not for headless servers, SSH, containers, CI, cron, WSL, macOS or Windows — the skill detects these and hands the command back instead.
    • You must already be an administrator (sudo/admin/wheel). It grants no new privilege — the same power as sudo, and not more.

    How to install

    1. Add the skill: npx skills add govarthenan/run-as-root
    2. Install the system helper yourself, in your own terminal: sudo bash ~/.claude/skills/run-as-root/install.sh
    3. Remove anytime: sudo bash ~/.claude/skills/run-as-root/uninstall.sh

    MIT licensed. Author: Govarthenan Rajadurai.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 10 days ago

    • Free to download with an account

    Requires

    Node.js
    macOS

    Listed10 days ago

    What's inside

    Frequently Asked Questions