Skip to content
Back to skills

Pkexec Root

ASecurity

Use pkexec first for commands that need root directly or indirectly.

  • 3 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added November 24, 2026
ai-agentsbash

Security analysis

A100/100

Scanned November 24, 2026

npx -y skills add timmo001/skills --skill pkexec-root --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pkexec Root?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pkexec Root
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/timmo001-pkexec-root/badge)](https://www.skillsdirectory.com/skills/timmo001-pkexec-root)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pkexec-root
license: Apache-2.0
compatibility: Designed for Linux with PolicyKit/pkexec. Package examples use Arch Linux pacman or yay; sudo is a fallback when PolicyKit is unavailable.
description: >
  Use pkexec first for commands that need root directly or indirectly.
---

Use `pkexec` first for any command that needs root, directly or through sudo inside a tool.

### Default Pattern

For `yay`, use:

```bash
yay -S <pkg> --sudo pkexec --sudoflags ""
yay -U "/path/to/package.pkg.tar.zst" --sudo pkexec --sudoflags ""
```

For direct `pacman` commands, use:

```bash
pkexec pacman -S <pkg>
pkexec pacman -U "/path/to/package.pkg.tar.zst"
pkexec pacman -R <pkg>
```

### Fallback Order

If `pkexec` fails, use the first working alternative below and note which path was used:

1. Retry with the same command and confirm the exact package path/arguments are valid.
2. For `yay`, fall back to:

   ```bash
   yay -S <pkg> --sudo sudo --sudoflags ""
   yay -U "/path/to/package.pkg.tar.zst" --sudo sudo --sudoflags ""
   ```

3. If `yay` itself is the problem and the package is local, install with `pkexec pacman -U ...`.
4. If PolicyKit is unavailable or broken and the user asked you to continue, use `sudo` directly.

Commands covered by this skill include:

- commands that normally run with `sudo`
- tools like `yay` that delegate privileged parts to `sudo`
- `omarchy` commands that perform privileged operations under the hood

Examples of `omarchy-*` command families that may need this treatment include:

- `omarchy-install-*`
- `omarchy-update-*`
- `omarchy-pkg-*`
- `omarchy-reinstall*`
- some `omarchy-refresh-*`
- some `omarchy-setup-*`
- other system-level `omarchy-*` commands that touch packages, services, boot config, or `/etc`

This list is not exhaustive.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.