macos-root
Run commands as root on this Mac via osascript "do shell script ...
Skill by MaxAnderson95
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maxanderson95-macos-root
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: productivity, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/macos-root
What's inside
- Skill name
macos-root- Description
- Run commands as root on this Mac via osascript "do shell script ... with administrator privileges", because sudo cannot prompt for a password in opencode. Use whenever a task needs root/sudo/admin privileges, sudo fails with "a password is required", or the task touches root-owned config, LaunchDaemons, /usr/local, or other privileged paths.
- License
- MIT
- Instructions
- 20 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- fleet.yaml
SKILL.md (first lines)
# Privilege Escalation on macOS (sudo vs osascript) In this opencode environment, `sudo` cannot prompt for a password — there's no controlling TTY and no askpass helper, so any plain `sudo ...` call fails with `sudo: a password is required`. Don't keep retrying sudo or pretend it'll work eventually. When you need root on this Mac, use `osascript` with administrator privileges instead. It pops a native macOS authorization dialog (or Touch ID, if `pam_tid` is enabled for SecurityAgent) and runs the command as root via Authorization Services. ```bash osascript -e 'do shell script "your-command-here" with administrator privileges' ``` ## Rules and gotchas - The shell inside `do shell script ... with administrator privileges` already runs as **root**. Do NOT add `sudo` inside it — it's redundant. - Without `with administrator privileges`, the shell runs as the user, and `sudo` inside will fail for the same TTY reason as before. Always include the clause. - Each `osascript` invocation triggers its own auth prompt. To minimize prompts, **batch the work**: write a single shell script to the pre-approved opencode temp directory (the `/var/folders/.../T/opencode` path named in your system prompt), `chmod +x` it, and run the whole script through one `osascript` call. - This requires Max to be physically at the Mac to approve the dialog. It is not suitable for unattended automation — if you'd be blocked on the prompt, say so and stop instead of waiting indefinitely. - For non-trivial root operations (editing root-owned config, restarting LaunchDaemons, installing into `/usr/local/`, etc.), prefer staging the changes into the opencode temp directory first, then have the elevated script copy/install them. Easier to review the diff before approving the prompt. - When a fallback path exists (write a file under the opencode temp directory and give Max the `sudo` commands to run himself), that's also valid — use it when the change is one-shot and trivial, or when Max has said he'd run the commands.
From MaxAnderson95/my-opencode-setup, MIT.
More from MaxAnderson95/my-opencode-setup
- 0.565score
writing-opencode-plugins
MaxAnderson95
Build, extend, debug, or port OpenCode v2 plugins.
SkillAFreshness: AClaude Code +9 - 0.565score
html-reports
MaxAnderson95
Write self-contained HTML reports and artifacts in the user's AgentDrop "Ink Ledger" design system, including status and incident reports, implementation…
SkillAFreshness: AClaude Code +9 - 0.565score
btca-local
MaxAnderson95
Search and read the source of third-party open-source projects from local clones in ~/.btca/agent/sandbox.
SkillAFreshness: AClaude Code +9 - 0.524score
dark-mode
MaxAnderson95
Add dark mode, light mode, and a system-default appearance control to a web app.
SkillBFreshness: BClaude Code +9 - 0.524score
opencode-db-querying
MaxAnderson95
Query OpenCode 2's local SQLite database for exact session history, transcripts, tool calls, token and cost totals, projects, child sessions, pending input…
SkillBFreshness: BClaude Code +9 - 0.524score
system-one-models
MaxAnderson95
ALWAYS load when Jev is mentioned, including questions, code, experiments, integrations, or debugging involving TypeSafe AI's Jev model.
SkillBFreshness: BClaude Code +9 - 0.521score
ultra-mode
MaxAnderson95
Proactive delegation for the rest of this session.
SkillBFreshness: BClaude Code +9 - 0.470score
md2pdf
MaxAnderson95
Format and style Markdown files destined for Max's custom md2pdf CLI (markdown -> HTML -> headless Chrome -> PDF).
SkillCFreshness: CClaude Code +9 - 0.469score
pdf-reports
MaxAnderson95
Generate PDF reports by writing markdown and converting with the locally installed md2pdf CLI.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 2, 2026 (28 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from MaxAnderson95
- 0.565score
writing-opencode-plugins
MaxAnderson95
Build, extend, debug, or port OpenCode v2 plugins.
SkillAFreshness: AClaude Code +9 - 0.565score
html-reports
MaxAnderson95
Write self-contained HTML reports and artifacts in the user's AgentDrop "Ink Ledger" design system, including status and incident reports, implementation…
SkillAFreshness: AClaude Code +9 - 0.565score
btca-local
MaxAnderson95
Search and read the source of third-party open-source projects from local clones in ~/.btca/agent/sandbox.
SkillAFreshness: AClaude Code +9 - 0.524score
dark-mode
MaxAnderson95
Add dark mode, light mode, and a system-default appearance control to a web app.
SkillBFreshness: BClaude Code +9 - 0.524score
opencode-db-querying
MaxAnderson95
Query OpenCode 2's local SQLite database for exact session history, transcripts, tool calls, token and cost totals, projects, child sessions, pending input…
SkillBFreshness: BClaude Code +9 - 0.524score
system-one-models
MaxAnderson95
ALWAYS load when Jev is mentioned, including questions, code, experiments, integrations, or debugging involving TypeSafe AI's Jev model.
SkillBFreshness: BClaude Code +9
Cite this page
macos-root skill. Agent Mart. https://agentmart.dev/skills/maxanderson95-macos-root (last updated 2026-10-24)