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.
npx skills add wangjianqi/AppStore --skill 06-network-apigit clone --depth 1 https://github.com/wangjianqi/AppStoreWrote 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.
[](https://agentmods.dev/skills/wangjianqi/appstore/06-network-api)<a href="https://agentmods.dev/skills/wangjianqi/appstore/06-network-api"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/06-network-api/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.
<a href="https://agentmods.dev/skills/wangjianqi/appstore/06-network-api"><img src="https://agentmods.dev/badge/skills/wangjianqi/appstore/06-network-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.03221 |
| Opus 5.5 | $0.00015 | $0.01288 |
| Sonnet 5.5 | $0.00007 | $0.00644 |
| Haiku 4.5 | $0.00004 | $0.00322 |
Grade A, and why
network-api 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 413 lines — stays where its author put it; the contents beside it link to each section on GitHub.
网络 / API 层
网络层架构
- 基础层:URLSession(禁止引入 Alamofire,除非已存在)
- 封装层:
NetworkService.swift统一处理请求、错误、重试 - 接口定义:每个模块有对应
XxxAPI.swift,定义 endpoint + 参数
NetworkService 完整封装
protocol NetworkServiceProtocol {
func request<T: Decodable>(_ endpoint: APIEndpoint) async throws -> T
func upload<T: Decodable>(_ endpoint: APIEndpoint, data: Data) async throws -> T
}
final class NetworkService: NetworkServiceProtocol {
private let session: URLSession
private let keychain: KeychainStorage
private let config: APIConfig
init(session: URLSession = .shared, keychain: KeychainStorage = .shared, config: APIConfig = .current) {
self.session = session
self.keychain = keychain
self.config = config
}
func request<T: Decodable>(_ endpoint: APIEndpoint) async throws -> T {
let urlRequest = try buildRequest(for: endpoint)
let response: T = try await executeWithRetry(urlRequest, maxRetries: endpoint.retryCount)
return response
}
func upload<T: Decodable>(_ endpoint: APIEndpoint, data: Data) async throws -> T {
var urlRequest = try buildRequest(for: endpoint)
urlRequest.httpBody = data
urlRequest.setValue("application/octet-stream", forHTTPHeaderField: "Content-Type")
return try await execute(urlRequest)
}
private func buildRequest(for endpoint: APIEndpoint) throws -> URLRequest {
var components = URLComponents(string: config.baseURL + endpoint.path)
if let parameters = endpoint.queryParameters {
components?.queryItems = parameters.map { URLQueryItem(name: $0.key, value: "\($0.value)") }
}
guard let url = components?.url else { throw NetworkError.invalidURL }
var request = URLRequest(url: url)
request.httpMethod = endpoint.method.rawValue
request.timeoutInterval = endpoint.timeout
if endpoint.requiresAuth {
guard let token = keychain.loadToken() else { throw NetworkError.unauthorized }
request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization")
}
if let body = endpoint.body {
request.httpBody = try JSONSerialization.data(withJSONObject: body)
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
}
request.setValue("application/json", forHTTPHeaderField: "Accept")
request.setValue(Bundle.main.appVersion, forHTTPHeaderField: "X-App-Version")
request.setValue(UIDevice.current.systemVersion, forHTTPHeaderField: "X-iOS-Version")
return request
}
private func execute<T: Decodable>(_ request: URLRequest) async throws -> T {
#if DEBUG
logRequest(request)
#endif
let (data, urlResponse) = try await session.data(for: request)
#if DEBUG
logResponse(data, response: urlResponse)
#endif
guard let httpResponse = urlResponse as? HTTPURLResponse else {
throw NetworkError.invalidResponse
}
switch httpResponse.statusCode {
case 200...299:
do {
let decoder = JSONDecoder()
decoder.keyDecodingStrategy = .convertFromSnakeCase
decoder.dateDecodingStrategy = .iso8601
return try decoder.decode(T.self, from: data)
} catch {
throw NetworkError.decodingFailed
}
case 401:
throw NetworkError.unauthorized
case 400...499:
if let errorBody = try? JSONDecoder().decode(ErrorResponse.self, from: data) {
throw NetworkError.clientError(httpResponse.statusCode, errorBody.message)
}
throw NetworkError.clientError(httpResponse.statusCode, "客户端错误")
case 500...599:
throw NetworkError.serverError(httpResponse.statusCode)
default:
throw NetworkError.unknown
}
}
}
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.
- 1mo ago First seen · 413 lines · 37 tokens per session scan A 566723cc3e0a
network-api is a skill published in the GitHub repository wangjianqi/AppStore (17 stars, last pushed 4mo ago), licensed MIT. It adds 37 tokens to every session and 3,221 once invoked, about $0.0001 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-08-31.
Other skills, from other repositories
ktor-patterns
Ktor HTTP client for an Android-only app - OkHttp/Android engine setup, ContentNegotiation with kotlinx.serialization, plugins/interceptors, and error handling on a single platform. For shared/multiplatform networking (commonMain, Darwin engine on iOS) use kmp-networking. For deeper, source-backed Ktor coverage…
swift-codable
Implement Swift Codable models for JSON and property-list encoding and decoding with JSONDecoder, JSONEncoder, CodingKeys, and custom init(from:) or encode(to:). Use when parsing API responses, remapping keys, flattening nested JSON, handling date or data decoding strategies, decoding heterogeneous arrays, or…
swift-codable
Master serialization and deserialization in Swift with Codable. Use when implementing custom CodingKeys, date/data decoding strategies, polymorphic/mixed collections, lossy array decoding, property wrappers for default values, or bridging Codable with SwiftData/CoreData persistence.
project-structure
Directory layout, file responsibilities, and Xcode integration for meta-loop projects.
kotlin-ktor-patterns
Ktor server patterns including routing DSL, plugins, authentication, Koin DI, kotlinx.serialization, WebSockets, and testApplication testing.
sweetpad
Build, run, and test Xcode and Swift Package apps from the terminal with the sweetpad CLI ("xcodebuild for humans"). Use when the user wants to compile an iOS/macOS/Swift app, run it on a simulator or device, read build errors, run tests, or inspect resolved build settings from the command line — with agent-safe…