Skip to content

Commit 0a16915

Browse files
TianqiZhangCopilot
andauthored
Add claude plugin marketplace and plugin configuration files (#96)
* Revise README for improved clarity and features Updated README to enhance clarity and promote features. * resolve Double period Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Add Microsoft Code Reference and Microsoft Docs skills to enhance AI agent capabilities * Add compatibility information for Microsoft Code Reference and Microsoft Docs skills * Revise quick setup instructions for clarity and organization * Refine description and usage instructions in Microsoft Code Reference skill * Clarify usage instructions and enhance error troubleshooting in Microsoft Code Reference skill * Add marketplace and plugin configuration files, and enhance documentation skills * Add validation workflow and script for repository structure * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 64d0a9d commit 0a16915

8 files changed

Lines changed: 197 additions & 16 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "microsoft-docs-marketplace",
3+
"owner": {
4+
"name": "Microsoft"
5+
},
6+
"plugins": [
7+
{
8+
"name": "microsoft-docs",
9+
"source": "./",
10+
"description": "Access official Microsoft documentation, API references, and code samples for Azure, .NET, Windows, and more."
11+
}
12+
]
13+
}

.claude-plugin/plugin.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "microsoft-docs",
3+
"description": "Access official Microsoft documentation, API references, and code samples for Azure, .NET, Windows, and more.",
4+
"version": "0.1.0",
5+
"author": {
6+
"name": "Microsoft"
7+
},
8+
"homepage": "https://learn.microsoft.com",
9+
"repository": "https://github.com/microsoftdocs/mcp",
10+
"keywords": ["microsoft", "docs", "azure", ".net", "windows", "api", "documentation", "rag", "dynamics", "powerbi", "office"]
11+
}

.github/workflows/validate.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Validate Repository Structure
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
validate:
11+
name: Validate Claude Plugin & Skills
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Run validation script
19+
shell: pwsh
20+
run: ./scripts/validate-repo.ps1

.mcp.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"mcpServers": {
3+
"microsoft-learn": {
4+
"type": "http",
5+
"url": "https://learn.microsoft.com/api/mcp"
6+
}
7+
}
8+
}

README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,7 @@ https://learn.microsoft.com/api/mcp
7373
}
7474
```
7575

76-
**OpenAI-compatible config** [providing search and fetch interface](https://platform.openai.com/docs/mcp):
77-
```json
78-
{
79-
"servers": {
80-
"microsoft-learn-openai-compatible": {
81-
"type": "http",
82-
"url": "https://learn.microsoft.com/api/mcp/openai-compatible"
83-
}
84-
}
85-
}
86-
```
76+
**OpenAI-compatible endpoint** [supports OpenAI Deep Research models](https://platform.openai.com/docs/mcp): use `https://learn.microsoft.com/api/mcp/openai-compatible`.
8777

8878
## 🛠️ Currently Supported Tools
8979

@@ -99,15 +89,21 @@ https://learn.microsoft.com/api/mcp
9989

10090
| Skill | Purpose | Best For |
10191
|-------|---------|----------|
102-
| [`microsoft-docs`](.github/skills/microsoft-docs/SKILL.md) | Understanding concepts, tutorials, architecture, limits | "How does X work?", learning, configuration guides |
103-
| [`microsoft-code-reference`](.github/skills/microsoft-code-reference/SKILL.md) | API lookups, code samples, verification, error fixing | Implementing code, finding correct methods, troubleshooting |
92+
| [`microsoft-docs`](skills/microsoft-docs/SKILL.md) | Understanding concepts, tutorials, architecture, limits | "How does X work?", learning, configuration guides |
93+
| [`microsoft-code-reference`](skills/microsoft-code-reference/SKILL.md) | API lookups, code samples, verification, error fixing | Implementing code, finding correct methods, troubleshooting |
10494

10595
### Quick Setup
10696

