Skip to content

Commit 2e294f9

Browse files
committed
Add focused Context.dev workflow skills
1 parent dcfad3b commit 2e294f9

13 files changed

Lines changed: 229 additions & 10 deletions

File tree

.cursor-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "context-dev",
33
"displayName": "Context.dev",
4-
"version": "2.0.0",
4+
"version": "2.1.0",
55
"description": "Search, scrape, crawl, extract, parse, monitor, and process the live web with Context.dev.",
66
"author": {
77
"name": "Context.dev",

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,26 @@ Cursor automatically selects the appropriate Context.dev tool. Tool calls requir
3535
| Component | What it provides |
3636
| --- | --- |
3737
| MCP server | The production Context.dev MCP with 34 direct, typed tools and OAuth |
38-
| Skills | Context.dev API guidance, Cursor connection help, and Logo Link integration |
38+
| Skills | Focused MCP workflows, direct API guidance, Cursor connection help, and Logo Link integration |
3939
| Commands | `/brand-colors`, `/scrape-url`, `/search-web`, and `/extract-web-data` |
4040
| Rules | Routes live-web tasks to the right Context.dev tool and keeps credentials out of client code |
4141

42+
### Skill catalog
43+
44+
| Skill | When Cursor uses it |
45+
| --- | --- |
46+
| `context-search` | Live web research and source discovery |
47+
| `context-scrape` | Markdown, HTML, images, or screenshots from one known URL |
48+
| `context-crawl` | Sitemap discovery and focused multi-page crawling |
49+
| `context-extract` | Schema-shaped JSON from websites |
50+
| `context-parse` | PDFs, Office files, images, and other local document bytes |
51+
| `context-brand` | Brand profiles, design systems, fonts, and industry codes |
52+
| `context-monitor` | Recurring website-change detection and history |
53+
| `context-batches` | Large asynchronous scrape and crawl jobs |
54+
| `context-dev` | Building directly with the Context.dev REST API or SDKs |
55+
| `connect-context-dev` | OAuth setup and MCP troubleshooting |
56+
| `logolink` | Safe dynamic company logos in frontend applications |
57+
4258
### MCP tool catalog
4359

4460
| Group | Tools |
@@ -56,7 +72,7 @@ For a known page, use `web-scrape-markdown`. Use `web-search` when the URL is un
5672

5773
OAuth connects Cursor to the MCP server. If you are writing application code that calls the Context.dev REST API or SDK directly, create an API key in the [Context.dev dashboard](https://context.dev) and keep it in a server-side `CONTEXT_DEV_API_KEY` environment variable. Never put a private API key in browser code or commit it to source control.
5874

59-
The bundled `context-dev` skill is synchronized from [docs.context.dev/skill.md](https://docs.context.dev/skill.md), while the plugin's MCP instructions deliberately describe only the public tools exposed by the production MCP server.
75+
The bundled `context-dev` API reference is synchronized from [docs.context.dev/skill.md](https://docs.context.dev/skill.md). Its Cursor activation description is narrowed to direct API and SDK development, while the focused OAuth skills route interactive work through the public production MCP tools.
6076

6177
## Local development
6278

@@ -75,7 +91,7 @@ mkdir -p ~/.cursor/plugins/local
7591
rsync -a --delete --exclude '.git/' ./ ~/.cursor/plugins/local/context-dev/
7692
```
7793

78-
Then run **Developer: Reload Window** in Cursor and verify that the `context` MCP server, four commands, three skills, and two rules appear. A copied directory is used because current Cursor builds reject local-plugin symlinks whose targets are outside `~/.cursor/plugins/local`.
94+
Then run **Developer: Reload Window** in Cursor and verify that the `context` MCP server, four commands, eleven skills, and two rules appear. A copied directory is used because current Cursor builds reject local-plugin symlinks whose targets are outside `~/.cursor/plugins/local`.
7995

8096
## Links
8197

scripts/sync-skill.mjs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ const repoRoot = process.cwd();
88
const skillUrl = "https://docs.context.dev/skill.md";
99
const skillPath = path.join(repoRoot, "skills", "context-dev", "SKILL.md");
1010
const checkOnly = process.argv.includes("--check");
11+
const cursorDescription =
12+
"Build application code directly against the Context.dev REST API or SDKs with server-side API-key authentication. Use when the user asks to integrate Context.dev into a codebase, choose an SDK method or REST endpoint, debug an API request, or implement a backend Context.dev workflow. For ordinary live-web work inside Cursor, use the focused Context.dev MCP skills instead.";
13+
14+
function adaptForCursor(body) {
15+
return body
16+
.replace(/^description:.*$/m, `description: ${cursorDescription}`)
17+
.replace(/^compatibility:.*\n/m, "");
18+
}
1119

1220
async function fetchSkill() {
1321
let lastError;
@@ -36,14 +44,14 @@ async function main() {
3644
throw new Error(`${skillUrl} did not return a valid context-dev skill`);
3745
}
3846

39-
const expected = `${body}\n`;
47+
const expected = `${adaptForCursor(body)}\n`;
4048

4149
if (checkOnly) {
4250
const current = await fs.readFile(skillPath, "utf8");
4351
if (current !== expected) {
4452
throw new Error(`${path.relative(repoRoot, skillPath)} is stale. Run node scripts/sync-skill.mjs.`);
4553
}
46-
console.log(`${path.relative(repoRoot, skillPath)} matches ${skillUrl}`);
54+
console.log(`${path.relative(repoRoot, skillPath)} is synchronized with ${skillUrl}`);
4755
return;
4856
}
4957

scripts/validate-plugin.mjs

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,8 @@ async function validateComponents() {
225225
if (ruleFiles.length !== 2) {
226226
addError(`expected 2 rules but found ${ruleFiles.length}.`);
227227
}
228-
if (skillFiles.length !== 3) {
229-
addError(`expected 3 skills but found ${skillFiles.length}.`);
228+
if (skillFiles.length !== 11) {
229+
addError(`expected 11 skills but found ${skillFiles.length}.`);
230230
}
231231
if (commandFiles.length !== 4) {
232232
addError(`expected 4 commands but found ${commandFiles.length}.`);
@@ -273,6 +273,31 @@ async function validateInstructionsAreCurrent() {
273273
addError(`${relativeFile} must call the direct MCP tool ${toolName}.`);
274274
}
275275
}
276+
277+
const skillToolRequirements = new Map([
278+
["skills/context-search/SKILL.md", ["web-search"]],
279+
["skills/context-scrape/SKILL.md", ["web-scrape-markdown", "web-scrape-html", "web-scrape-images", "web-screenshot"]],
280+
["skills/context-crawl/SKILL.md", ["web-scrape-sitemap", "web-crawl"]],
281+
["skills/context-extract/SKILL.md", ["web-extract"]],
282+
["skills/context-parse/SKILL.md", ["parse-document"]],
283+
["skills/context-brand/SKILL.md", ["get-brand", "brand-retrieve-unified", "web-styleguide", "web-fonts", "web-naics", "web-sic"]],
284+
["skills/context-monitor/SKILL.md", ["create-monitor", "update-monitor", "delete-monitor", "run-monitor-now"]],
285+
["skills/context-batches/SKILL.md", ["submit-batch", "get-batch", "get-batch-results", "cancel-batch", "delete-batch"]],
286+
]);
287+
for (const [relativeFile, toolNames] of skillToolRequirements) {
288+
const content = await fs.readFile(path.join(repoRoot, relativeFile), "utf8");
289+
for (const toolName of toolNames) {
290+
if (!content.includes(`\`${toolName}\``)) {
291+
addError(`${relativeFile} must reference the direct MCP tool ${toolName}.`);
292+
}
293+
}
294+
}
295+
296+
const directApiSkill = await fs.readFile(path.join(repoRoot, "skills/context-dev/SKILL.md"), "utf8");
297+
const directApiFields = parseFrontmatter(directApiSkill);
298+
if (!directApiFields?.description?.includes("directly against the Context.dev REST API or SDKs")) {
299+
addError("skills/context-dev/SKILL.md must activate only for direct API and SDK development.");
300+
}
276301
}
277302

