<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Interface Design on KbWen Blog</title>
    <link>https://www.kbwen.com/tags/interface-design/</link>
    <description>KbWen 的個人技術部落格，分享 Python、機器學習、深度學習、資料工程與 AI 開發的學習筆記與實作心得。</description>
    <generator>Hugo</generator>
    <language>zh-tw</language>
    <image>
      <url>https://www.kbwen.com/images/og-default.png</url>
      <title>KbWen Blog</title>
      <link>https://www.kbwen.com/</link>
    </image>
    
    <lastBuildDate>Mon, 25 May 2026 12:00:00 +0800</lastBuildDate><atom:link href="https://www.kbwen.com/tags/interface-design/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Skill Design as Interface Design</title>
      <link>https://www.kbwen.com/skill-design-as-interface-design/</link>
      <pubDate>Mon, 25 May 2026 12:00:00 +0800</pubDate><dc:creator>KbWen</dc:creator>
      <guid>https://www.kbwen.com/skill-design-as-interface-design/</guid>
      <description>An agent skill behaves predictably to the exact degree its boundary is specified. Treat it as a capability list and it drifts; treat it as a contract (declared inputs, outputs, and scope), and it behaves like a well-designed API.</description>
      <content:encoded><![CDATA[<blockquote>
<p><strong>TL;DR:</strong> An agent skill behaves predictably to about the degree its boundary is specified. Described as a capability (&ldquo;the agent can now do X&rdquo;), a skill tends to drift. Described as a contract (declared inputs, declared outputs, a scope it promises not to exceed), it behaves more like a well-designed API. The interface-design habits engineers already have (stable contracts, explicit scope, versioning) seem to transfer directly. The framework&rsquo;s own direction points the same way: skills as versioned, capability-bounded packages, with boundary enforcement instead of micromanaging how the model reasons.</p>
</blockquote>
<hr>
<p>Every team that has shipped a public API has lived through the same lesson: an endpoint that does &ldquo;roughly what you&rsquo;d expect&rdquo; is a liability. The contract (what it accepts, what it returns, what it won&rsquo;t touch) is the product. The implementation behind it is replaceable. Agent skills seem to be arriving at the same lesson, just faster.</p>
<p>A skill, in Anthropic&rsquo;s <a href="https://platform.claude.com/docs/en/agents-and-tools/agent-skills/overview">Agent Skills standard</a> (now shared across Claude Code, Codex, and Cursor), is a <code>SKILL.md</code> file: instructions plus frontmatter that controls when it loads and who invokes it. That format makes it tempting to think of a skill as &ldquo;a prompt the agent can reuse.&rdquo; That framing is where a lot of the unpredictability starts.</p>
<h2 id="a-skill-is-a-contract-not-a-capability-list">A skill is a contract, not a capability list</h2>
<p>The usual way to describe a skill is by capability: &ldquo;this one runs the test suite,&rdquo; &ldquo;this one deploys.&rdquo; It reads naturally and it sets you up to be surprised. A capability has no edges. &ldquo;Can deploy&rdquo; says nothing about what it will read, what it will change, or what it will do when the situation doesn&rsquo;t match the happy path.</p>
<p>A contract has edges by construction. It names what goes in, what comes out, and what stays out of reach. The framework&rsquo;s own architecture notes put it more bluntly than I would: skills should be treated as &ldquo;versioned, policy-governed, capability-bounded packages,&rdquo; not &ldquo;loose prompt files.&rdquo; The same idea runs through <a href="/what-makes-an-ai-skill-different-from-a-prompt/">what makes a skill different from a prompt</a>: the value is in the specification, not the raw capability.</p>
<h2 id="the-principles-that-transfer">The principles that transfer</h2>
<p>If a skill is an interface, then the design vocabulary engineers already use mostly carries over:</p>
<table>
  <thead>
      <tr>
          <th>Interface concept</th>
          <th>Skill design equivalent</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Request / response schema</td>
          <td>Declared inputs and declared outputs</td>
      </tr>
      <tr>
          <td>Endpoint scope (touches these resources, not those)</td>
          <td>Tool, path, and network boundaries</td>
      </tr>
      <tr>
          <td>Versioning (semver)</td>
          <td>A skill version, so callers know what they&rsquo;re getting</td>
      </tr>
      <tr>
          <td>Breaking change</td>
          <td>Scope drift: the skill quietly starts doing more</td>
      </tr>
      <tr>
          <td>Deprecation</td>
          <td>An explicit lifecycle state, not silent rot</td>
      </tr>
  </tbody>
</table>
<p>None of this is novel to anyone who has designed an interface. The only move is recognizing that a skill <em>is</em> one, and that &ldquo;be more careful&rdquo; is not a substitute for a specified boundary—the same way &ldquo;use the API responsibly&rdquo; was never a substitute for a schema.</p>
<h2 id="scope-drift-is-a-breaking-change">Scope drift is a breaking change</h2>
<p>The most common failure I see isn&rsquo;t a skill that can&rsquo;t do its job. It&rsquo;s a skill that does its job plus two things nobody asked for, because its scope was never drawn.</p>
<p>The framework&rsquo;s design principle for this is worth borrowing: <strong>boundary enforcement over behavior micromanagement</strong>. You don&rsquo;t fix a vague skill by adding more instructions about how to reason well. You constrain what it can reach—which files, which tools, which budget. A skill whose scope widens over time is shipping a breaking change with no version bump, and the caller (you) finds out the way callers always find out: in production. This is the same capability-boundary gap behind several of the <a href="/ai-agent-common-pitfalls-and-fixes/">common agent pitfalls</a>; scope is just the place it shows up most expensively.</p>
<h2 id="the-boundary-has-a-token-price-too">The boundary has a token price too</h2>
<p>There&rsquo;s a second reason to draw the edge tightly, and it connects to cost. Skills load progressively: the agent reads a skill&rsquo;s small metadata to decide whether it&rsquo;s relevant, and only pulls the full body when it is. A tightly-bounded skill is cheaper to ignore: its contract is small and quick to probe, where a sprawling one drags its whole body into context to find out it didn&rsquo;t apply. Interface discipline and <a href="/token-economics-of-ai-agent-governance/">token discipline</a> end up pointing in the same direction: a clear, small contract is both more predictable and less expensive.</p>
<p>A skill with a fuzzy boundary isn&rsquo;t really a capability. It&rsquo;s an undocumented API, and it will surprise you for the same reasons undocumented APIs always have. I don&rsquo;t think the right contract for a given skill is obvious up front—I usually find it by watching where a skill oversteps and drawing the line there. But the framing has held up: define what it promises, define what it won&rsquo;t touch, and treat a change to either as the breaking change it is.</p>
<p><em>This post is part of a series on building real AI systems. Related: <a href="/what-makes-an-ai-skill-different-from-a-prompt/">What Makes an AI Skill Different from a Prompt?</a> and <a href="/beyond-prompt-from-instructions-to-building-systems/">Beyond Prompts: From Giving Instructions to Building Systems</a>. A Chinese companion piece on skill boundaries is <a href="/skill-boundary-design/">Skill 邊界設計:從能力到合約</a>. The framework is open source at <a href="https://github.com/KbWen/agentic-os">github.com/KbWen/agentic-os</a>.</em></p>
]]></content:encoded>
    </item>
    
  </channel>
</rss>
