@weavetab/skills 1.0.3 โ†’ 2.5.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +108 -60
  2. package/ROUTER.md +43 -0
  3. package/bin/cli.js +232 -132
  4. package/browser/dom-strategy.md +119 -0
  5. package/browser/form-automation.md +87 -0
  6. package/browser/interaction-pipeline.md +216 -0
  7. package/browser/tab-and-window.md +136 -0
  8. package/desktop/desktop-targeting.md +85 -0
  9. package/desktop/electron-discovery.md +115 -0
  10. package/developer/github-forensics.md +74 -0
  11. package/dist/bundled/weavetab-all.md +1905 -0
  12. package/dist/bundled/weavetab-browser.md +501 -0
  13. package/dist/bundled/weavetab-desktop.md +176 -0
  14. package/dist/bundled/weavetab-developer.md +67 -0
  15. package/dist/bundled/weavetab-documents.md +142 -0
  16. package/dist/bundled/weavetab-memory.md +359 -0
  17. package/dist/bundled/weavetab-network-and-perf.md +223 -0
  18. package/dist/bundled/weavetab-plugins.md +78 -0
  19. package/dist/bundled/weavetab-resilience.md +216 -0
  20. package/dist/bundled/weavetab-security.md +87 -0
  21. package/dist/granular/browser_dom-strategy.md +119 -0
  22. package/dist/granular/browser_form-automation.md +87 -0
  23. package/dist/granular/browser_interaction-pipeline.md +216 -0
  24. package/dist/granular/browser_tab-and-window.md +136 -0
  25. package/dist/granular/desktop_desktop-targeting.md +85 -0
  26. package/dist/granular/desktop_electron-discovery.md +115 -0
  27. package/dist/granular/developer_github-forensics.md +74 -0
  28. package/dist/granular/documents_canvas-and-visual-capture.md +103 -0
  29. package/dist/granular/documents_office-document-ingestion.md +63 -0
  30. package/dist/granular/memory_selector-memory-system.md +127 -0
  31. package/dist/granular/memory_session-trail.md +95 -0
  32. package/dist/granular/memory_site-learning.md +180 -0
  33. package/dist/granular/network-and-perf_device-and-environment.md +87 -0
  34. package/dist/granular/network-and-perf_network-intercept-and-mock.md +84 -0
  35. package/dist/granular/network-and-perf_performance-and-vitals.md +84 -0
  36. package/dist/granular/plugins_hooks-and-overrides.md +36 -0
  37. package/dist/granular/plugins_plugin-runtime.md +60 -0
  38. package/dist/granular/resilience_loop-breaker.md +67 -0
  39. package/dist/granular/resilience_session-time-travel.md +131 -0
  40. package/dist/granular/resilience_stale-ref-recovery.md +53 -0
  41. package/dist/granular/security_rbac-and-policies.md +47 -0
  42. package/dist/granular/security_secret-containment-protocol.md +59 -0
  43. package/documents/canvas-and-visual-capture.md +103 -0
  44. package/documents/office-document-ingestion.md +63 -0
  45. package/evals/evaluator.js +146 -0
  46. package/evals/scenarios.json +238 -0
  47. package/memory/selector-memory-system.md +127 -0
  48. package/memory/session-trail.md +95 -0
  49. package/memory/site-learning.md +180 -0
  50. package/network-and-perf/device-and-environment.md +87 -0
  51. package/network-and-perf/network-intercept-and-mock.md +84 -0
  52. package/network-and-perf/performance-and-vitals.md +84 -0
  53. package/package.json +73 -51
  54. package/plugins/hooks-and-overrides.md +36 -0
  55. package/plugins/plugin-runtime.md +60 -0
  56. package/resilience/loop-breaker.md +67 -0
  57. package/resilience/session-time-travel.md +131 -0
  58. package/resilience/stale-ref-recovery.md +53 -0
  59. package/security/rbac-and-policies.md +47 -0
  60. package/security/secret-containment-protocol.md +59 -0
  61. package/skills.json +431 -308
  62. package/src/api.js +239 -128
  63. package/advanced/README.md +0 -2
  64. package/automation/README.md +0 -2
  65. package/general/captcha-evasion.md +0 -13
  66. package/general/context-awareness.md +0 -13
  67. package/general/cookie-consent.md +0 -13
  68. package/general/data-extraction.md +0 -13
  69. package/general/dynamic-interaction.md +0 -13
  70. package/general/error-recovery.md +0 -13
  71. package/general/file-upload.md +0 -13
  72. package/general/form-filling.md +0 -16
  73. package/general/guardrails.md +0 -13
  74. package/general/iframe-handling.md +0 -13
  75. package/general/infinite-scroll.md +0 -13
  76. package/general/login-flow.md +0 -16
  77. package/general/multi-tab-management.md +0 -13
  78. package/general/spa-navigation.md +0 -13
  79. package/general/table-scraping.md +0 -13
