欸 昨天貼了 claude meetup taipei 心得裏面提到 2026 大趨勢是用 skills 取代 mcp 結果引來許多疑問,趁早上踩飛輪時就順手寫了篇快速解釋希望對大家有幫助!
-
context engineering 是 agent 開發最重要的事,其中關鍵就是防止 context 快速肥大導致 llm 失憶或注意力潰散,導致任務執行失敗。
-
由 mcp 升級 skills 的主要好處就是解決上述問題,讓你的 agent 變的更聰明能幹少出錯。
下面是俱體細節👇
IMPORTANT: This comprehensive setup will transform any iOS project into a fully automated, context-aware, self-maintaining Claude Code environment. This prompt is designed specifically for Claude Code (claude.ai/code) users.
Before starting, verify these tools are installed:
| @ViewBuilder | |
| private func build<#name#>(_ viewStore: ViewStoreType) -> some View { | |
| } |
| import Combine | |
| import CombineExt // Check this implementation: https://github.com/CombineCommunity/CombineExt/blob/main/Sources/Operators/Create.swift | |
| import CoreBluetooth | |
| // Client to generate target delegate publisher | |
| // Learned from https://github.com/pointfreeco/composable-core-location/blob/main/Sources/ComposableCoreLocation/Live.swift | |
| struct PeripheralClient { | |
| enum Action: Equatable { | |
| case didUptateName |
| public typealias CompletionHandler = Function<Void, Void> | |
| public typealias SideEffect<Input> = Function<Input, Void> | |
| public struct Function<Input, Output>: Identifiable { | |
| public let id: String | |
| internal let f: (Input) -> Output | |
| public init( | |
| id: String, |
| enum Either<A, B> { | |
| case left(A) | |
| case right(B) | |
| } | |
| extension Either: Decodable where A: Decodable, B: Decodable { | |
| init(from decoder: Decoder) throws { | |
| let container = try decoder.singleValueContainer() | |
| if let a = try? container.decode(A.self) { | |
| self = .left(a) |
| // The SwiftUI Lab | |
| // Website: https://swiftui-lab.com | |
| // Article: https://swiftui-lab.com/alignment-guides | |
| import SwiftUI | |
| struct ContentView: View { | |
| @State var position: Int = 0 | |
| var body: some View { |
| /*: | |
| This is a concept re-implementation of the @Binding and @State property wrappers from SwiftUI | |
| The only purpose of this code is to implement those wrappers myself | |
| just to understand how they work internally and why they are needed, | |
| ⚠️ This is not supposed to be a reference implementation nor cover all | |
| subtleties of the real Binding and State types. | |
| The only purpose of this playground is to show how re-implementing | |
| them myself has helped me understand the whole thing better |
The libdispatch is one of the most misused API due to the way it was presented to us when it was introduced and for many years after that, and due to the confusing documentation and API. This page is a compilation of important things to know if you're going to use this library. Many references are available at the end of this document pointing to comments from Apple's very own libdispatch maintainer (Pierre Habouzit).
My take-aways are:
You should create very few, long-lived, well-defined queues. These queues should be seen as execution contexts in your program (gui, background work, ...) that benefit from executing in parallel. An important thing to note is that if these queues are all active at once, you will get as many threads running. In most apps, you probably do not need to create more than 3 or 4 queues.
Go serial first, and as you find performance bottle necks, measure why, and if concurrency helps, apply with care, always validating under system pressure. Reuse