Skip to content

Commit c5714a6

Browse files
authored
Merge branch 'main' into add-search-ai-recommendations-skill
2 parents b92038d + 09e4b74 commit c5714a6

File tree

86 files changed

+11735
-44
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+11735
-44
lines changed

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"name": "mongodb",
1111
"source": "./",
12-
"description": "Official MongoDB plugin for Claude offering skills for database management and optimization, as well as the MongoDB MCP server"
12+
"description": "Official Claude plugin for MongoDB (MCP Server + Skills). Connect to databases, explore data, manage collections, optimize queries, generate reliable code, implement best practices, develop advanced features, and more."
1313
}
1414
]
1515
}

.claude-plugin/plugin.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mongodb",
3-
"version": "0.1.0",
4-
"description": "Official MongoDB plugin for Claude offering skills for database management and optimization, as well as the MongoDB MCP server",
3+
"version": "1.0.0",
4+
"description": "Official Claude plugin for MongoDB (MCP Server + Skills). Connect to databases, explore data, manage collections, optimize queries, generate reliable code, implement best practices, develop advanced features, and more.",
55
"author": {
66
"name": "MongoDB",
77
"email": "agent-plugins@mongodb.com",
@@ -13,8 +13,8 @@
1313
"keywords": [
1414
"mongodb",
1515
"database",
16-
"skills",
17-
"agent"
16+
"mcp",
17+
"vector-search"
1818
],
1919
"skills": "./skills/",
2020
"mcpServers": "./mcp.json"

.cursor-plugin/plugin.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
{
22
"name": "mongodb",
3-
"version": "0.1.0",
4-
"description": "Official MongoDB plugin for Cursor offering skills for database management and optimization, as well as the MongoDB MCP server",
3+
"version": "1.0.0",
4+
"description": "Official Cursor plugin for MongoDB (MCP Server + Skills). Connect to databases, explore data, manage collections, optimize queries, generate reliable code, implement best practices, develop advanced features, and more.",
55
"author": {
66
"name": "MongoDB",
77
"email": "agent-plugins@mongodb.com",
88
"url": "https://www.mongodb.com"
99
},
10-
"homepage": "https://www.mongodb.com/docs/mcp-server/overview/",
10+
"homepage": "https://www.mongodb.com/docs/cursor/",
1111
"repository": "https://github.com/mongodb/agent-skills",
1212
"license": "Apache-2.0",
1313
"keywords": [
1414
"mongodb",
1515
"database",
16-
"skills",
17-
"agent"
16+
"mcp",
17+
"vector-search"
1818
],
1919
"skills": "./skills/",
2020
"mcpServers": "./mcp.json",

.github/CODEOWNERS

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
# CODEOWNERS file for agent-skills repository
22
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
33

4+
* @mongodb/dbx-devtools @mongodb/apix-devtools @mongodb/devdocs
5+
46
# GitHub configuration and workflows
5-
/.github/ @mongodb/devdocs
7+
/.github/ @mongodb/dbx-devtools @mongodb/apix-devtools @mongodb/devdocs
8+
9+
# Plugin packaging infrastructure
10+
/.claude-plugin/ @mongodb/dbx-devtools @mongodb/apix-devtools
11+
/.cursor-plugin/ @mongodb/dbx-devtools @mongodb/apix-devtools
12+
/mcp.json @mongodb/dbx-devtools @mongodb/apix-devtools
13+
/assets/ @mongodb/dbx-devtools
14+
15+
# Review tooling
16+
/tools/review-skill/ @mongodb/devdocs
17+
18+
# Skill content
19+
/skills/ @mongodb/devdocs
620

.github/scripts/validate-skills.sh

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,22 @@
11
#!/bin/bash
2-
# Validates all skill directories changed in a pull request.
2+
# Validates skill directories changed in a pull request.
3+
#
4+
# This script handles only the changed-skill check. A separate workflow step
5+
# validates all skills (see .github/workflows/validate-skills.yml).
6+
#
7+
# NOTE: The validator flags used here (e.g. --strict) should stay aligned with
8+
# tools/validate-skills.sh (the local version). If you change which checks are
9+
# run or how strictly they're enforced, update both scripts. The scripts otherwise
10+
# differ by design:
11+
# - CI script: diffs changed skills, uses --emit-annotations and -o markdown
12+
# - Local script: accepts an optional path or validates all skills, uses default
13+
# terminal output
314
#
415
# Usage: validate-skills.sh <base-ref>
516
# base-ref The base branch name to diff against (e.g. "main").
6-
# When omitted or when the remote is unavailable, all skills are validated.
717
#
818
# Exit codes:
9-
# 0 All validated skills passed.
19+
# 0 All validated skills passed (or no changed skills found).
1020
# 1 One or more skills failed validation.
1121

1222
# -e is intentionally omitted: all error paths are handled explicitly,
@@ -15,27 +25,28 @@ set -uo pipefail
1525

1626
BASE_REF="${1:-}"
1727

28+
if [ -z "$BASE_REF" ]; then
29+
echo "Usage: validate-skills.sh <base-ref>"
30+
exit 1
31+
fi
32+
1833
# Find unique skill directories containing files changed in this PR.
1934
# The three-dot diff requires fetch-depth: 0 and a properly configured remote,
20-
# which is always the case on GitHub Actions but may not be in local act runs.
21-
changed_skills=()
22-
if [ -n "$BASE_REF" ]; then
23-
mapfile -t changed_skills < <(git diff --name-only "origin/${BASE_REF}...HEAD" -- skills/ \
24-
2>/dev/null \
25-
| cut -d'/' -f2 \
26-
| sort -u \
27-
| grep -v '^$')
28-
fi
35+
# which is always the case on GitHub Actions.
36+
diff_output="$(git diff --name-only "origin/${BASE_REF}...HEAD" -- skills/)" || {
37+
echo "Error: git diff against origin/${BASE_REF} failed."
38+
echo "Ensure the base branch has been fetched (fetch-depth: 0 in the workflow)."
39+
exit 1
40+
}
2941

30-
if [ "${#changed_skills[@]}" -eq 0 ]; then
31-
# Fallback: validate all skill directories (e.g. when git remote is unavailable
32-
# in local act testing, or when a PR only deletes files with no remaining dirs).
33-
echo "Could not determine changed skills from git diff; validating all skills."
34-
mapfile -t changed_skills < <(find skills -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | sort -u)
35-
fi
42+
changed_skills=()
43+
mapfile -t changed_skills < <(echo "$diff_output" \
44+
| cut -d'/' -f2 \
45+
| sort -u \
46+
| grep -v '^$')
3647

3748
if [ "${#changed_skills[@]}" -eq 0 ]; then
38-
echo "No skill directories found, skipping validation."
49+
echo "No changed skill directories found, skipping validation."
3950
exit 0
4051
fi
4152

@@ -53,8 +64,8 @@ for skill in "${changed_skills[@]}"; do
5364
# We use process substitution to:
5465
# 1. Send all output (including ::error commands) to stdout for GitHub Actions
5566
# 2. Filter out ::error/::warning/::notice lines before writing to the summary
56-
skill-validator check --strict --emit-annotations -o markdown "skills/$skill/" \
57-
| tee >(grep -v '^::' >> "${GITHUB_STEP_SUMMARY:-/dev/null}") || FAILED=1
67+
skill-validator-ent check --strict --emit-annotations -o markdown "skills/$skill/" \
68+
> >(tee >(grep -v '^::' >> "${GITHUB_STEP_SUMMARY:-/dev/null}")) 2>&1 || FAILED=1
5869
done
5970

6071
if [ $FAILED -ne 0 ]; then

.github/workflows/codeql.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: CodeQL (GitHub Actions)
2+
3+
on:
4+
pull_request:
5+
workflow_dispatch:
6+
7+
permissions:
8+
actions: read
9+
contents: read
10+
security-events: write
11+
12+
jobs:
13+
analyze-actions:
14+
name: Analyze workflows
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v6
19+
20+
- name: Initialize CodeQL
21+
uses: github/codeql-action/init@v4
22+
with:
23+
languages: actions
24+
25+
- name: Perform CodeQL analysis
26+
uses: github/codeql-action/analyze@v4
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Draft Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- ".cursor-plugin/plugin.json"
9+
- ".claude-plugin/plugin.json"
10+
- "gemini-extension.json"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
draft-release:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Check out repository with tags
21+
uses: actions/checkout@v6
22+
23+
- name: Read and validate plugin versions
24+
id: version
25+
shell: bash
26+
run: |
27+
set -euo pipefail
28+
29+
release_version="$(jq -r '.version' .cursor-plugin/plugin.json)"
30+
claude_version="$(jq -r '.version' .claude-plugin/plugin.json)"
31+
gemini_version="$(jq -r '.version' gemini-extension.json)"
32+
33+
if [[ "$release_version" != "$claude_version" || "$release_version" != "$gemini_version" ]]; then
34+
echo "Plugin version mismatch detected; refusing to create release." >&2
35+
exit 1
36+
fi
37+
38+
echo "release_tag=v$release_version" >> "$GITHUB_OUTPUT"
39+
40+
- name: Skip when release already exists
41+
id: exists
42+
env:
43+
GH_TOKEN: ${{ github.token }}
44+
shell: bash
45+
run: |
46+
set -euo pipefail
47+
48+
if gh release view "${{ steps.version.outputs.release_tag }}" >/dev/null 2>&1; then
49+
echo "exists=true" >> "$GITHUB_OUTPUT"
50+
else
51+
echo "exists=false" >> "$GITHUB_OUTPUT"
52+
fi
53+
54+
- name: Create draft release with generated notes
55+
if: ${{ steps.exists.outputs.exists == 'false' }}
56+
env:
57+
GH_TOKEN: ${{ github.token }}
58+
shell: bash
59+
run: |
60+
set -euo pipefail
61+
62+
gh release create "${{ steps.version.outputs.release_tag }}" \
63+
--title "${{ steps.version.outputs.release_tag }}" \
64+
--target "$GITHUB_SHA" \
65+
--draft \
66+
--generate-notes
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Prepare Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version_source:
7+
description: "How to determine the next version"
8+
required: true
9+
default: patch
10+
type: choice
11+
options:
12+
- major
13+
- minor
14+
- patch
15+
- exact
16+
exact_version:
17+
description: "Exact version (required when version_source=exact), e.g. 1.2.3"
18+
required: false
19+
type: string
20+
21+
permissions:
22+
contents: write
23+
pull-requests: write
24+
25+
jobs:
26+
prepare-release-pr:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Check out repository
30+
uses: actions/checkout@v6
31+
32+
- name: Set up Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: "20"
36+
37+
- name: Compute target version
38+
id: version
39+
shell: bash
40+
env:
41+
VERSION_SOURCE: ${{ inputs.version_source }}
42+
EXACT_VERSION: ${{ inputs.exact_version }}
43+
run: |
44+
set -euo pipefail
45+
46+
current_version="$(jq -r '.version' .cursor-plugin/plugin.json)"
47+
claude_version="$(jq -r '.version' .claude-plugin/plugin.json)"
48+
gemini_version="$(jq -r '.version' gemini-extension.json)"
49+
50+
if [[ "$current_version" != "$claude_version" || "$current_version" != "$gemini_version" ]]; then
51+
echo "Plugin version mismatch detected:" >&2
52+
echo " .cursor-plugin/plugin.json: $current_version" >&2
53+
echo " .claude-plugin/plugin.json: $claude_version" >&2
54+
echo " gemini-extension.json: $gemini_version" >&2
55+
exit 1
56+
fi
57+
58+
if [[ "$VERSION_SOURCE" == "exact" ]]; then
59+
if [[ -z "${EXACT_VERSION:-}" ]]; then
60+
echo "Input exact_version is required when version_source=exact." >&2
61+
exit 1
62+
fi
63+
64+
target_version="$(npx --yes semver "$EXACT_VERSION")"
65+
else
66+
target_version="$(npx --yes semver "$current_version" -i "$VERSION_SOURCE")"
67+
fi
68+
69+
if [[ "$target_version" == "$current_version" ]]; then
70+
echo "Target version matches current version ($current_version); nothing to release." >&2
71+
exit 1
72+
fi
73+
74+
echo "current_version=$current_version" >> "$GITHUB_OUTPUT"
75+
echo "target_version=$target_version" >> "$GITHUB_OUTPUT"
76+
echo "branch_name=release/v$target_version" >> "$GITHUB_OUTPUT"
77+
78+
- name: Update plugin versions
79+
shell: bash
80+
run: |
81+
set -euo pipefail
82+
83+
tmp_file="$(mktemp)"
84+
jq '.version = "${{ steps.version.outputs.target_version }}"' .cursor-plugin/plugin.json > "$tmp_file"
85+
mv "$tmp_file" .cursor-plugin/plugin.json
86+
87+
tmp_file="$(mktemp)"
88+
jq '.version = "${{ steps.version.outputs.target_version }}"' .claude-plugin/plugin.json > "$tmp_file"
89+
mv "$tmp_file" .claude-plugin/plugin.json
90+
91+
tmp_file="$(mktemp)"
92+
jq '.version = "${{ steps.version.outputs.target_version }}"' gemini-extension.json > "$tmp_file"
93+
mv "$tmp_file" gemini-extension.json
94+
95+
- name: Create release pull request
96+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # 8.1.0
97+
with:
98+
base: main
99+
branch: ${{ steps.version.outputs.branch_name }}
100+
title: "chore: prepare release v${{ steps.version.outputs.target_version }}"
101+
commit-message: "chore: bump plugin versions to v${{ steps.version.outputs.target_version }}"
102+
body: |
103+
## Summary
104+
- Bump plugin version from `${{ steps.version.outputs.current_version }}` to `${{ steps.version.outputs.target_version }}`
105+
106+
## Next step
107+
- Merge this PR to trigger draft release creation.

.github/workflows/validate-skills.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,18 @@ jobs:
2020
go-version: stable
2121
cache: false
2222

23-
- name: Install skill-validator
24-
run: go install github.com/agent-ecosystem/skill-validator/cmd/skill-validator@latest
23+
- name: Install skill-validator-ent
24+
run: go install github.com/agent-ecosystem/skill-validator-ent/cmd/skill-validator-ent@latest
2525

2626
- name: Validate changed skills
27-
run: bash .github/scripts/validate-skills.sh "${{ github.base_ref }}"
27+
env:
28+
BASE_REF: ${{ github.base_ref }}
29+
run: |
30+
echo "## Changed Skills" >> "$GITHUB_STEP_SUMMARY"
31+
bash .github/scripts/validate-skills.sh "$BASE_REF"
32+
33+
- name: Validate all skills
34+
run: |
35+
echo "## All Skills" >> "$GITHUB_STEP_SUMMARY"
36+
skill-validator-ent check --strict --emit-annotations -o markdown skills/ \
37+
2>&1 | tee >(grep -v '^::' >> "$GITHUB_STEP_SUMMARY")

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
1-
.score_cache/
1+
# Skill evaluation/benchmark workspaces
2+
*-workspace/
3+
4+
# User-specific Claude settings
5+
.claude/settings.local.json
6+
.score_cache/

0 commit comments

Comments
 (0)