跟着福强老师一分钟了解Claude Skills
跟着福强老师一分钟了解Claude Skills -王福强的个人博客:一个架构士的思考与沉淀 pre > code{ white-space: pre-wrap; font-family: monospace; font-size: 14px; /* border-left: blueviolet; border-left-width: thick; border-left-style: double; padding-left: 1rem !important; */ } .x-indicator{ display:none; } .htmx-request .x-indicator{ display:inline; } .htmx-request.x-indicator{ display:inline; } pre > code.sourceCode { white-space: pre; position: relative; } pre > code.sourceCode > span { line-height: 1.25; } pre > code.sourceCode > span:empty { height: 1.2em; } .sourceCode { overflow: visible; } code.sourceCode > span { color: inherit; text-decoration: inherit; } div.sourceCode { margin: 1em 0; } pre.sourceCode { margin: 0; } @media screen { div.sourceCode { overflow: auto; } } @media print { pre > code.sourceCode { white-space: pre-wrap; } pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; } } pre.numberSource code { counter-reset: source-line 0; } pre.numberSource code > span { position: relative; left: -4em; counter-increment: source-line; } pre.numberSource code > span > a:first-child::before { content: counter(source-line); position: relative; left: -1em; text-align: right; vertical-align: baseline; border: none; display: inline-block; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; padding: 0 4px; width: 4em; color: #aaaaaa; } pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } div.sourceCode { } @media screen { pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } } code span.al { color: #ff0000; font-weight: bold; } /* Alert */ code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ code span.at { color: #7d9029; } /* Attribute */ code span.bn { color: #40a070; } /* BaseN */ code span.bu { color: #008000; } /* BuiltIn */ code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ code span.ch { color: #4070a0; } /* Char */ code span.cn { color: #880000; } /* Constant */ code span.co { color: #60a0b0; font-style: italic; } /* Comment */ code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ code span.do { color: #ba2121; font-style: italic; } /* Documentation */ code span.dt { color: #902000; } /* DataType */ code span.dv { color: #40a070; } /* DecVal */ code span.er { color: #ff0000; font-weight: bold; } /* Error */ code span.ex { } /* Extension */ code span.fl { color: #40a070; } /* Float */ code span.fu { color: #06287e; } /* Function */ code span.im { color: #008000; font-weight: bold; } /* Import */ code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ code span.kw { color: #007020; font-weight: bold; } /* Keyword */ code span.op { color: #666666; } /* Operator */ code span.ot { color: #007020; } /* Other */ code span.pp { color: #bc7a00; } /* Preprocessor */ code span.sc { color: #4070a0; } /* SpecialChar */ code span.ss { color: #bb6688; } /* SpecialString */ code span.st { color: #4070a0; } /* String */ code span.va { color: #19177c; } /* Variable */ code span.vs { color: #4070a0; } /* VerbatimString */ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ { "@context": "https://schema.org", "@type": "NewsArticle", "headline": "跟着福强老师一分钟了解Claude Skills", "image": [ "https://afoo.me/images/fb_subscribe.jpg" ], "datePublished": "2025-10-19", "author": [{ "@type": "Person", "name": "王福强", "url": "https://afoo.me" }] } 福强私学 福强AI学堂 架构百科 博客文章 创作出版 产品与服务 登录信息 更多链接 (adsbygoogle = window.adsbygoogle || []).push({}); (adsbygoogle = window.adsbygoogle || []).push({}); 跟着福强老师一分钟了解Claude Skills 王福强 2025-10-19 (adsbygoogle = window.adsbygoogle || []).push({}); 读官方文档是最直接的:https://www.anthropic.com/news/skills Claude can now use Skills to improve how it performs specific tasks. 这句话说明,Skills是面向特定任务的设计。 Skills are folders that include instructions, scripts, and resources that Claude can load when needed. 这句话说明了Skills的交付和组织形式,就是个目录,目录里包含了指令(md编写的,AI友好嘛)、脚本和需要的资源。 Claude可以按需加载目录里这些东西。 Claude will only access a skill when it’s relevant to the task at hand. When used, skills make Claude better at specialized tasks like working with Excel or following your organization’s brand guidelines. 这个遵循组织的品牌指南挺好,一致性才是根本。 Now, you can build your own skills and use them across Claude apps, Claude Code, and our API. 可以在Anthropic家的产品上通用。 估计马上其他家就会有类似的概念和组件出现了🤣 While working on tasks, Claude scans available skills to find relevant matches. When one matches, it loads only the minimal information and files needed—keeping Claude fast while accessing specialized expertise. Skills这个frontmatter + body的行为设计,跟Scala里的Partial Functions很像,也就是必要匹配之后才会执行主体逻辑。从AI Agent角度它是为了省tokens,但从程序逻辑角度,其实就是条件匹配(predicates)。 这种设计还有个好处就是级联,比如,在KVectors向量数据库启动的时候,根据不同向量集合类型初始化的时候,用Partial Function的设计就可以实现优雅的级联: val vectorCollection: KVectorCollection = Option(collectionDir).collect(IVFIndexedKVectorCollection orElse HyperplanesLshKVectorCollection) match { case Some(vc) => logger.info(s"collected from specific collection partial function: ${vc.getClass}") vc case None => ... } 而Claude Skills,其实就是把条件检测+逻辑+级联的设计思想应用到了AI Agent的设计之中(也就是Claude的自家产品中)。 Skills are Composable: Skills stack together. Claude automatically identifies which skills are needed and coordinates their use 这里的composable就是级联, identify就是条件检测(predicates)。 (Skills are) Efficient: Only loads what’s needed, when it’s needed. 也就是匹配之后才执行, 跟PartialFunction的定义Perfect Match (Skills are) Powerful: Skills can include executable code for tasks where traditional programming is more reliable than token generation. 把MCP提供的原子能力本地化,可以融合自然语言和程序语言形成一个独立的模块。毕竟,程序语言比token生成更可靠,能用为啥不用?🤪 那Skills跟MCP有啥区别呢? MCP connects Claude to external services and data sources. Skills provide procedural knowledge—instructions for how to complete specific tasks or workflows. You can use both together: MCP connections give Claude access to tools, while Skills teach Claude how to use those tools effectively. 简单来说,IMO,MCP提供原子能力,怎么用这些原子能力,Skill是可以模块化的方式封装和使用。当然,如果只是本地需求,也可以在Skills里写脚本,这时候也不一定非得用MCP调用外部能力。 当然,有人把Skills类比为SOP(Standard Operating Procedure/标准作业流程),这个嘛,也可以这么理解: 只不过,就算是SOP, 它其实也是模块化内部的SOP,也就是完成一个任务(Task)所需的步骤。 福强老师觉得,这东西会是继MCP之后,另一个会在业界快速流行的AI生态一员。 Ref https://support.claude.com/en/articles/12512176-what-are-skills https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills https://github.com/anthropics/skills (adsbygoogle = window.adsbygoogle || []).push({}); >>>>>> 更多阅读 <<<<<< LLM框架与应用要解决的问题的本质 ChatGPT的宿命 Maven项目发布到公司内部Repository(Nexus) #阶段性反刍# 「福强私学」来一个? 「福强私学」, 一部沉淀了个人成长、技术与架构、组织与管理以及商业上的方法与心法的百科全书。 福强老师的 AI 通识课 开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。 Copyright © 王福强个人版权所有 - Since 2004 (Everything is homebrewed with Pandoc and Markdown, little Scala also included.) // Set "light" theme as default if (!localStorage.theme) { localStorage.theme = "light"; } if ( localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches) ) { document.documentElement.classList.add('dark'); } else { document.documentElement.classList.remove('dark'); } function attachEvent(selector, event, fn) { const matches = document.querySelectorAll(selector); if (matches && matches.length) { matches.forEach((elem) => { elem.addEventListener(event, () => fn(elem), false); }); } } window.onload = function () { attachEvent('[data-toggle-menu]', 'click', function (elem) { elem.classList.toggle('expanded'); document.body.classList.toggle('overflow-hidden'); document.getElementById('header')?.classList.toggle('h-screen'); document.querySelector('#header nav')?.classList.toggle('hidden'); }); attachEvent("[data-toggle-color-scheme]", "click", function () { document.documentElement.classList.toggle("light"); localStorage.theme = "light"; }); }; window.onpageshow = function () { const elem = document.querySelector('[data-toggle-menu]'); if (elem) { elem.classList.remove('expanded'); } document.body.classList.remove('overflow-hidden'); document.getElementById('header')?.classList.remove('h-screen'); document.querySelector('#header nav')?.classList.add('hidden'); }; var gitalk = new Gitalk({ clientID: '518a605d711883414ac0', clientSecret: '69fb8ccc0616c5bcbc64d24ece0d06d279da91ff', repo: 'afoo.me.comments', owner: 'fujohnwang', admin: ['fujohnwang'], id: location.pathname.substring(0, 49), // Ensure uniqueness and length less than 50 distractionFreeMode: false // Facebook-like distraction free mode }) gitalk.render('comments') /* paste this line in verbatim */ window.formbutton=window.formbutton||function(){(formbutton.q=formbutton.q||[]).push(arguments)}; /* customize formbutton below*/ formbutton("create", { action: "https://formspree.io/f/xknlpkkd", title: "有什么可以帮到您?💕💕💕 How can I help you?", buttonImg: "", fields: [ { type: "email", label: "您的电子邮箱(方便与您联系):", name: "email", required: true, placeholder: "your@email.com" }, { type: "textarea", label: "您想提交的反馈和询问信息:", name: "message", placeholder: "What's on your mind?", }, { type: "submit" } ], styles: { title: { backgroundColor: "blue" }, button: { backgroundColor: "blue" } } }); // tooltips tippy('#aiedu', { content: "As to AI nowadays, LLM and Stable Diffusion are hot even hottest among them, If your want to both know-why and know-how with them, instead of only know-how which can't repeat itself, you should get you to https://ai.afoo.me right now ❗" });