swift-guardrails-pro

swift-guardrails-pro is a skill for Claude Code from laxrajpurohit/swift-skills-pro. It costs 79 tokens per session (1,940 once invoked), scanned B, original, MIT.

A Swift and iOS code-checking workflow that checks changed lines for lint problems, repeated code, and suspicious Xcode project build steps. It runs automatically after edits and before commits.

In plain words
What is it for?
Use it to check changed Swift code, detect duplicate code, scan Xcode project files, or block a commit until findings are fixed.
Why use it?
It catches coding-rule violations, copy-pasted code, and certain project-file risks without requiring a whole old codebase to be cleaned up first.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: reads .claude/ paths; mentions Claude Code; reads ~/.codex paths.

Part of the swift-guardrails-pro plugin — 1 skill, 2 hooks shipped together

Good fit Use it to check changed Swift code, detect duplicate code, scan Xcode project files, or block a commit until findings are fixed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add laxrajpurohit/swift-skills-pro --skill swift-guardrails-pro
Clone the repo
git clone --depth 1 https://github.com/laxrajpurohit/swift-skills-pro

Made for: Claude Code.

Or install swift-guardrails-pro, the plugin that ships this one along with the rest of its 1 skill, 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 swift-guardrails-pro

README.md
[![agentmods](https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro/github.svg)](https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro)
Your own site
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for swift-guardrails-pro

Your own site · 80×15
<a href="https://agentmods.dev/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro"><img src="https://agentmods.dev/badge/skills/laxrajpurohit/swift-skills-pro/swift-guardrails-pro.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 79 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,940 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 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.00079 $0.01940
Opus 5.5 $0.00032 $0.00776
Sonnet 5.5 $0.00016 $0.00388
Haiku 4.5 $0.00008 $0.00194

Measured 9d ago against content hash 2a451a356d20, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

swift-guardrails-pro scanned grade B with 3 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 9d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (scripts/_common.sh, scripts/_filter.py, scripts/agent-hook.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

| `<skill>/scripts/pbxproj-scan.sh` | grep | build-phase injection in `project.pbxproj` (base64/xxd decode, `curl \| sh`, hidden background jobs, `osascript`) |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Reads agent configuration directorieslowAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

| `npx swift-skills-cli install` | `~/.claude/settings.json`, `~/.cursor/hooks.json`, `~/.codex/hooks.json`, `~/.codeium/windsurf/hooks.json` (each agent found on the machine) |

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| `<skill>/scripts/pbxproj-scan.sh` | grep | build-phase injection in `project.pbxproj` (base64/xxd decode, `curl \| sh`, hidden background jobs, `osascript`) |
swift-guardrails-pro/skills/swift-guardrails-pro/SKILL.md · 152 lines

How it starts

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

Swift Guardrails Pro

Coding rules that run on their own instead of advice someone has to remember. Everything is a ratchet: only lines a change adds or modifies are checked, so a legacy codebase adopts it on day one with no cleanup sprint.

No setup. Nothing is copied into the project. The scripts sit next to this file in scripts/ and work out the source folders, base branch, and lint config on their own. Installing the skill also wires them into the agent's hooks, so they run automatically:

When What runs Effect
After the agent edits a .swift file lint + copy-paste on that file's changed lines findings go back to the agent to fix
Before the agent runs git commit pbxproj scan + lint + copy-paste on staged lines commit blocked until fixed
Installed via Hooks registered in
Claude Code plugin the plugin itself
npx swift-skills-cli install ~/.claude/settings.json, ~/.cursor/hooks.json, ~/.codex/hooks.json, ~/.codeium/windsurf/hooks.json (each agent found on the machine)
Manual copy none yet; see "Registering hooks by hand"

When to use

  • "Check my changes", "lint this branch", "any copy-paste in this PR?"
  • "Stop copy-pasted views", "make sure nobody duplicates code".
  • Adding a project-specific rule (design tokens, banned APIs).
  • Enabling the checks for commits made outside Claude Code.

Trigger: /swift-guardrails-pro or natural language.

The checks

<skill> below is this file's directory. Run from anywhere inside the repo.

Script Tool Fails on
<skill>/scripts/lint-changed.sh SwiftLint error violations on changed lines (after an edit, warnings too, so the agent fixes them; a commit is blocked by errors only)
<skill>/scripts/dup-check.sh jscpd a duplicated block (≥ 8 lines / 60 tokens) that is at least half new
<skill>/scripts/pbxproj-scan.sh grep build-phase injection in project.pbxproj (base64/xxd decode, curl | sh, hidden background jobs, osascript)

Read the full file on GitHub · 152 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. 9d ago First seen · 152 lines · 79 tokens per session scan B 2a451a356d20

Subscribe to this mod's changes

swift-guardrails-pro is a skill published in the GitHub repository laxrajpurohit/swift-skills-pro (6 stars, last pushed 4d ago), licensed MIT. It adds 79 tokens to every session and 1,940 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 3 findings (downloads and executes remote code, reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.

Related

Other skills, from other repositories

coding-best-practices

Reviews Swift/iOS code for adherence to modern Swift idioms, Apple platform best practices, architecture patterns, and code quality standards. Use when user mentions best practices, code review, clean code, refactoring, or wants to improve code quality.

rshankras/claude-code-apple-skills · 55 tokens

release-review

Senior developer-level release review for macOS/iOS apps. Identifies security, privacy, UX, and distribution issues with actionable fixes. Use when preparing an app for release, want a critical review, or before App Store submission.

rshankras/claude-code-apple-skills · 49 tokens

tuicr

Use tuicr's review CLI to read and add comments in active TUI review sessions, and launch tuicr in cmux, tmux, Zellij, or Herdr when a user needs an interactive review pane.

agavra/tuicr · 50 tokens

liveagent-code-review

Review an open GitHub pull request or the current local branch and working tree with parallel, independent reviewers and evidence-based validation. Use when the user asks for code review, invokes the Code Review action from Git Review, or explicitly mentions this skill.

Stack-Cairn/LiveAgent · 54 tokens

omh-image-cards

This is an OMH img-summary workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 79 tokens

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens