用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/rebornix/acp-swift-sdk --skill add-method命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Synchronizes Swift types with the ACP protocol schema. Use when updating SDK types to match the latest protocol specification.
Tests the ACP Swift SDK against multiple ACP agents (qwen, gemini, claude-code-acp) to verify compatibility.
Updates golden test files from the Python SDK for cross-SDK compatibility verification.
基于 SOC 职业分类
正在显示 SKILL.md
| name | add-method |
| description | Adds a new ACP protocol method to the SDK with proper typing, documentation, and tests. |
Adds a new ACP protocol method to the SDK.
User says: "/add-method " (e.g., "/add-method session/fork")
Look up method in schema (schema.json or schema.unstable.json) for:
Create Method enum in appropriate file:
Client/Methods/SessionMethods.swiftClient/Methods/Initialize.swiftAdd deprecation warning if unstable:
@available(*, deprecated, message: "Unstable ACP API - may change without notice")
Add convenience method to Client (if appropriate):
extension Client {
public func forkSession(sessionID: String) async throws -> SessionFork.Result {
try await send(SessionFork.request(
id: .sequential(from: &nextRequestID),
SessionFork.Parameters(sessionID: sessionID)
))
}
}
Add golden test if available
Run tests to verify:
swift test
// MARK: - method/name
/// Description of what this method does.
public enum MethodName: Method {
public static let name = "method/name"
public struct Parameters: Codable, Hashable, Sendable {
/// Description of parameter.
public var param: String
private enum CodingKeys: String, CodingKey {
case param = "paramName"
}
public init(param: String) {
self.param = param
}
}
public struct Result: Codable, Hashable, Sendable {
/// Description of result.
public var result: String
public init(result: String) {
.result result
}
}
}
PascalCase (e.g., SessionNew, SessionPrompt)"session/new", "session/prompt")camelCase with CodingKeys for snake_case JSONID suffix (e.g., sessionID, toolCallID)swift test passes