Context7 Platform -- Up-to-date docs for AI agents
fix(cursor-plugin): point the rule and README at the skill that ships (#3364)
Ramazan Onur Acarccb0745e6cb2
diff --git a/packages/cli/src/__tests__/plugin-manifests.test.ts b/packages/cli/src/__tests__/plugin-manifests.test.tsindex cdbeb15f..f72740b0 100644--- a/packages/cli/src/__tests__/plugin-manifests.test.ts+++ b/packages/cli/src/__tests__/plugin-manifests.test.ts@@ -1,5 +1,5 @@import { describe, test, expect } from "vitest";-import { readFile } from "fs/promises";+import { access, readdir, readFile } from "fs/promises";import { join } from "path";const REPO_ROOT = join(import.meta.dirname, "..", "..", "..", "..");@@ -26,4 +26,29 @@ describe("plugin MCP manifests", () => {Authorization: "${CONTEXT7_API_KEY:-}",});});++ test("Cursor plugin names a skill it actually ships", async () => {+ const relPath = "plugins/cursor/context7/rules/use-context7.mdc";+ const rule = await readFile(join(REPO_ROOT, relPath), "utf-8");+ const readme = await readFile(join(REPO_ROOT, "plugins/cursor/context7/README.md"), "utf-8");+ const shipped = (await readdir(join(REPO_ROOT, "plugins/cursor/context7/skills"))).sort();++ // Both files point the reader at a skill by name; a rename that misses one+ // of them leaves a dangling reference the agent cannot resolve.+ for (const [file, content] of [+ [relPath, rule],+ ["plugins/cursor/context7/README.md", readme],+ ] as const) {+ const reference = content.match(/`(context7-[a-z0-9-]+)` skill/)?.[1];+ expect(reference, `${file} should reference a skill by name`).toBeDefined();+ expect(shipped, `${file} references "${reference}"`).toContain(reference);+ }+ });++ test("Cursor plugin's skill directories all contain a SKILL.md", async () => {+ const dir = join(REPO_ROOT, "plugins/cursor/context7/skills");+ for (const entry of await readdir(dir)) {+ await expect(access(join(dir, entry, "SKILL.md"))).resolves.toBeUndefined();+ }+ });});diff --git a/plugins/cursor/context7/README.md b/plugins/cursor/context7/README.mdindex 20dadeda..67efefd7 100644--- a/plugins/cursor/context7/README.md+++ b/plugins/cursor/context7/README.md@@ -8,7 +8,7 @@ This plugin provides:- **MCP Server** — Connects Cursor to Context7's documentation service- **Rules** — An always-on `use-context7` rule that nudges the agent to fetch docs when unsure about library APIs-- **Skills** — A `context7-docs-lookup` skill with detailed instructions on resolving libraries and fetching documentation+- **Skills** — A `context7-mcp` skill with detailed instructions on resolving libraries and fetching documentation- **Agents** — A dedicated `docs-researcher` agent for focused lookups## Available Toolsdiff --git a/plugins/cursor/context7/rules/use-context7.mdc b/plugins/cursor/context7/rules/use-context7.mdcindex b1b88cd7..500c660a 100644--- a/plugins/cursor/context7/rules/use-context7.mdc+++ b/plugins/cursor/context7/rules/use-context7.mdc@@ -15,4 +15,4 @@ You don't need to use Context7 for:- Well-established language features (e.g., JavaScript array methods, Python builtins)- Conversations where the user has already provided the relevant code or docs-See the `context7-docs-lookup` skill for detailed instructions on how to resolve libraries and fetch documentation.+See the `context7-mcp` skill for detailed instructions on how to resolve libraries and fetch documentation.