SwiftMesh

SwiftMesh is a skill for Claude Code, Codex from zjinhu/SwiftMesh. It costs 0 tokens per session (4,157 once invoked), scanned A, original, MIT.

A reference guide for SwiftMesh, a Swift networking wrapper for making web requests and encoding or decoding data. It documents requests, uploads, downloads, retries, logging, asynchronous code, and fluent configuration.

In plain words
What is it for?
Use it to build typed API requests, upload or resume downloads, read nested JSON, configure retries, and enable network logs in Swift apps.
Why use it?
It gives developers the method names and request flow needed to use the library without searching through its source.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build typed API requests, upload or resume downloads, read nested JSON, configure retries, and enable network logs in Swift apps.

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

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 SwiftMesh

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/zjinhu/swiftmesh/swiftmesh"><img src="https://agentmods.dev/badge/skills/zjinhu/swiftmesh/swiftmesh.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,157 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.00000 $0.04157
Opus 5 $0.00000 $0.02079
Sonnet 5 $0.00000 $0.00831
Haiku 4.5 $0.00000 $0.00416

Measured 4d ago against content hash fb8257391e4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

SwiftMesh 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 4d 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.

SKILL.md · 597 lines

How it starts

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

SwiftMesh AI Skill

A comprehensive AI reference for using SwiftMesh — an Alamofire + Codable wrapper with async/await, Combine, fluent configuration, file upload/download, JSON key path parsing, resilient Codable wrappers, and built-in logging.


Quick Reference Card

Feature Method Description
GET Request .request(of: Model.self) Decode response to Codable model
Key Path .request(of: Model.self, modelKeyPath: "data.user") Extract nested JSON
File Upload .upload(of: Result.self) Upload file/Data/stream/multipart
File Download .download() Download or resume download
Raw Data .requestData() Get raw response Data
Raw String .requestString() Get response as String
Retry Policy .setInterceptor(RetryPolicy()) Auto-retry with backoff
Logging Mesh.enableLog() Enable network logging

Core Architecture

SwiftMesh uses a builder pattern on the Mesh class. Every configuration method returns Self, enabling fluent chaining. The flow is:

Configure (Mesh + Config) → Execute (Request/Upload/Download) → Handle (Handle)

File Structure

File Purpose
Mesh.swift Core builder class with all properties
Config.swift Fluent chainable setters + global config
Request.swift async/await request execution
Handle.swift URL construction, error handling, response processing, RetryPolicy
Upload.swift File upload (file, data, stream, multipart)
Download.swift File download (standard, resumable)
KeyPath.swift JSON key path decoder for nested extraction
Codable+.swift Resilient property wrappers (@Default, @IgnoreError, @ConvertTo*)
Log.swift Network logger (cURL, status, timing, JSON)

Usage Patterns

1. Basic GET Request

let result = try await Mesh()
    .setRequestMethod(.get)
    .setUrlHost("https://api.example.com")
    .setUrlPath("/weather/city/101030100")
    .request(of: Weather.self)

Read the full file on GitHub · 597 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. 4d ago First seen · 597 lines · 0 tokens per session scan A fb8257391e4d

Subscribe to this mod's changes

SwiftMesh is a skill published in the GitHub repository zjinhu/SwiftMesh (32 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,157 tokens. 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-04.