url-validation-security

url-validation-security is a skill for Claude Code, Codex from patrickserrano/lacquer. It costs 55 tokens per session (497 once invoked), scanned A, original, MIT.

A security review and implementation guide for checking URLs before an app opens them in media playback, network requests, or an embedded web view. It recommends accepting only safe HTTP and HTTPS URLs with valid hosts and no embedded credentials or control characters.

In plain words
What is it for?
Use it to build or review URL validation in Swift apps that use AVPlayer, URLSession, or WKWebView.
Why use it?
Untrusted URLs can send an app to unsafe locations or expose it to malformed input; checking them at multiple boundaries reduces that risk.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to build or review URL validation in Swift apps that use AVPlayer, URLSession, or WKWebView.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/patrickserrano/lacquer/url-validation-security
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 patrickserrano/lacquer --skill url-validation-security
Clone the repo
git clone --depth 1 https://github.com/patrickserrano/lacquer

Made for: Claude Code, Codex.

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 url-validation-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/patrickserrano/lacquer/url-validation-security/github.svg)](https://agentmods.dev/skills/patrickserrano/lacquer/url-validation-security)
Your own site
<a href="https://agentmods.dev/skills/patrickserrano/lacquer/url-validation-security"><img src="https://agentmods.dev/badge/skills/patrickserrano/lacquer/url-validation-security/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 url-validation-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/patrickserrano/lacquer/url-validation-security"><img src="https://agentmods.dev/badge/skills/patrickserrano/lacquer/url-validation-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 497 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.00055 $0.00497
Opus 5.5 $0.00022 $0.00199
Sonnet 5.5 $0.00011 $0.00099
Haiku 4.5 $0.00006 $0.00050

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

Security

Grade A, and why

url-validation-security 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 2mo ago.

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.

profiles/ios/skills/url-validation-security/SKILL.md · 42 lines

What it actually says

URL Validation Security Posture

Validate every user-provided URL through a positive-allowlist validator before it reaches AVPlayer, URLSession, or a WKWebView. Validate at both the manager and service boundaries (the duplication is intentional defense-in-depth). Known limitation: homograph / IDN look-alike hosts are not detected.

The validator parses once via URLComponents and asserts: http/https scheme only, non-empty host, no userinfo (credentials), a UTF-8 byte-length cap, and rejection of C0 controls / DEL / literal & percent-encoded null bytes. The dangerous-scheme denylist is redundant belt-and-suspenders.

enum SecureURLValidator {
    /// Returns true only when the URL satisfies every required property.
    /// Known limitation: homograph / IDN look-alike hosts are not detected.
    nonisolated static func validate(_ urlString: String) -> Bool {
        guard !urlString.isEmpty else { return false }
        guard urlString.utf8.count <= 2048 else { return false }
        guard !urlString.unicodeScalars.contains(where: { $0.value < 0x20 || $0.value == 0x7F }) else { return false }
        guard !urlString.contains("\0"), !urlString.lowercased().contains("%00") else { return false }
        let dangerous = ["javascript:", "data:", "file:", "vbscript:"]
        guard !dangerous.contains(where: { urlString.lowercased().hasPrefix($0) }) else { return false }
        guard let components = URLComponents(string: urlString) else { return false }
        guard let scheme = components.scheme?.lowercased(), ["http", "https"].contains(scheme) else { return false }
        guard components.user == nil, components.password == nil else { return false }
        guard let host = components.host, !host.isEmpty else { return false }
        return true
    }
}
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. 2mo ago First seen · 42 lines · 55 tokens per session scan A f5025547c35c

Subscribe to this mod's changes

url-validation-security is a skill published in the GitHub repository patrickserrano/lacquer (5 stars, last pushed yesterday), licensed MIT. It adds 55 tokens to every session and 497 once invoked, about $0.0002 per session on Opus 5.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-09-03.

Related

url-validation-security compared with skills from other repositories

url-validation-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
url-validation-securitypatrickserrano/lacquerSkill5yesterdayMITA55Claude Code, Codex
printing-press-amendmvanhorn/cli-printing-pressSkill5.1ktodayMITA222Claude Code
code-reviewjrswab/axeSkill914yesterdayApache-2.0A0Claude Code, Codex
scaffold-projectMarve10s/Better-FullstackSkill830yesterdayMITA80Claude Code
git-workflowdimetron/pi-goSkill232todayMITA59Claude Code, Codex
pi-loop-forensicsdimetron/pi-goSkill232todayMITA65Claude Code, Codex
nightly-session-watchdimetron/pi-goSkill232todayMITA78Claude Code, Codex