278303
async function validateRequiredFiles() {

skills/context-batches/SKILL.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
name: context-batches
3+
description: Run and manage large asynchronous Context.dev web jobs. Use when the user needs to scrape many URLs, crawl at scale, process up to 25,000 URLs in one job, avoid synchronous timeouts, inspect batch progress or results, or cancel or delete a previously submitted batch.
4+
---
5+
6+
# Run asynchronous batches
7+
8+
Use `submit-batch` for large URL collections or crawls that should continue asynchronously. Use direct scrape or crawl tools for small interactive requests.
9+
10+
## Workflow
11+
12+
1. Confirm whether the job is a URL scrape batch or a crawl batch.
13+
2. Validate the target list, requested output, limits, and optional webhook before submission.
14+
3. Supply an idempotency key when retrying a submission so a network retry cannot create a duplicate job.
15+
4. Record the returned batch ID.
16+
5. Check progress with `get-batch` and retrieve completed output with `get-batch-results`.
17+
6. Use `list-batches` when the user needs to locate an existing job.
18+
19+
`submit-batch`, `cancel-batch`, and `delete-batch` change external state. Run them only when explicitly requested. Cancellation stops active work; deletion removes the stored batch record and must not be used as a substitute for cancellation.

skills/context-brand/SKILL.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: context-brand
3+
description: Retrieve company brand intelligence and design data with Context.dev. Use when the user asks for a company's logo, colors, fonts, style guide, social profiles, description, industry, address, stock information, brand kit, or lookup by domain, name, email, ticker, ISIN, transaction descriptor, or direct URL.
4+
---
5+
6+
# Retrieve brand intelligence
7+
8+
Choose the Context.dev MCP tool by output and identifier:
9+
10+
| Need | Tool |
11+
| --- | --- |
12+
| Visual brand profile for a domain | `get-brand` |
13+
| Raw structured brand data or a non-domain lookup | `brand-retrieve-unified` |
14+
| Website design system and component styling | `web-styleguide` |
15+
| Website font inventory | `web-fonts` |
16+
| NAICS classification | `web-naics` |
17+
| SIC classification | `web-sic` |
18+
19+
## Workflow
20+
21+
1. Prefer a bare domain such as `stripe.com` when available.
22+
2. Use `get-brand` when a visual card is useful; use `brand-retrieve-unified` when the result feeds code or a structured workflow.
23+
3. Set `maxSpeed` as a boolean only when the user prioritizes speed over slower enrichment steps.
24+
4. Select logo variants by type and light/dark mode rather than assuming the first logo is correct.
25+
5. Preserve nullable fields and provide sensible presentation fallbacks without inventing data.
26+
27+
For dynamic frontend logo URLs, use the separate `logolink` skill. Do not expose a private Context API key in browser code.

skills/context-crawl/SKILL.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: context-crawl
3+
description: Discover or read multiple pages from a website with Context.dev. Use when the user asks to map a site, find URLs in a sitemap, crawl documentation or a site section, gather several linked pages, or locate the most relevant pages within one domain.
4+
---
5+
6+
# Map and crawl websites
7+
8+
Choose between URL discovery and content collection:
9+
10+
- Use `web-scrape-sitemap` to discover and rank URLs without reading every page.
11+
- Use `web-crawl` to retrieve content from a bounded set of linked pages.
12+
13+
## Workflow
14+
15+
1. Confirm the target domain or starting URL and the section the user cares about.
16+
2. Use sitemap search when the user wants particular pages rather than the whole site.
17+
3. Apply path, subdomain, and link limits that match the request.
18+
4. Keep synchronous crawls focused; do not expand scope beyond the requested site or section.
19+
5. Return page URLs alongside the relevant content so results remain traceable.
20+
21+
Use `web-scrape-markdown` for one known page. For a large crawl or thousands of URLs, use `submit-batch` instead of forcing the work through a synchronous crawl.

skills/context-dev/SKILL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
22
name: context-dev
3-
description: Use this skill to call the Context.dev API for brand data and web extraction. Make sure to use this skill whenever the user wants to look up a company's logo, colors, socials, industry, address, employee count, or stock ticker by domain, name, work email, ticker, or ISIN; enrich a lead or CRM record; enrich a person or contact from an email, name, or social profile URL; pre-fill an onboarding form; build a customer logo wall or "trusted by" strip; categorize a card or bank transaction descriptor (e.g. "AMZN MKTP US"); scrape a webpage to clean markdown or HTML for an LLM or RAG pipeline; crawl a site or fetch its sitemap; run a web search; extract products or pricing from a storefront; take a screenshot of a webpage; pull a website's design system (colors, fonts, spacing, components) for theming; classify a company by NAICS or SIC; or extract structured data from a website with a JSON Schema, even if they don't explicitly mention "Context.dev" or "Brand API". Requires a CONTEXT_DEV_API_KEY environment variable.
3+
description: Build application code directly against the Context.dev REST API or SDKs with server-side API-key authentication. Use when the user asks to integrate Context.dev into a codebase, choose an SDK method or REST endpoint, debug an API request, or implement a backend Context.dev workflow. For ordinary live-web work inside Cursor, use the focused Context.dev MCP skills instead.
44
license: MIT
5-
compatibility: Requires a Context.dev API key in the CONTEXT_DEV_API_KEY environment variable. SDKs for TypeScript, Python, Ruby, Go, and PHP; or call the REST API directly.
65
metadata:
76
author: context.dev
87
version: "3.1"

skills/context-extract/SKILL.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: context-extract
3+
description: Extract schema-shaped JSON from websites with Context.dev. Use when the user wants structured records such as products, pricing plans, rankings, jobs, events, tables, listings, or explicitly requests JSON that follows a schema.
4+
---
5+
6+
# Extract structured web data
7+
8+
Use the Context.dev `web-extract` MCP tool when the output must have a predictable JSON shape rather than free-form page text.
9+
10+
## Workflow
11+
12+
1. Define the smallest JSON Schema that contains only the fields the user needs.
13+
2. Give every field a clear description that distinguishes similar values.
14+
3. Make fields optional or nullable when the source may omit them.
15+
4. Pass the relevant URL or URLs and describe the records to extract.
16+
5. Validate that the response follows the requested schema before presenting it.
17+
18+
Preserve source semantics. Tied ranks such as `=19`, ranges such as `101-150`, and unavailable scores are legitimate source values; do not silently convert or invent them.
19+
20+
Extraction does not remove site pagination. Discover additional pages with `web-scrape-sitemap`, then use a batch when many page URLs must be processed. Use `web-scrape-markdown` when the user only needs readable text.

skills/context-monitor/SKILL.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: context-monitor
3+
description: Create and manage recurring website-change monitors with Context.dev. Use when the user wants ongoing tracking, scheduled checks, alerts, change history, monitor runs, or asks to watch a page or site for future changes rather than inspect it once.
4+
---
5+
6+
# Monitor website changes
7+
8+
Use monitors only for recurring work. For a one-time check, scrape or crawl instead.
9+
10+
## Workflow
11+
12+
1. Confirm the target, monitoring goal, schedule, and desired notification behavior.
13+
2. Use `create-monitor` only after the user clearly asks to create ongoing monitoring. Creation immediately queues the initial baseline.
14+
3. Do not call `run-monitor-now` immediately after creation unless the user asks for an additional run.
15+
4. Inspect results with `list-monitor-runs`, `get-monitor-run`, `list-monitor-changes`, `list-changes`, or `get-change`.
16+
5. Use `list-monitor-credit-usage` when the user asks about monitor consumption.
17+
18+
Use `list-monitors` and `get-monitor` for inspection. `update-monitor`, `delete-monitor`, and `run-monitor-now` modify external state; execute them only when the user explicitly requests that action. Prefer pausing through `update-monitor` over deletion when the user only wants checks temporarily stopped.

0 commit comments

Comments
 (0)