원클릭으로
add-method
Adds a new ACP protocol method to the SDK with proper typing, documentation, and tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Adds a new ACP protocol method to the SDK with proper typing, documentation, and tests.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
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.
| 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) {
self.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