package/src/api.js CHANGED
@@ -1,128 +1,239 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
-
4
- /**
5
- * Programmatically install Weavetab MCP skills into a target project.
6
- *
7
- * @param {Object} options
8
- * @param {string} options.targetFramework - '.agents', '.cursor', '.clinerules', or 'generic'
9
- * @param {string[]} options.categories - Array of categories to install (e.g. ['general'])
10
- * @param {string} options.projectRoot - The root directory to install into (defaults to process.cwd())
11
- * @returns {Promise<string>} - A message indicating success and the path where skills were installed.
12
- */
13
- async function installSkills({ targetFramework, categories, projectRoot = process.cwd() }) {
14
- const packageRoot = path.join(__dirname, '..');
15
-
16
- if (!categories || categories.length === 0) {
17
- throw new Error("No categories selected for installation.");
18
- }
19
-
20
- // Gather all markdown files from the selected categories
21
- let allMarkdownFiles = [];
22
- for (const category of categories) {
23
- const categoryDir = path.join(packageRoot, category);
24
- if (!fs.existsSync(categoryDir)) continue;
25
-
26
- const files = fs.readdirSync(categoryDir).filter(f => f.endsWith('.md'));
27
- for (const file of files) {
28
- allMarkdownFiles.push({
29
- name: file,
30
- content: fs.readFileSync(path.join(categoryDir, file), 'utf8')
31
- });
32
- }
33
- }
34
-
35
- if (allMarkdownFiles.length === 0) {
36
- throw new Error("No skills found in the selected categories.");
37
- }
38
-
39
- // Process and inject based on the framework
40
- if (targetFramework === '.clinerules') {
41
- // Cline uses a single file at the root
42
- const clineFile = path.join(projectRoot, '.clinerules');
43
- let combinedContent = "\n\n# --- Weavetab MCP Skills ---\n\n";
44
- for (const file of allMarkdownFiles) {
45
- combinedContent += `## ${file.name}\n${file.content}\n\n`;
46
- }
47
- fs.appendFileSync(clineFile, combinedContent);
48
- return `Successfully appended ${allMarkdownFiles.length} skills to ${clineFile}`;
49
- }
50
-
51
- else if (targetFramework === '.cursor') {
52
- // Cursor uses .mdc files in .cursor/rules
53
- const cursorRulesDir = path.join(projectRoot, '.cursor', 'rules');
54
- fs.mkdirSync(cursorRulesDir, { recursive: true });
55
-
56
- for (const file of allMarkdownFiles) {
57
- const destFile = path.join(cursorRulesDir, file.name.replace('.md', '.mdc'));
58
- fs.writeFileSync(destFile, file.content);
59
- }
60
- return `Successfully installed ${allMarkdownFiles.length} skills to ${cursorRulesDir}`;
61
- }
62
-
63
- else if (targetFramework === '.agents') {
64
- // Standard agent customizations folder
65
- const agentsDir = path.join(projectRoot, '.agents', 'skills', 'weavetab');
66
- fs.mkdirSync(agentsDir, { recursive: true });
67
-
68
- for (const file of allMarkdownFiles) {
69
- fs.writeFileSync(path.join(agentsDir, file.name), file.content);
70
- }
71
- return `Successfully installed ${allMarkdownFiles.length} skills to ${agentsDir}`;
72
- }
73
-
74
- else if (targetFramework === '.openclaw') {
75
- // OpenClaw AI folder
76
- const openClawDir = path.join(projectRoot, '.openclaw', 'skills');
77
- fs.mkdirSync(openClawDir, { recursive: true });
78
-
79
- for (const file of allMarkdownFiles) {
80
- fs.writeFileSync(path.join(openClawDir, file.name), file.content);
81
- }
82
- return `Successfully installed ${allMarkdownFiles.length} skills to ${openClawDir}`;
83
- }
84
-
85
- else if (targetFramework === '.roocode') {
86
- const rooDir = path.join(projectRoot, '.roocode', 'rules');
87
- fs.mkdirSync(rooDir, { recursive: true });
88
-
89
- for (const file of allMarkdownFiles) {
90
- fs.writeFileSync(path.join(rooDir, file.name), file.content);
91
- }
92
- return `Successfully installed ${allMarkdownFiles.length} skills to ${rooDir}`;
93
- }
94
-
95
- else if (targetFramework === '.windsurf') {
96
- const windsurfDir = path.join(projectRoot, '.windsurf', 'rules');
97
- fs.mkdirSync(windsurfDir, { recursive: true });
98
-
99
- for (const file of allMarkdownFiles) {
100
- fs.writeFileSync(path.join(windsurfDir, file.name), file.content);
101
- }
102
- return `Successfully installed ${allMarkdownFiles.length} skills to ${windsurfDir}`;
103
- }
104
-
105
- else if (targetFramework === '.aider') {
106
- const aiderFile = path.join(projectRoot, '.aider.conf.yml');
107
- let combinedContent = "\n# --- Weavetab MCP Skills ---\n";
108
- for (const file of allMarkdownFiles) {
109
- // Very basic formatting for appending to Aider conf
110
- combinedContent += `# ${file.name}\n# ${file.content.split('\n').join('\n# ')}\n\n`;
111
- }
112
- fs.appendFileSync(aiderFile, combinedContent);
113
- return `Successfully appended ${allMarkdownFiles.length} skills to ${aiderFile}`;
114
- }
115
-
116
- else {
117
- // Generic folder
118
- const genericDir = path.join(projectRoot, 'weavetab-skills');
119
- fs.mkdirSync(genericDir, { recursive: true });
120
-
121
- for (const file of allMarkdownFiles) {
122
- fs.writeFileSync(path.join(genericDir, file.name), file.content);
123
- }
124
- return `Successfully installed ${allMarkdownFiles.length} skills to ${genericDir}`;
125
- }
126
- }
127
-
128
- module.exports = { installSkills };
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const packageRoot = path.join(__dirname, '..');
5
+ const pkg = JSON.parse(fs.readFileSync(path.join(packageRoot, 'package.json'), 'utf8'));
6
+ const WEAVETAB_VERSION = pkg.version;
7
+ const skillsJsonPath = path.join(packageRoot, 'skills.json');
8
+ const routerPath = path.join(packageRoot, 'ROUTER.md');
9
+ const distBundledDir = path.join(packageRoot, 'dist', 'bundled');
10
+
11
+ const ALL_DOMAINS = [
12
+ 'browser',
13
+ 'desktop',
14
+ 'memory',
15
+ 'resilience',
16
+ 'security',
17
+ 'plugins',
18
+ 'network-and-perf',
19
+ 'documents',
20
+ 'developer'
21
+ ];
22
+
23
+ /**
24
+ * Read the pre-compiled skills catalog.
25
+ */
26
+ function getSkills() {
27
+ if (!fs.existsSync(skillsJsonPath)) {
28
+ throw new Error("skills.json not found. Run 'npm run build' first.");
29
+ }
30
+ return JSON.parse(fs.readFileSync(skillsJsonPath, 'utf8'));
31
+ }
32
+
33
+ /**
34
+ * Retrieve a specific skill by its ID.
35
+ */
36
+ function getSkill(id) {
37
+ const data = getSkills();
38
+ return data.skills.find(s => s.id === id) || null;
39
+ }
40
+
41
+ /**
42
+ * Retrieve all skills belonging to a domain.
43
+ */
44
+ function getSkillsByDomain(domain) {
45
+ const data = getSkills();
46
+ return data.skills.filter(s => s.domain === domain);
47
+ }
48
+
49
+ /**
50
+ * Read the universal intent decision matrix (ROUTER.md).
51
+ */
52
+ function getRouterMatrix() {
53
+ if (!fs.existsSync(routerPath)) return "";
54
+ return fs.readFileSync(routerPath, 'utf8');
55
+ }
56
+
57
+ /**
58
+ * Programmatically install Weavetab MCP skills into a target project.
59
+ *
60
+ * @param {Object} options
61
+ * @param {string} options.targetFramework - '.agents', '.cursor', '.clinerules', '.windsurf', '.openclaw', '.roocode', '.aider', or 'generic'
62
+ * @param {string[]} [options.domains] - Domains to install (e.g. ['browser', 'security']). Defaults to all domains.
63
+ * @param {string} [options.projectRoot] - Root directory to install into (defaults to process.cwd())
64
+ * @param {boolean} [options.includeRouter=true] - Whether to include the Step-0 ROUTER.md matrix.
65
+ * @returns {Promise<string>} - Confirmation message and target path.
66
+ */
67
+ async function installSkills({
68
+ targetFramework,
69
+ domains = ALL_DOMAINS,
70
+ projectRoot = process.cwd(),
71
+ includeRouter = true
72
+ }) {
73
+ if (!targetFramework) {
74
+ throw new Error("targetFramework is required (e.g. '.agents', '.cursor', '.clinerules').");
75
+ }
76
+
77
+ if (!domains || domains.length === 0) {
78
+ domains = ALL_DOMAINS;
79
+ }
80
+
81
+ const routerContent = getRouterMatrix();
82
+
83
+ // Load domain bundled content
84
+ const domainBundles = {};
85
+ for (const domain of domains) {
86
+ const bundleFile = path.join(distBundledDir, `weavetab-${domain}.md`);
87
+ if (fs.existsSync(bundleFile)) {
88
+ domainBundles[domain] = fs.readFileSync(bundleFile, 'utf8');
89
+ }
90
+ }
91
+
92
+ // 1. Antigravity & Standard Agent Tree (.agent/skills/<skill-name>/SKILL.md)
93
+ if (targetFramework === '.agents' || targetFramework === '.agent') {
94
+ const baseSkillsDir = path.join(projectRoot, '.agent', 'skills');
95
+ fs.mkdirSync(baseSkillsDir, { recursive: true });
96
+
97
+ if (includeRouter) {
98
+ const routerDir = path.join(baseSkillsDir, 'weavetab-router');
99
+ fs.mkdirSync(routerDir, { recursive: true });
100
+ const routerFrontmatter = [
101
+ "---",
102
+ "name: weavetab-router",
103
+ "description: Step-0 Universal Intent Decision Matrix for Weavetab MCP automation",
104
+ "---",
105
+ "",
106
+ routerContent
107
+ ].join('\n');
108
+ fs.writeFileSync(path.join(routerDir, 'SKILL.md'), routerFrontmatter);
109
+ }
110
+
111
+ for (const [domain, content] of Object.entries(domainBundles)) {
112
+ const skillDir = path.join(baseSkillsDir, `weavetab-${domain}`);
113
+ fs.mkdirSync(skillDir, { recursive: true });
114
+ const frontmatter = [
115
+ "---",
116
+ `name: weavetab-${domain}`,
117
+ `description: Operational guidance for Weavetab MCP ${domain} domain automation and tool protocols.`,
118
+ "---",
119
+ "",
120
+ content
121
+ ].join('\n');
122
+ fs.writeFileSync(path.join(skillDir, 'SKILL.md'), frontmatter);
123
+ }
124
+
125
+ return `Successfully installed ${domains.length} domain skills to ${baseSkillsDir}`;
126
+ }
127
+
128
+ // 2. Cursor IDE (.cursor/rules/weavetab-<domain>.mdc)
129
+ else if (targetFramework === '.cursor') {
130
+ const cursorRulesDir = path.join(projectRoot, '.cursor', 'rules');
131
+ fs.mkdirSync(cursorRulesDir, { recursive: true });
132
+
133
+ if (includeRouter) {
134
+ const routerMdc = [
135
+ "---",
136
+ "description: Universal Agent Intent Decision Matrix for Weavetab MCP",
137
+ "globs: *",
138
+ "alwaysApply: false",
139
+ "---",
140
+ "",
141
+ routerContent
142
+ ].join('\n');
143
+ fs.writeFileSync(path.join(cursorRulesDir, 'weavetab-router.mdc'), routerMdc);
144
+ }
145
+
146
+ for (const [domain, content] of Object.entries(domainBundles)) {
147
+ const mdcContent = [
148
+ "---",
149
+ `description: Weavetab MCP operational rules for ${domain}`,
150
+ "globs: *",
151
+ "alwaysApply: false",
152
+ "---",
153
+ "",
154
+ content
155
+ ].join('\n');
156
+ fs.writeFileSync(path.join(cursorRulesDir, `weavetab-${domain}.mdc`), mdcContent);
157
+ }
158
+
159
+ return `Successfully installed ${domains.length} Cursor rules to ${cursorRulesDir}`;
160
+ }
161
+
162
+ // 3. Cline (.clinerules single file)
163
+ else if (targetFramework === '.clinerules') {
164
+ const clineFile = path.join(projectRoot, '.clinerules');
165
+ let combined = `\n\n# ====================================================\n# Weavetab MCP Skills (v${WEAVETAB_VERSION})\n# ====================================================\n\n`;
166
+ if (includeRouter) {
167
+ combined += routerContent + "\n\n";
168
+ }
169
+ for (const [domain, content] of Object.entries(domainBundles)) {
170
+ combined += `\n\n# --- DOMAIN: ${domain.toUpperCase()} ---\n\n${content}\n`;
171
+ }
172
+ fs.appendFileSync(clineFile, combined);
173
+ return `Successfully appended ${domains.length} domains to ${clineFile}`;
174
+ }
175
+
176
+ // 4. Windsurf IDE (.windsurf/rules/weavetab-<domain>.md)
177
+ else if (targetFramework === '.windsurf') {
178
+ const windsurfDir = path.join(projectRoot, '.windsurf', 'rules');
179
+ fs.mkdirSync(windsurfDir, { recursive: true });
180
+
181
+ if (includeRouter) {
182
+ fs.writeFileSync(path.join(windsurfDir, 'weavetab-router.md'), routerContent);
183
+ }
184
+
185
+ for (const [domain, content] of Object.entries(domainBundles)) {
186
+ fs.writeFileSync(path.join(windsurfDir, `weavetab-${domain}.md`), content);
187
+ }
188
+ return `Successfully installed ${domains.length} rules to ${windsurfDir}`;
189
+ }
190
+
191
+ // 5. OpenClaw (.openclaw/skills/weavetab-<domain>/SKILL.md)
192
+ else if (targetFramework === '.openclaw') {
193
+ const openClawDir = path.join(projectRoot, '.openclaw', 'skills');
194
+ fs.mkdirSync(openClawDir, { recursive: true });
195
+
196
+ for (const [domain, content] of Object.entries(domainBundles)) {
197
+ const dir = path.join(openClawDir, `weavetab-${domain}`);
198
+ fs.mkdirSync(dir, { recursive: true });
199
+ fs.writeFileSync(path.join(dir, 'SKILL.md'), content);
200
+ }
201
+ return `Successfully installed ${domains.length} skills to ${openClawDir}`;
202
+ }
203
+
204
+ // 6. RooCode (.roocode/rules/weavetab-<domain>.md)
205
+ else if (targetFramework === '.roocode') {
206
+ const rooDir = path.join(projectRoot, '.roocode', 'rules');
207
+ fs.mkdirSync(rooDir, { recursive: true });
208
+
209
+ for (const [domain, content] of Object.entries(domainBundles)) {
210
+ fs.writeFileSync(path.join(rooDir, `weavetab-${domain}.md`), content);
211
+ }
212
+ return `Successfully installed ${domains.length} rules to ${rooDir}`;
213
+ }
214
+
215
+ // 7. Generic / Raw Markdown
216
+ else {
217
+ const genericDir = path.join(projectRoot, 'weavetab-skills');
218
+ fs.mkdirSync(genericDir, { recursive: true });
219
+
220
+ if (includeRouter) {
221
+ fs.writeFileSync(path.join(genericDir, 'ROUTER.md'), routerContent);
222
+ }
223
+
224
+ for (const [domain, content] of Object.entries(domainBundles)) {
225
+ fs.writeFileSync(path.join(genericDir, `weavetab-${domain}.md`), content);
226
+ }
227
+ return `Successfully installed ${domains.length} domain bundles to ${genericDir}`;
228
+ }
229
+ }
230
+
231
+ module.exports = {
232
+ WEAVETAB_VERSION,
233
+ installSkills,
234
+ getSkills,
235
+ getSkill,
236
+ getSkillsByDomain,
237
+ getRouterMatrix,
238
+ ALL_DOMAINS
239
+ };
@@ -1,2 +0,0 @@
1
- # Advanced Skills
2
- Coming soon.
@@ -1,2 +0,0 @@
1
- # Automation Skills
2
- Coming soon.
@@ -1,13 +0,0 @@
1
- ---
2
- id: captcha-evasion
3
- tier: general
4
- triggers: ["captcha", "recaptcha", "hcaptcha", "bot check", "verification"]
5
- tools: ["browser_wait", "browser_click", "browser_map", "browser_snapshot", "browser_ask"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿค– Bot Challenge Handling
9
- **Core Philosophy:** You will encounter anti-bot systems. Handle them gracefully.
10
-
11
- - **Identify the Threat:** If a page suddenly looks weird, check for Cloudflare, reCAPTCHA, or hCaptcha challenge screens.
12
- - **Attempt Resolution:** Some captchas are simple "Click to verify you are human" checkboxes. You can often `browser_click` these successfully.
13
- - **Know Your Limits:** If you hit a complex image grid captcha, do not guess blindly. Use `browser_ask` to prompt the user for help, or wait and see if the challenge resolves itself. You are autonomous, but you know when to ask for human assistance.
@@ -1,13 +0,0 @@
1
- ---
2
- id: context-awareness
3
- tier: general
4
- triggers: ["analyze page", "understand context", "what is on the page", "read page", "visualize"]
5
- tools: ["browser_snapshot", "browser_map", "browser_evaluate"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ‘๏ธ Deep Context Awareness
9
- **Core Philosophy:** Don't just look at the DOM; understand the semantic meaning of the page.
10
-
11
- - **Holistic Understanding:** Before taking action on a complex page, take a moment to understand its structure. Where is the navigation? Where is the main content? Where is the sidebar?
12
- - **Visual vs. Semantic:** Remember that what is visually prominent might be buried deep in the DOM. Use `browser_snapshot` to reconcile the visual layout with the structural DOM.
13
- - **Read Between the Lines:** If a user asks you to "buy the cheapest item", you need to autonomously scan the page, extract prices, compare them, and then take action. Be smart.
@@ -1,13 +0,0 @@
1
- ---
2
- id: cookie-consent
3
- tier: general
4
- triggers: ["cookie banner", "consent", "gdpr", "accept cookies", "popup", "overlay"]
5
- tools: ["browser_find", "browser_click", "browser_map"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿช Autonomous Consent Handling
9
- **Core Philosophy:** Cookie banners and popups are the bane of web automation. Destroy them.
10
-
11
- - **Detect and Destroy:** When you land on a new site, the very first thing you should look for is a giant overlay blocking the content.
12
- - **Accept or Reject:** If the user hasn't specified a preference, you have the autonomy to click "Accept All", "Got it", or "Reject All" just to get the banner out of the way so you can do your actual job.
13
- - **Don't Let Them Stop You:** If a modal overlay prevents you from clicking the element you actually want, prioritize dismissing the modal first.
@@ -1,13 +0,0 @@
1
- ---
2
- id: data-extraction
3
- tier: general
4
- triggers: ["extract", "scrape", "get data", "read data", "fetch info", "parse"]
5
- tools: ["browser_scrape", "browser_evaluate", "browser_snapshot", "browser_map"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ—ƒ๏ธ Intelligent Data Extraction
9
- **Core Philosophy:** You are a master of transforming messy web pages into structured data.
10
-
11
- - **Go Beyond the Surface:** Don't just scrape text. Look for hidden metadata, `aria-labels`, and data attributes that might contain cleaner information.
12
- - **Use JavaScript:** If the DOM is too chaotic to scrape cleanly using standard tools, you have the autonomy to use `browser_evaluate` to run a custom JavaScript snippet to extract exactly what you need.
13
- - **Synthesize:** If the user asks for a summary of a product, don't just dump the raw description. Extract the price, the reviews, the specs, and synthesize it into a clean, easy-to-read report.
@@ -1,13 +0,0 @@
1
- ---
2
- id: dynamic-interaction
3
- tier: general
4
- triggers: ["hover", "drag", "complex interaction", "dropdown", "menu", "slider"]
5
- tools: ["browser_pointer", "browser_map", "browser_click", "browser_evaluate"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ–ฑ๏ธ Complex UI Interactions
9
- **Core Philosophy:** Modern web apps require more than just clicking and typing.
10
-
11
- - **Hover States:** Mega-menus and tooltips require hovering. Use `browser_pointer` to move the mouse over elements to reveal hidden interactions.
12
- - **Drag and Drop:** Sliders, kanban boards, and reorderable lists require drag-and-drop. Calculate the coordinates and execute smooth pointer movements.
13
- - **Be Human-Like:** When interacting with highly dynamic UI components, sometimes it helps to pause briefly between actions to allow animations and transitions to complete.
@@ -1,13 +0,0 @@
1
- ---
2
- id: error-recovery
3
- tier: general
4
- triggers: ["error", "fail", "timeout", "crash", "not found", "stuck", "fix"]
5
- tools: ["browser_snapshot", "browser_map", "browser_console", "browser_wait"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿš‘ Autonomous Error Recovery
9
- **Core Philosophy:** Errors are inevitable. Your strength is in how you recover from them.
10
-
11
- - **Don't Panic:** If a tool call fails (e.g., element not found, timeout), do not immediately give up and ask the user.
12
- - **Investigate:** Take a `browser_snapshot` to see what the page actually looks like. Check the `browser_console` for JavaScript errors that might explain why the page is broken.
13
- - **Pivot and Retry:** Did the page layout change? Find the new selector. Did a modal pop up and steal focus? Close it. You have the autonomy to troubleshoot and try alternative approaches before admitting defeat.
@@ -1,13 +0,0 @@
1
- ---
2
- id: file-upload
3
- tier: general
4
- triggers: ["upload", "file upload", "attach file", "drag and drop", "input file"]
5
- tools: ["browser_upload", "browser_map", "browser_click", "browser_find"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ“ค Resilient File Uploading
9
- **Core Philosophy:** File uploads can be triggered via hidden inputs, drag-and-drop zones, or complex JS widgets.
10
-
11
- - **Find the Real Input:** Often, the visible "Upload" button is just a styled div. You need to find the actual `<input type="file">`. Use `browser_find` or `browser_map` to hunt it down.
12
- - **Use the Native Tool:** Once found, use `browser_upload` to attach the file directly to the input element.
13
- - **Creative Fallbacks:** If `browser_upload` fails because the input is deeply obscured, look for alternative ways to upload (e.g., providing a URL if the site allows it, or alerting the user that manual intervention is needed for this specific widget).
@@ -1,16 +0,0 @@
1
- ---
2
- id: form-filling
3
- tier: general
4
- triggers: ["fill form", "submit form", "form", "input", "textarea", "dropdown", "select", "checkbox"]
5
- tools: ["browser_map", "browser_fill", "browser_type", "browser_select", "browser_click"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ“ Dynamic Form Handling
9
- **Core Philosophy:** Forms are often dynamic, fragile, and aggressively validated. Handle them with care and intelligence.
10
-
11
- - **Map and Plan:** Use `browser_map({ scope: "form" })` to get the lay of the land. Plan your data entry.
12
- - **Adapt to the UI:**
13
- - For standard fields, `browser_fill` is fast and efficient.
14
- - For tricky rich-text editors or masked inputs, fall back to `browser_type`.
15
- - Use `browser_select` for dropdowns, but be prepared to use `browser_click` if it's a custom div-based dropdown.
16
- - **Validation Awareness:** Pay attention to the DOM! If a field turns red, stop and fix it. Don't blindly submit a form with errors. If you see a disabled submit button, figure out which required field you missed.
@@ -1,13 +0,0 @@
1
- ---
2
- id: guardrails
3
- tier: general
4
- triggers: ["search", "browse", "github", "web", "navigate", "read repo"]
5
- tools: ["browser_navigate", "browser_map", "github_analyze", "github_read"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ›ก๏ธ Guardrails & Autonomy
9
- **Core Philosophy:** You are a highly capable agent. Use your best judgment when deciding whether to use Weavetab MCP or your native tools.
10
-
11
- - **Native Tools First:** If you need to do a simple web search or read a local codebase, rely on your native capabilities first. They are often faster.
12
- - **When to Engage Weavetab:** Activate Weavetab MCP when you need deep, interactive browsing, rendering complex SPA pages, interacting with forms, or scraping structured data.
13
- - **Creative Problem Solving:** Don't just follow paths blindly. If a site blocks you, pivot. Try a different search term, a different URL, or evaluate the DOM to find alternative routes. You have the autonomy to solve the problem how you see fit.
@@ -1,13 +0,0 @@
1
- ---
2
- id: iframe-handling
3
- tier: general
4
- triggers: ["iframe", "frame", "embed", "embedded content", "cross origin"]
5
- tools: ["browser_map", "browser_find", "browser_click", "browser_snapshot", "browser_navigate"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ–ผ๏ธ iFrame & Embedded Contexts
9
- **Core Philosophy:** iFrames are websites within websites. You must traverse them intelligently.
10
-
11
- - **Spot the Frame:** Payment gateways, video players, and embedded widgets live in iFrames. If you can't find an element that you *know* is on screen, it's probably in an iFrame.
12
- - **Navigate the Hierarchy:** Use your tools to target elements *inside* the iFrame context.
13
- - **Creative Extraction:** If an iFrame is being particularly stubborn, consider extracting its `src` attribute and using `browser_navigate` to visit the embedded page directly in a new tab.
@@ -1,13 +0,0 @@
1
- ---
2
- id: infinite-scroll
3
- tier: general
4
- triggers: ["infinite scroll", "load more", "scroll", "pagination", "lazy load"]
5
- tools: ["browser_scroll", "browser_map", "browser_snapshot", "browser_wait"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ“œ Infinite Scroll Navigation
9
- **Core Philosophy:** Some data is hidden behind the scrollbar. You must be proactive in revealing it.
10
-
11
- - **Scroll and Observe:** Use `browser_scroll` to move down the page. Don't just scroll onceโ€”if you're looking for a specific item, loop your scroll and `browser_wait` until the network fetches the new items.
12
- - **Know When to Stop:** Monitor the DOM. If you scroll and the total height of the page doesn't change after a few seconds, you've likely hit the bottom.
13
- - **Load More Buttons:** Infinite scroll is sometimes replaced by "Load More" buttons. Be vigilantโ€”if scrolling isn't working, look for a button to click instead.
@@ -1,16 +0,0 @@
1
- ---
2
- id: login-flow
3
- tier: general
4
- triggers: ["login", "sign in", "authenticate", "credentials", "log in", "username", "password"]
5
- tools: ["browser_navigate", "browser_map", "browser_fill", "browser_type", "browser_click"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ”‘ Autonomous Login Flow
9
- **Core Philosophy:** Authentication flows vary wildly across the web. You must adapt to the specific site's architecture.
10
-
11
- 1. **Assess the Landscape:** When you land on a login page, use `browser_map` to understand the layout. Is it a single form? A multi-step flow? A social login?
12
- 2. **Execute Creatively:**
13
- - Use `browser_fill` for standard forms.
14
- - If inputs are hidden or complex, use `browser_type` to simulate human keystrokes.
15
- 3. **Handle Friction:** Expect captchas, 2FA prompts, or weird redirects. If the submit button doesn't work, try pressing Enter natively or looking for hidden validation errors.
16
- 4. **Verify State:** Always confirm you actually logged in by checking for authenticated UI elements (like a dashboard or avatar) before declaring success.
@@ -1,13 +0,0 @@
1
- ---
2
- id: multi-tab-management
3
- tier: general
4
- triggers: ["new tab", "open tab", "switch tab", "multiple tabs", "popup", "window"]
5
- tools: ["browser_tabs", "browser_navigate", "browser_click", "browser_map"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ—‚๏ธ Advanced Tab Management
9
- **Core Philosophy:** Modern workflows require multitasking. Manage your browser tabs like a pro.
10
-
11
- - **Keep Context:** If you need to reference documentation while interacting with an app, open it in a new tab. Use `browser_tabs` to seamlessly switch between them.
12
- - **Handle Popups:** Sites will often open OAuth flows or external links in new tabs automatically. Be aware of your current active tab and switch contexts when necessary.
13
- - **Clean Up:** Don't leave 50 tabs open. Close tabs you no longer need to keep your working memory and the browser clean.
@@ -1,13 +0,0 @@
1
- ---
2
- id: spa-navigation
3
- tier: general
4
- triggers: ["spa", "single page", "react", "vue", "angular", "navigate", "route", "dynamic page"]
5
- tools: ["browser_navigate", "browser_wait", "browser_map", "browser_snapshot", "browser_click"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿงญ Single Page Application (SPA) Mastery
9
- **Core Philosophy:** SPAs mutate the DOM asynchronously. You cannot rely on traditional page loads.
10
-
11
- - **Patience is Key:** After clicking a link or a button in an SPA, the URL might change, but the network request might still be pending. Use `browser_wait` to ensure the DOM has settled.
12
- - **Watch the DOM:** Instead of waiting blindly, look for loading spinners or skeleton screens. When they disappear, the content is ready.
13
- - **State Awareness:** SPAs maintain state. If you get lost, you can often use the browser's back button or look for breadcrumbs to re-orient yourself.
@@ -1,13 +0,0 @@
1
- ---
2
- id: table-scraping
3
- tier: general
4
- triggers: ["scrape table", "extract table", "table data", "csv", "rows", "columns", "spreadsheet"]
5
- tools: ["browser_scrape", "browser_map", "browser_snapshot", "browser_navigate"]
6
- weavetab: ">=2.5.0"
7
- ---
8
- # ๐Ÿ“Š Intelligent Table Scraping
9
- **Core Philosophy:** Data rarely looks exactly how you want it to. Be a smart data extractor.
10
-
11
- - **Identify the Target:** Tables aren't always `<table>` elements. Look for CSS grids, flexboxes, and repeating list structures.
12
- - **Scrape Smartly:** Use `browser_scrape` to pull structured data. If the table is paginated, you have the autonomy to loop through pages and compile the data into a single comprehensive dataset.
13
- - **Data Cleanup:** When you extract the data, don't just dump it. Clean it up. Format it nicely (e.g., Markdown tables or CSV) for the user. If headers are weird, infer what they mean and rename them.