macos-rules

macos-rules is a skill for Claude Code from juan294/cc-rpi. It costs 29 tokens per session (733 once invoked), scanned A, original, MIT.

A macOS development guide covering safer ways to install Python tools, handle special characters in zsh commands, and configure launchd agents, which run programs in the background.

In plain words
What is it for?
Use it when installing Python command-line tools, writing complex shell commands, or setting up launchd jobs on macOS.
Why use it?
It helps avoid installation failures, shell parsing errors, and background scripts that crash or run without needed limits and environment settings.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is ./scripts/agent.sh # works in terminal, fails silently under launchd.

Part of the cc-rpi plugin — 36 skills, 19 commands, 2 hooks shipped together

Good fit Use it when installing Python command-line tools, writing complex shell commands, or setting up launchd jobs on macOS.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/juan294/cc-rpi
agentmods
npx agentmods add skills/juan294/cc-rpi/macos-rules

Made for: Claude Code.

Or install cc-rpi, the plugin that ships this one along with the rest of its 36 skills, 19 commands, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for macos-rules

README.md
[![agentmods](https://agentmods.dev/badge/skills/juan294/cc-rpi/macos-rules.svg)](https://agentmods.dev/skills/juan294/cc-rpi/macos-rules)
Your own site
<a href="https://agentmods.dev/skills/juan294/cc-rpi/macos-rules"><img src="https://agentmods.dev/badge/skills/juan294/cc-rpi/macos-rules.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 733 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.00733
Opus 5 $0.00015 $0.00367
Sonnet 5 $0.00006 $0.00147
Haiku 4.5 $0.00003 $0.00073

Measured yesterday against content hash 36027fda2740, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

macos-rules scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

generated/claude/skills/macos-rules/SKILL.md · 96 lines

How it starts

The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.

macOS Development

pip on macOS

Wrong -- system pip blocked on Python 3.12+ (PEP 668):

pip3 install some-tool  # externally-managed-environment

Right -- use Homebrew or pipx:

brew install some-tool
pipx install some-python-app

zsh Regex and Special Characters

Shell quoting and executable capabilities are separate. Single-quoted patterns pass literally to bash and zsh. macOS BSD grep does not support -P; wrapping it in bash -c does not add PCRE support.

For JSON, parse JSON:

python3 -c 'import json; print(json.load(open("package.json"))["version"])'

For plain text use rg, a supported grep -E pattern, or Python re. Discover which executable is installed and check its help before using nonportable flags. Use a script for complex parsing.

launchd Agent Configuration

Historical sessions reported a location-dependent Claude CLI failure under launchd, with an unrecorded client version. That observation does not establish that all direct script launches crash or that current clients need a wrapper. For a reproduced failure, capture client/macOS versions, arguments, cwd, resource limits and sanitized logs before selecting a workaround.

The following is the historical wrapper recipe; choose limits and environment from the actual job requirements rather than treating these numbers as native minimums. Installing or starting a scheduled job is an explicit opt-in.

Historical wrapper, resource-limit and environment example:

<key>ProgramArguments</key>
<array>
  <string>/bin/bash</string>
  <string>-c</string>
  <string>exec /bin/bash /project/scripts/agent.sh</string>
</array>
<key>HardResourceLimits</key>
<dict><key>NumberOfFiles</key><integer>122880</integer></dict>
<key>SoftResourceLimits</key>
<dict><key>NumberOfFiles</key><integer>122880</integer></dict>
<key>EnvironmentVariables</key>
<dict>
  <key>HOME</key><string>/Users/you</string>
  <key>TERM</key><string>xterm-256color</string>
  <key>PATH</key><string>/usr/local/bin:/usr/bin:/bin</string>
</dict>

Read the full file on GitHub · 96 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +2 lines 36027fda2740
  2. 8d ago First seen · 94 lines · 29 tokens per session scan A 72a08df8297c

Subscribe to this mod's changes

macos-rules is a skill published in the GitHub repository juan294/cc-rpi (5 stars, last pushed yesterday), licensed MIT. It adds 29 tokens to every session and 733 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-carnet

Use this skill when the user asks to save, recall, find, or organize notes. Triggers on: 'remember this', 'save this', 'note this', 'what did we discuss about...', 'check the notebook', 'find in carnet'. Also use proactively when discovering findings worth preserving across sessions.

yamadashy/repomix · 67 tokens

deploy-docker-compose

Run the Omnigent server as a Docker compose stack (server + Postgres) on any Docker host — your laptop, a VPS, EC2 by hand, or as the base layer of any container-platform deploy. Invoke when the user wants to build the image, bring up the compose stack, debug the stack on a host they already have, or extend the stack…

omnigent-ai/omnigent · 84 tokens

security-audit

Audit a codebase or directory for security issues (hardcoded secrets, injection, unsafe deserialization, weak crypto, authz gaps) and produce a structured findings report. Use when the user asks for a security review, an audit, or to check code for vulnerabilities. Report only — never fix.

omnigent-ai/omnigent · 64 tokens

taiyi-ui-design

A design-planning guide for describing how an application's user interface should look and behave. It produces a UI-DESIGN.md document covering layouts, components, interactions, accessibility, and error states.

Dong90/oh-my-taiyiforge · 35 tokens

taiyi-evolve

A workflow skill that compares the implemented code with the frozen design after development and testing. It records architecture changes and proposes updates to DESIGN.md, the document describing the intended system structure.

Dong90/oh-my-taiyiforge · 37 tokens

taiyi-diagram-c4

A code-scanning tool that builds C4 architecture documents from a repository. It separates facts observed in the code from conclusions inferred about the design and uses Mermaid diagrams as the source format.

Dong90/oh-my-taiyiforge · 48 tokens