[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69AFB3QY85TDMW0KFD4VQHN":3,"skill-same:01M69AFB3QY85TDMW0KFD4VQHN":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":45,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M69AFB3QY85TDMW0KFD4VQHN","build-ahp-host","AHP 主机与服务器开发","Implement or review an Agent Host Protocol host or server, including JSON-RPC transport routing, subscriptions, serverSeq and reconnect, durable state, cancellation, concurrency, model adapters, and explicit unsupported behavior. Use for host architecture and server behavior, not for changing the AHP contract or building a client UI.","实现或审查 Agent Host Protocol 主机或服务器，包括 JSON-RPC 传输路由、订阅、serverSeq 与重连、持久状态、取消、并发、模型适配器以及显式不支持的行为。适用于主机架构和服务器行为，不适用于变更 AHP 契约或构建客户端 UI。","microsoft\u002Fagent-host-protocol-contrib","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AF73MFMMND7YZVT4F00XV",1,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib\u002Fblob\u002Fmain\u002Fplugins\u002Fahp-development\u002Fskills\u002Fbuild-ahp-host\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[31,32,33,34],"build ahp host","review","implement","architecture","2026-11-10 10:12:30",false,"---\nname: build-ahp-host\ndescription: Implement or review an Agent Host Protocol host or server, including JSON-RPC transport routing, subscriptions, serverSeq and reconnect, durable state, cancellation, concurrency, model adapters, and explicit unsupported behavior. Use for host architecture and server behavior, not for changing the AHP contract or building a client UI.\nlicense: MIT\n---\n\n# Build an AHP Host\n\nUse this skill for an AHP server implementation or review: WebSocket\u002FJSON-RPC\nentry points, command routing, state publication, persistence, model execution,\nand lifecycle behavior.\n\n## Use this \u002F use another skill\n\n| Use this skill | Use another skill |\n| --- | --- |\n| A host must accept requests, publish actions, resume clients, or run agent work. | Use `design-ahp-protocol` to alter commands, actions, schemas, or compatibility rules. |\n| You are deciding persistence, fan-out, cancellation, or adapter boundaries. | Use `build-ahp-client` for application state, UI, and client reconnection code. |\n| You need observable end-to-end probes against a host. | Use `test-ahp-conformance` to build the black-box tests. |\n\n## Ground the implementation\n\n1. Determine the negotiated AHP version and supported capabilities from the\n   current protocol source. Read the applicable lifecycle, subscription,\n   channel, error, and versioning documents plus wire schemas\u002Ftypes.\n2. Locate equivalent host code and tests in the current repository before\n   inventing a new flow. If the protocol source is absent locally, consult the\n   upstream repository and use released schemas; do not depend on a\n   machine-specific sibling path.\n3. Mark each requirement as normative AHP behavior or this host's profile\n   choice. For example, redb, replay retention limits, queue sizes, a narrow\n   OpenAI request shape, and excluded feature surfaces are sample choices, not\n   universal AHP rules.\n4. Map the existing seams: transport, JSON-RPC parser\u002Frouter, protocol handler,\n   domain\u002Fturn logic, persistence port, publisher, and model adapter.\n\n## Plan observable invariants\n\nBefore changing code, name the externally observable assertions:\n\n| Area | Invariant |\n| --- | --- |\n| Handshake | Negotiate once; accept an offered compatible version or return the specified error and close. |\n| Subscriptions | Return typed snapshots where applicable and send only traffic scoped to active subscriptions. |\n| Actions | Assign monotonically increasing `serverSeq`; preserve channel routing and origin\u002Frejection semantics. |\n| Durability | Commit state and replayable action atomically before publishing it to peers. |\n| Recovery | Replay a complete gap in order, or return replacement snapshots; never send a misleading partial replay. |\n| Cancellation | A cancelled turn reaches one terminal state and cannot publish late output. |\n| Errors | Invalid requests and unsupported methods fail explicitly; do not return success-shaped no-ops. |\n\nTreat root\u002Fsession\u002Fchat or other channel state as typed protocol projections,\nnot persistence DTOs. Keep storage records behind a port so schema conversion\nand database migration do not leak into routing or turn logic.\n\n## Implement in a safe order\n\n1. Validate JSON-RPC shape, connection phase, negotiated version, channel URI,\n   permissions, and action payload before mutating durable state.\n2. Route commands by their defined ownership. Preserve request\u002Fresponse\n   correlation and distinguish requests from notifications.\n3. Serialize the critical publication path sufficiently to keep action order:\n   reduce\u002Ftransition state, durably append the envelope with its sequence, then\n   fan it out. Do not hold unrelated network or model work under a global lock.\n4. Track subscribers and bounded outbound delivery deliberately. A slow peer\n   may be dropped under a host policy, but its reconnection must be able to\n   establish a truthful state from replay or snapshots.\n5. Implement reconnect from the client's last seen sequence and requested\n   subscriptions. A replay gap requires snapshot fallback. Protocol\n   notifications are ephemeral; make clients recover their catalog through the\n   prescribed fetch\u002Flist path rather than pretending notifications replay.\n6. Give every running turn a cancellation\u002Fshutdown token. Check it before each\n   persistence\u002Fpublication step, remove its registry entry on all exits, and\n   suppress deltas, completion, and errors that arrive after cancellation.\n7. Isolate model-provider request\u002Fresponse normalization and timeout\u002Ferror\n   mapping behind a small interface. Map provider failures to intentional AHP\n   terminal behavior without exposing credentials or provider DTOs.\n8. Reject unsupported commands\u002Factions clearly at the appropriate protocol\n   boundary. Document the host profile rather than implying an omission is an\n   AHP limitation.\n9. When models or provider options are selectable, advertise them through root\n   model metadata and the session-config commands. Persist resolved defaults,\n   validate mutable `session\u002FconfigChanged` actions, and record the effective\n   `ModelSelection` on each user message rather than hiding selection in a\n   private endpoint setting.\n\n## Keep the architecture human-scale\n\nPrefer narrow ownership boundaries over a universal dispatcher:\n\n- transport owns peers and connection loops;\n- protocol owns parsing, negotiation, and command validation;\n- domain\u002Fturn logic owns lifecycle decisions;\n- persistence owns transactions, replay, and snapshot projections;\n- publication owns sequence assignment and fan-out;\n- adapters own external model APIs.\n\nUse the repository's canonical types and generated bindings. Change generated\nfiles only through their documented generator.\n\n## Validate and finish\n\nRun focused unit tests for the changed parser, persistence, turn, or publisher\nfirst. Then exercise a raw or SDK client for handshake, snapshot, action\nordering, reconnection, two-client delivery, cancellation, and failure paths.\nRun broader host\u002Fconformance checks when the focused slice passes.\n\nStop when no post-cancellation output can appear, every advertised action was\ndurable first, replay never lies about a gap, and unsupported scope is explicit.\nDocument operational bounds and non-goals as host-profile choices.\n","# Build an AHP Host\n\nUse this skill for an AHP server implementation or review: WebSocket\u002FJSON-RPC\nentry points, command routing, state publication, persistence, model execution,\nand lifecycle behavior.\n\n## Use this \u002F use another skill\n\n| Use this skill | Use another skill |\n| --- | --- |\n| A host must accept requests, publish actions, resume clients, or run agent work. | Use `design-ahp-protocol` to alter commands, actions, schemas, or compatibility rules. |\n| You are deciding persistence, fan-out, cancellation, or adapter boundaries. | Use `build-ahp-client` for application state, UI, and client reconnection code. |\n| You need observable end-to-end probes against a host. | Use `test-ahp-conformance` to build the black-box tests. |\n\n## Ground the implementation\n\n1. Determine the negotiated AHP version and supported capabilities from the\n   current protocol source. Read the applicable lifecycle, subscription,\n   channel, error, and versioning documents plus wire schemas\u002Ftypes.\n2. Locate equivalent host code and tests in the current repository before\n   inventing a new flow. If the protocol source is absent locally, consult the\n   upstream repository and use released schemas; do not depend on a\n   machine-specific sibling path.\n3. Mark each requirement as normative AHP behavior or this host's profile\n   choice. For example, redb, replay retention limits, queue sizes, a narrow\n   OpenAI request shape, and excluded feature surfaces are sample choices, not\n   universal AHP rules.\n4. Map the existing seams: transport, JSON-RPC parser\u002Frouter, protocol handler,\n   domain\u002Fturn logic, persistence port, publisher, and model adapter.\n\n## Plan observable invariants\n\nBefore changing code, name the externally observable assertions:\n\n| Area | Invariant |\n| --- | --- |\n| Handshake | Negotiate once; accept an offered compatible version or return the specified error and close. |\n| Subscriptions | Return typed snapshots where applicable and send only traffic scoped to active subscriptions. |\n| Actions | Assign monotonically increasing `serverSeq`; preserve channel routing and origin\u002Frejection semantics. |\n| Durability | Commit state and replayable action atomically before publishing it to peers. |\n| Recovery | Replay a complete gap in order, or return replacement snapshots; never send a misleading partial replay. |\n| Cancellation | A cancelled turn reaches one terminal state and cannot publish late output. |\n| Errors | Invalid requests and unsupported methods fail explicitly; do not return success-shaped no-ops. |\n\nTreat root\u002Fsession\u002Fchat or other channel state as typed protocol projections,\nnot persistence DTOs. Keep storage records behind a port so schema conversion\nand database migration do not leak into routing or turn logic.\n\n## Implement in a safe order\n\n1. Validate JSON-RPC shape, connection phase, negotiated version, channel URI,\n   permissions, and action payload before mutating durable state.\n2. Route commands by their defined ownership. Preserve request\u002Fresponse\n   correlation and distinguish requests from notifications.\n3. Serialize the critical publication path sufficiently to keep action order:\n   reduce\u002Ftransition state, durably append the envelope with its sequence, then\n   fan it out. Do not hold unrelated network or model work under a global lock.\n4. Track subscribers and bounded outbound delivery deliberately. A slow peer\n   may be dropped under a host policy, but its reconnection must be able to\n   establish a truthful state from replay or snapshots.\n5. Implement reconnect from the client's last seen sequence and requested\n   subscriptions. A replay gap requires snapshot fallback. Protocol\n   notifications are ephemeral; make clients recover their catalog through the\n   prescribed fetch\u002Flist path rather than pretending notifications replay.\n6. Give every running turn a cancellation\u002Fshutdown token. Check it before each\n   persistence\u002Fpublication step, remove its registry entry on all exits, and\n   suppress deltas, completion, and errors that arrive after cancellation.\n7. Isolate model-provider request\u002Fresponse normalization and timeout\u002Ferror\n   mapping behind a small interface. Map provider failures to intentional AHP\n   terminal behavior without exposing credentials or provider DTOs.\n8. Reject unsupported commands\u002Factions clearly at the appropriate protocol\n   boundary. Document the host profile rather than implying an omission is an\n   AHP limitation.\n9. When models or provider options are selectable, advertise them through root\n   model metadata and the session-config commands. Persist resolved defaults,\n   validate mutable `session\u002FconfigChanged` actions, and record the effective\n   `ModelSelection` on each user message rather than hiding selection in a\n   private endpoint setting.\n\n## Keep the architecture human-scale\n\nPrefer narrow ownership boundaries over a universal dispatcher:\n\n- transport owns peers and connection loops;\n- protocol owns parsing, negotiation, and command validation;\n- domain\u002Fturn logic owns lifecycle decisions;\n- persistence owns transactions, replay, and snapshot projections;\n- publication owns sequence assignment and fan-out;\n- adapters own external model APIs.\n\nUse the repository's canonical types and generated bindings. Change generated\nfiles only through their documented generator.\n\n## Validate and finish\n\nRun focused unit tests for the changed parser, persistence, turn, or publisher\nfirst. Then exercise a raw or SDK client for handshake, snapshot, action\nordering, reconnection, two-client delivery, cancellation, and failure paths.\nRun broader host\u002Fconformance checks when the focused slice passes.\n\nStop when no post-cancellation output can appear, every advertised action was\ndurable first, replay never lies about a gap, and unsupported scope is explicit.\nDocument operational bounds and non-goals as host-profile choices.\n",{"name":5,"license":16,"description":7},"main","cfdd74a4b9aa5710d2bee3ebbdac587f7a13f3e5","plugins\u002Fahp-development\u002Fskills\u002Fbuild-ahp-host",0,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib","https:\u002F\u002Fmicrosoft.github.io\u002Fagent-host-protocol\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-13 20:56:58",{"source":9,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add microsoft\u002Fagent-host-protocol-contrib --skill build-ahp-host",{"tool":56,"command":57},"bunx","bunx skills add microsoft\u002Fagent-host-protocol-contrib --skill build-ahp-host",{"tool":59,"command":60},"pnpm","pnpm dlx skills add microsoft\u002Fagent-host-protocol-contrib --skill build-ahp-host","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib\u002Fblob\u002Fmain\u002Fplugins\u002Fahp-development\u002Fskills\u002Fbuild-ahp-host\u002FSKILL.md",true,[],[65,85,97],{"skillNo":66,"name":67,"nameZh":68,"description":69,"descriptionZh":70,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":71,"categories":72,"keywords":79,"publishedAt":35},"01M69AFEK5JE1BA30TTAMKZABV","test-ahp-conformance","AHP 协议一致性测试","Create or review black-box Agent Host Protocol conformance tests, including deterministic model fixtures, lifecycle and error cases, multi-client and restart coverage, bounded timeouts, and CLI\u002FHTML reports with optional JSON results. Use for observable interoperability testing, not for changing protocol design or implementing host\u002Fclient production code.","创建或审查 Agent Host Protocol（AHP）黑盒一致性测试，包括确定性模型夹具、生命周期与错误用例、多客户端与重启覆盖、有界超时控制，以及可附带 JSON 结果的 CLI\u002FHTML 报告。用于可观测的互操作性测试，而非变更协议设计或实现宿主\u002F客户端生产代码。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib\u002Fblob\u002Fmain\u002Fplugins\u002Fahp-development\u002Fskills\u002Ftest-ahp-conformance\u002FSKILL.md",[73,76],{"categoryNo":74,"categoryName":75,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":77,"categoryName":78,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[80,81,82,83,32,84],"test","test ahp conformance","testing","design","cli",{"skillNo":86,"name":87,"nameZh":88,"description":89,"descriptionZh":90,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":91,"categories":92,"keywords":95,"publishedAt":35},"01M69AFCRAMS3FCCC939QD19Y3","design-ahp-protocol","AHP 协议设计与评审","Design or review Agent Host Protocol commands, actions, state, errors, reducers, schemas, code generation, versioning, compatibility, and multi-client invariants. Use when changing the AHP contract or assessing a protocol-level design, not when implementing only one host, client, or test suite.","设计或审查 Agent Host Protocol（AHP）的命令、动作、状态、错误、reducer、schema、代码生成、版本控制、兼容性及多客户端不变量。适用于变更 AHP 契约或评估协议层设计时，而非仅实现单个宿主、客户端或测试套件时。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib\u002Fblob\u002Fmain\u002Fplugins\u002Fahp-development\u002Fskills\u002Fdesign-ahp-protocol\u002FSKILL.md",[93,94],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[83,96,32,80],"design ahp protocol",{"skillNo":98,"name":99,"nameZh":100,"description":101,"descriptionZh":102,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":103,"categories":104,"keywords":107,"publishedAt":35},"01M69AF9501PNSDFNDRY6C9QFC","build-ahp-client","AHP 客户端应用开发","Implement or review an SDK-backed Agent Host Protocol client application, including initialization, subscriptions, immutable reducer state, reconnect cleanup, multi-host behavior, and UI-friendly projections. Use for browser, TypeScript, desktop, or other client consumers, not for host internals or protocol contract changes.","实现或审查基于 SDK 的 Agent Host Protocol（AHP）客户端应用程序，包括初始化、订阅、不可变 reducer 状态、重连清理、多主机行为以及 UI 友好的投影。适用于浏览器、TypeScript、桌面或其他客户端使用者，不适用于主机内部实现或协议契约变更。","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fagent-host-protocol-contrib\u002Fblob\u002Fmain\u002Fplugins\u002Fahp-development\u002Fskills\u002Fbuild-ahp-client\u002FSKILL.md",[105,106],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},[108,32,109,110,33],"build ahp client","typescript","sdk"]