97+
If you use `claude-code`:
98+
```bash
99+
/plugin marketplace add microsoftdocs/mcp
100+
/plugin install microsoft-docs@microsoft-docs-marketplace
101+
```
102+
Otherwise:
107103
1. **Install the MCP Server first** — See [Installation](#-installation--getting-started) below
108-
2. **Copy the skill folders** to your project's `.github/skills/` directory:
109-
- [`microsoft-docs`](.github/skills/microsoft-docs/) — for concepts, tutorials, and factual lookups
110-
- [`microsoft-code-reference`](.github/skills/microsoft-code-reference/) — for API lookups, code samples, and troubleshooting
104+
2. **Copy the skill folders** to your project's `.github/skills/` or `.claude/skills/` directory:
105+
- [`microsoft-docs`](skills/microsoft-docs/) — for concepts, tutorials, and factual lookups
106+
- [`microsoft-code-reference`](skills/microsoft-code-reference/) — for API lookups, code samples, and troubleshooting
111107

112108
### Supported Agents
113109

scripts/validate-repo.ps1

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
#!/usr/bin/env pwsh
2+
<#
3+
.SYNOPSIS
4+
Validates the repository structure for Claude Plugin and Agent Skills.
5+
6+
.DESCRIPTION
7+
This script validates that all required files and folders exist for:
8+
9+
1. Claude Plugin (.claude-plugin/)
10+
- marketplace.json : Plugin metadata for Claude marketplace
11+
- plugin.json : Plugin configuration and capabilities
12+
13+
2. Agent Skills (skills/)
14+
- Each subfolder must contain a SKILL.md file describing the skill
15+
- Skills help AI agents use MCP tools more effectively
16+
17+
3. MCP Configuration (.mcp.json)
18+
- Root-level MCP server configuration
19+
20+
Run this script to verify your changes before submitting a PR.
21+
22+
.EXAMPLE
23+
./scripts/validate-repo.ps1
24+
#>
25+
26+
$ErrorActionPreference = "Stop"
27+
$script:hasErrors = $false
28+
$repoRoot = Split-Path -Parent $PSScriptRoot
29+
30+
function Write-ValidationError($message) {
31+
Write-Host "❌ ERROR: $message" -ForegroundColor Red
32+
$script:hasErrors = $true
33+
}
34+
35+
function Write-ValidationSuccess($message) {
36+
Write-Host "$message" -ForegroundColor Green
37+
}
38+
39+
function Write-ValidationHeader($message) {
40+
Write-Host "`n📋 $message" -ForegroundColor Cyan
41+
Write-Host ("-" * 50) -ForegroundColor Gray
42+
}
43+
44+
function Test-ValidJson($path) {
45+
try {
46+
$null = Get-Content $path -Raw | ConvertFrom-Json
47+
return $true
48+
} catch {
49+
return $false
50+
}
51+
}
52+
53+
# ============================================================================
54+
# Validation 1: Claude Plugin Files
55+
# The .claude-plugin folder contains configuration for Claude marketplace
56+
# ============================================================================
57+
Write-ValidationHeader "Validating Claude Plugin (.claude-plugin/)"
58+
59+
$claudePluginFiles = @(
60+
"marketplace.json", # Plugin metadata (name, description, author, etc.)
61+
"plugin.json" # Plugin capabilities and MCP server reference
62+
)
63+
64+
foreach ($file in $claudePluginFiles) {
65+
$path = Join-Path $repoRoot ".claude-plugin" $file
66+
if (Test-Path $path) {
67+
Write-ValidationSuccess "Found: .claude-plugin/$file"
68+
if (Test-ValidJson $path) {
69+
Write-ValidationSuccess "Valid JSON: .claude-plugin/$file"
70+
} else {
71+
Write-ValidationError "Invalid JSON: .claude-plugin/$file"
72+
}
73+
} else {
74+
Write-ValidationError "Missing: .claude-plugin/$file"
75+
}
76+
}
77+
78+
# ============================================================================
79+
# Validation 2: Agent Skills Structure
80+
# Each skill folder under /skills must have a SKILL.md describing the skill
81+
# ============================================================================
82+
Write-ValidationHeader "Validating Agent Skills (skills/)"
83+
84+
$skillsDir = Join-Path $repoRoot "skills"
85+
86+
if (-not (Test-Path $skillsDir)) {
87+
Write-ValidationError "Missing: skills/ directory"
88+
} else {
89+
$skillFolders = Get-ChildItem -Path $skillsDir -Directory
90+
91+
if ($skillFolders.Count -eq 0) {
92+
Write-ValidationError "No skill folders found in skills/"
93+
} else {
94+
foreach ($folder in $skillFolders) {
95+
$skillMd = Join-Path $folder.FullName "SKILL.md"
96+
if (Test-Path $skillMd) {
97+
Write-ValidationSuccess "Found: skills/$($folder.Name)/SKILL.md"
98+
} else {
99+
Write-ValidationError "Missing: skills/$($folder.Name)/SKILL.md - Each skill folder must have a SKILL.md file"
100+
}
101+
}
102+
}
103+
}
104+
105+
# ============================================================================
106+
# Validation 3: MCP Configuration
107+
# The .mcp.json file at repo root defines MCP server settings
108+
# ============================================================================
109+
Write-ValidationHeader "Validating MCP Configuration (.mcp.json)"
110+
111+
$mcpJsonPath = Join-Path $repoRoot ".mcp.json"
112+
if (Test-Path $mcpJsonPath) {
113+
Write-ValidationSuccess "Found: .mcp.json"
114+
if (Test-ValidJson $mcpJsonPath) {
115+
Write-ValidationSuccess "Valid JSON: .mcp.json"
116+
} else {
117+
Write-ValidationError "Invalid JSON: .mcp.json"
118+
}
119+
} else {
120+
Write-ValidationError "Missing: .mcp.json at repository root"
121+
}
122+
123+
# ============================================================================
124+
# Summary
125+
# ============================================================================
126+
Write-Host "`n" ("-" * 50) -ForegroundColor Gray
127+
if ($script:hasErrors) {
128+
Write-Host "❌ Validation FAILED - Please fix the errors above" -ForegroundColor Red
129+
exit 1
130+
} else {
131+
Write-Host "✅ All validations PASSED" -ForegroundColor Green
132+
exit 0
133+
}
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)