[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M69B02RB14E86JKCYD0QG2GD":3,"skill-same:01M69B02RB14E86JKCYD0QG2GD":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":27,"linkOnly":28,"markdownContent":29,"markdownBody":30,"frontMatter":31,"refName":36,"commitSha":37,"skillDirectory":38,"forksCount":39,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":42,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M69B02RB14E86JKCYD0QG2GD","module-development",null,"Guide for creating new Amplifier modules including protocol implementation, entry points, mount functions, and testing patterns. Use when creating new modules or understanding module architecture.","microsoft\u002Famplifier-bundle-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M69AZYFW50CECTV9VW6B34SE",12,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fmodules\u002Ftool-skills\u002Ftests\u002Ffixtures\u002Fskills\u002Fmodule-development\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",[24,25,26],"module development","testing","architecture","2026-11-10 10:12:30",false,"---\nname: module-development\ndescription: Guide for creating new Amplifier modules including protocol implementation, entry points, mount functions, and testing patterns. Use when creating new modules or understanding module architecture.\nversion: 1.0.0\nlicense: MIT\nmetadata:\n  category: development\n  complexity: medium\n---\n\n# Module Development Guide\n\n## Creating a New Module\n\n### Step 1: Choose Protocol\n\nDetermine which protocol your module implements:\n\n- **Tool**: Agent capability (filesystem, bash, web, database)\n- **Provider**: LLM backend (Anthropic, OpenAI, Ollama)\n- **Context**: Conversation state management (simple, persistent)\n- **Orchestrator**: Execution loop strategy (basic, streaming, events)\n- **Hook**: Lifecycle observer (logging, approval, redaction)\n\n### Step 2: Implement Protocol\n\n```python\nfrom typing import Any\nfrom amplifier_core import ModuleCoordinator, ToolResult\n\nclass MyTool:\n    \"\"\"Tool for doing something useful.\"\"\"\n\n    name = \"my-tool\"\n    description = \"Does something useful\"\n\n    def __init__(self: \"MyTool\", config: dict[str, Any]) -> None:\n        \"\"\"Initialize tool with configuration.\"\"\"\n        self.config = config\n        self.timeout = config.get(\"timeout\", 30)\n\n    @property\n    def input_schema(self: \"MyTool\") -> dict:\n        \"\"\"Return JSON schema for tool parameters.\"\"\"\n        return {\n            \"type\": \"object\",\n            \"properties\": {\n                \"param\": {\"type\": \"string\", \"description\": \"Parameter description\"}\n            },\n            \"required\": [\"param\"]\n        }\n\n    async def execute(self: \"MyTool\", input: dict[str, Any]) -> ToolResult:\n        \"\"\"Execute tool operation.\"\"\"\n        param = input.get(\"param\")\n        if not param:\n            return ToolResult(\n                success=False,\n                error={\"message\": \"param is required\"}\n            )\n\n        # Implementation here\n        result = f\"Processed: {param}\"\n\n        return ToolResult(\n            success=True,\n            output={\"result\": result}\n        )\n```\n\n### Step 3: Create Mount Function\n\n```python\nasync def mount(coordinator: ModuleCoordinator, config: dict[str, Any] | None = None) -> None:\n    \"\"\"\n    Mount the tool module.\n\n    Args:\n        coordinator: Module coordinator providing infrastructure\n        config: Module configuration from profile\n\n    Returns:\n        Optional cleanup function\n    \"\"\"\n    config = config or {}\n    tool = MyTool(config)\n    await coordinator.mount(\"tools\", tool, name=tool.name)\n    logger.info(\"Mounted MyTool\")\n    return\n```\n\n### Step 4: Register Entry Point\n\n```toml\n# pyproject.toml\n[project]\nname = \"amplifier-module-tool-mytool\"\nversion = \"0.1.0\"\nrequires-python = \">=3.11\"\ndependencies = [\n    \"amplifier-core\",\n]\n\n[project.entry-points.\"amplifier.modules\"]\ntool-mytool = \"amplifier_module_tool_mytool:mount\"\n\n[tool.uv.sources]\namplifier-core = { path = \"..\u002Famplifier-core\", editable = true }\n```\n\n## Module Structure\n\n**Required files:**\n\n```\namplifier-module-tool-mytool\u002F\n├── amplifier_module_tool_mytool\u002F\n│   ├── __init__.py              # mount() + tool class\n│   └── (optional modules)\n├── tests\u002F\n│   └── test_mytool.py\n├── pyproject.toml\n├── Makefile\n└── README.md\n```\n\n## Using Coordinator Infrastructure\n\nThe coordinator provides infrastructure context:\n\n```python\nasync def mount(coordinator: ModuleCoordinator, config: dict[str, Any] | None = None) -> None:\n    # Access infrastructure\n    session_id = coordinator.session_id          # Current session\n    parent_id = coordinator.parent_id            # Parent session (if child)\n    session_config = coordinator.config          # Full session configuration\n    loader = coordinator.loader                  # Dynamic module loading\n\n    # Emit events\n    await coordinator.hooks.emit(\"module:mounted\", {\n        \"module_type\": \"tool\",\n        \"module_name\": \"my-tool\"\n    })\n\n    # Register capabilities (optional)\n    coordinator.register_capability(\"my-tool.version\", \"1.0.0\")\n\n    # Register cleanup (optional)\n    async def cleanup():\n        logger.info(\"Cleaning up MyTool\")\n    coordinator.register_cleanup(cleanup)\n```\n\n## Testing Modules\n\n**Use TestCoordinator:**\n\n```python\nimport pytest\nfrom amplifier_core.testing import TestCoordinator\nfrom amplifier_module_tool_mytool import mount\n\n@pytest.mark.asyncio\nasync def test_tool_execution():\n    coordinator = TestCoordinator()\n\n    # Mount module\n    await mount(coordinator, {\"timeout\": 10})\n\n    # Get tool\n    tool = coordinator.get(\"tools\", \"my-tool\")\n    assert tool is not None\n\n    # Execute\n    result = await tool.execute({\"param\": \"test\"})\n    assert result.success\n    assert \"Processed: test\" in result.output[\"result\"]\n```\n\n## Common Patterns\n\n### Configuration Handling\n\n```python\nclass MyTool:\n    def __init__(self: \"MyTool\", config: dict[str, Any]) -> None:\n        # Required config\n        self.required = config.get(\"required_param\")\n        if not self.required:\n            raise ValueError(\"required_param must be provided\")\n\n        # Optional config with defaults\n        self.timeout = config.get(\"timeout\", 30)\n        self.retries = config.get(\"retries\", 3)\n```\n\n### Event Emission\n\n```python\nasync def execute(self: \"MyTool\", input: dict[str, Any]) -> ToolResult:\n    # Events emitted by orchestrator via hooks, not by tools directly\n    # Tools just return results\n    result = await self._process(input)\n    return ToolResult(success=True, output=result)\n```\n\n### Error Patterns\n\n```python\n# Return error, don't raise\nreturn ToolResult(\n    success=False,\n    error={\"message\": \"Clear error message\", \"code\": \"ERROR_CODE\"}\n)\n\n# Log for debugging\nlogger.error(f\"Failed to process {input}: {e}\")\nreturn ToolResult(success=False, error={\"message\": str(e)})\n```\n\n## Remember\n\n- **One responsibility per module** - Don't create mega-modules\n- **Config via mount()** - No hard-coded defaults in modules\n- **Async everywhere** - All I\u002FO must be async\n- **Protocols not inheritance** - Implement interface, don't inherit\n- **Test at protocol level** - Test behavior, not internals\n","# Module Development Guide\n\n## Creating a New Module\n\n### Step 1: Choose Protocol\n\nDetermine which protocol your module implements:\n\n- **Tool**: Agent capability (filesystem, bash, web, database)\n- **Provider**: LLM backend (Anthropic, OpenAI, Ollama)\n- **Context**: Conversation state management (simple, persistent)\n- **Orchestrator**: Execution loop strategy (basic, streaming, events)\n- **Hook**: Lifecycle observer (logging, approval, redaction)\n\n### Step 2: Implement Protocol\n\n```python\nfrom typing import Any\nfrom amplifier_core import ModuleCoordinator, ToolResult\n\nclass MyTool:\n    \"\"\"Tool for doing something useful.\"\"\"\n\n    name = \"my-tool\"\n    description = \"Does something useful\"\n\n    def __init__(self: \"MyTool\", config: dict[str, Any]) -> None:\n        \"\"\"Initialize tool with configuration.\"\"\"\n        self.config = config\n        self.timeout = config.get(\"timeout\", 30)\n\n    @property\n    def input_schema(self: \"MyTool\") -> dict:\n        \"\"\"Return JSON schema for tool parameters.\"\"\"\n        return {\n            \"type\": \"object\",\n            \"properties\": {\n                \"param\": {\"type\": \"string\", \"description\": \"Parameter description\"}\n            },\n            \"required\": [\"param\"]\n        }\n\n    async def execute(self: \"MyTool\", input: dict[str, Any]) -> ToolResult:\n        \"\"\"Execute tool operation.\"\"\"\n        param = input.get(\"param\")\n        if not param:\n            return ToolResult(\n                success=False,\n                error={\"message\": \"param is required\"}\n            )\n\n        # Implementation here\n        result = f\"Processed: {param}\"\n\n        return ToolResult(\n            success=True,\n            output={\"result\": result}\n        )\n```\n\n### Step 3: Create Mount Function\n\n```python\nasync def mount(coordinator: ModuleCoordinator, config: dict[str, Any] | None = None) -> None:\n    \"\"\"\n    Mount the tool module.\n\n    Args:\n        coordinator: Module coordinator providing infrastructure\n        config: Module configuration from profile\n\n    Returns:\n        Optional cleanup function\n    \"\"\"\n    config = config or {}\n    tool = MyTool(config)\n    await coordinator.mount(\"tools\", tool, name=tool.name)\n    logger.info(\"Mounted MyTool\")\n    return\n```\n\n### Step 4: Register Entry Point\n\n```toml\n# pyproject.toml\n[project]\nname = \"amplifier-module-tool-mytool\"\nversion = \"0.1.0\"\nrequires-python = \">=3.11\"\ndependencies = [\n    \"amplifier-core\",\n]\n\n[project.entry-points.\"amplifier.modules\"]\ntool-mytool = \"amplifier_module_tool_mytool:mount\"\n\n[tool.uv.sources]\namplifier-core = { path = \"..\u002Famplifier-core\", editable = true }\n```\n\n## Module Structure\n\n**Required files:**\n\n```\namplifier-module-tool-mytool\u002F\n├── amplifier_module_tool_mytool\u002F\n│   ├── __init__.py              # mount() + tool class\n│   └── (optional modules)\n├── tests\u002F\n│   └── test_mytool.py\n├── pyproject.toml\n├── Makefile\n└── README.md\n```\n\n## Using Coordinator Infrastructure\n\nThe coordinator provides infrastructure context:\n\n```python\nasync def mount(coordinator: ModuleCoordinator, config: dict[str, Any] | None = None) -> None:\n    # Access infrastructure\n    session_id = coordinator.session_id          # Current session\n    parent_id = coordinator.parent_id            # Parent session (if child)\n    session_config = coordinator.config          # Full session configuration\n    loader = coordinator.loader                  # Dynamic module loading\n\n    # Emit events\n    await coordinator.hooks.emit(\"module:mounted\", {\n        \"module_type\": \"tool\",\n        \"module_name\": \"my-tool\"\n    })\n\n    # Register capabilities (optional)\n    coordinator.register_capability(\"my-tool.version\", \"1.0.0\")\n\n    # Register cleanup (optional)\n    async def cleanup():\n        logger.info(\"Cleaning up MyTool\")\n    coordinator.register_cleanup(cleanup)\n```\n\n## Testing Modules\n\n**Use TestCoordinator:**\n\n```python\nimport pytest\nfrom amplifier_core.testing import TestCoordinator\nfrom amplifier_module_tool_mytool import mount\n\n@pytest.mark.asyncio\nasync def test_tool_execution():\n    coordinator = TestCoordinator()\n\n    # Mount module\n    await mount(coordinator, {\"timeout\": 10})\n\n    # Get tool\n    tool = coordinator.get(\"tools\", \"my-tool\")\n    assert tool is not None\n\n    # Execute\n    result = await tool.execute({\"param\": \"test\"})\n    assert result.success\n    assert \"Processed: test\" in result.output[\"result\"]\n```\n\n## Common Patterns\n\n### Configuration Handling\n\n```python\nclass MyTool:\n    def __init__(self: \"MyTool\", config: dict[str, Any]) -> None:\n        # Required config\n        self.required = config.get(\"required_param\")\n        if not self.required:\n            raise ValueError(\"required_param must be provided\")\n\n        # Optional config with defaults\n        self.timeout = config.get(\"timeout\", 30)\n        self.retries = config.get(\"retries\", 3)\n```\n\n### Event Emission\n\n```python\nasync def execute(self: \"MyTool\", input: dict[str, Any]) -> ToolResult:\n    # Events emitted by orchestrator via hooks, not by tools directly\n    # Tools just return results\n    result = await self._process(input)\n    return ToolResult(success=True, output=result)\n```\n\n### Error Patterns\n\n```python\n# Return error, don't raise\nreturn ToolResult(\n    success=False,\n    error={\"message\": \"Clear error message\", \"code\": \"ERROR_CODE\"}\n)\n\n# Log for debugging\nlogger.error(f\"Failed to process {input}: {e}\")\nreturn ToolResult(success=False, error={\"message\": str(e)})\n```\n\n## Remember\n\n- **One responsibility per module** - Don't create mega-modules\n- **Config via mount()** - No hard-coded defaults in modules\n- **Async everywhere** - All I\u002FO must be async\n- **Protocols not inheritance** - Implement interface, don't inherit\n- **Test at protocol level** - Test behavior, not internals\n",{"name":5,"license":15,"version":32,"metadata":33,"description":7},"1.0.0",{"category":34,"complexity":35},"development","medium","main","2f58408a879535df36da5c92d2b073f49271ade4","modules\u002Ftool-skills\u002Ftests\u002Ffixtures\u002Fskills\u002Fmodule-development",11,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-12 16:43:43",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add microsoft\u002Famplifier-bundle-skills --skill module-development",{"tool":51,"command":52},"bunx","bunx skills add microsoft\u002Famplifier-bundle-skills --skill module-development",{"tool":54,"command":55},"pnpm","pnpm dlx skills add microsoft\u002Famplifier-bundle-skills --skill module-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fmodules\u002Ftool-skills\u002Ftests\u002Ffixtures\u002Fskills\u002Fmodule-development\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"checklists\u002Fwcag-checklist.md","REFERENCE","参考文档",16342,"https:\u002F\u002Fgithub.com\u002Fshengdabai\u002FTony-Claude-Code-Skills\u002Fblob\u002Fmain\u002Fskills\u002F_collections\u002Frsmdt-the-startup\u002Fplugins\u002Fteam\u002Fskills\u002Fdesign\u002Faccessibility-design\u002Fchecklists\u002Fwcag-checklist.md",[66,75,86,99,110,122],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":27},"01M69B282M59QZNMM26JXA1QCV","verification-discipline","Use when verifying that completed work actually works. Auto-surface during \u002Fverify mode, post-implementation review, or before claiming a task is done. Teaches testing outcomes vs implementation, the unit\u002Fintegration\u002Fsmoke gradient, and what \"done\" actually means.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Fverification-discipline\u002FSKILL.md",[],[73,74,25],"verification discipline","review",{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":27},"01M69B263M6BFCVAV3SEESV7T0","user-advocate","User-need reviewer that speaks for the person who isn't in the room — the one who will actually live with what gets built. Hunts the gap between \"we can build this\" and \"they actually want this,\" in the patient, impatient voice of the absent user. Use at any checkpoint — brainstorm, design, plan, implement, debug, review — when a feature is being built because it's buildable rather than wanted, the recovery path is missing, or nobody can name the person this serves: \"do they actually want this, and can they live with it?\"","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Fuser-advocate\u002FSKILL.md",[],[82,83,84,74,85],"user advocate","debug","implement","design",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":97,"publishedAt":27},"01M69B23EQQM30TMZG7FPJW4F7","tester-breaker","Adversarial breaker that reviews code by trying to make it fail, not by confirming it works. Hunts the unhappy paths — malformed input, the empty string, the reversed range, the race condition — as a gleeful adversary who assumes everything is broken until a concrete attempt to break it comes up empty. Use at any checkpoint — brainstorm, design, plan, implement, debug, review — when the happy path is celebrated while the edges sit unexamined, \"looks fine\" stands in for \"I tried to break it and couldn't,\" or nobody has named the input that makes this fall over: \"how does this fail, and where are the edges?\"","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Ftester-breaker\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[98,74,83,84,85],"tester breaker",{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":27},"01M69B21AHBXP6EK60XYDP24PY","skills-assist","Authoritative consultant for all skills-related questions. Use when creating or modifying skills, understanding the Agent Skills spec, troubleshooting skill loading or invocation issues, leveraging enhanced format features (context fork, model_role, user-invocable), writing cross-harness portable skills, ensuring Claude Code Skills 2.0 compatibility, or deciding between skills vs agents.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskills-assist\u002FSKILL.md",[],[106,107,108,109],"skills assist","claude code skills","spec","writing",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":119,"publishedAt":27},"01M69B1ZBHGE1PAX0E7ZDS8HQZ","skillify","Capture a repeatable process from the current session into a reusable Amplifier SKILL.md skill file. Use when the user wants to create a skill, save a workflow as a skill, turn a process into a reusable skill, or mentions \"skillify\", \"create skill\", \"make a skill\", \"save as skill\", \"capture workflow\", \"turn this into a skill\", \"new skill\", or wants to automate a repeatable process they just performed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Fskillify\u002FSKILL.md",[116],{"categoryNo":117,"categoryName":118,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[112,120,121],"create skill","workflow",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":129,"publishedAt":27},"01M69B1XCPQFAXS9RTS87CZ8EK","session-debug","Diagnose issues in the current Amplifier session — misconfigured tools, failing operations, unexpected behavior. Use when something isn't working right.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Famplifier-bundle-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsession-debug\u002FSKILL.md",[128],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},[130,83,131],"session debug","diagnose"]