opendevbrowser 0.0.10

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.
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: data-extraction
3
+ description: Patterns for extracting structured data from web pages including tables, lists, and paginated content with OpenDevBrowser.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Data Extraction Skill
8
+
9
+ ## Table Extraction
10
+
11
+ 1. Navigate to page with data table:
12
+ ```
13
+ opendevbrowser_goto url="https://example.com/data"
14
+ ```
15
+
16
+ 2. Wait for table to load:
17
+ ```
18
+ opendevbrowser_wait state="networkidle"
19
+ ```
20
+
21
+ 3. Get table HTML structure:
22
+ ```
23
+ opendevbrowser_dom_get_html ref="[table-ref]"
24
+ ```
25
+
26
+ 4. Parse the HTML to extract rows and cells.
27
+
28
+ ### Common Table Patterns
29
+
30
+ Standard HTML tables:
31
+ ```html
32
+ <table>
33
+ <thead><tr><th>Header</th></tr></thead>
34
+ <tbody><tr><td>Data</td></tr></tbody>
35
+ </table>
36
+ ```
37
+
38
+ CSS-based grids:
39
+ ```html
40
+ <div class="grid">
41
+ <div class="row">
42
+ <div class="cell">Data</div>
43
+ </div>
44
+ </div>
45
+ ```
46
+
47
+ ## List Extraction
48
+
49
+ For unordered/ordered lists:
50
+ 1. Identify list container ref
51
+ 2. Extract text content:
52
+ ```
53
+ opendevbrowser_dom_get_text ref="[list-ref]"
54
+ ```
55
+
56
+ For card-based layouts:
57
+ 1. Identify repeating pattern
58
+ 2. Extract each card's content individually
59
+
60
+ ## Pagination Handling
61
+
62
+ ### Numbered Pagination
63
+
64
+ 1. Extract current page data
65
+ 2. Find "Next" or page number button:
66
+ ```
67
+ opendevbrowser_snapshot
68
+ ```
69
+ 3. Click next page:
70
+ ```
71
+ opendevbrowser_click ref="[next-button-ref]"
72
+ ```
73
+ 4. Wait for new content:
74
+ ```
75
+ opendevbrowser_wait state="networkidle"
76
+ ```
77
+ 5. Repeat until no more pages
78
+
79
+ ### Infinite Scroll
80
+
81
+ 1. Extract visible data
82
+ 2. Scroll to load more:
83
+ ```
84
+ opendevbrowser_scroll direction="down" amount=1000
85
+ ```
86
+ 3. Wait for new content
87
+ 4. Repeat until no new items appear
88
+
89
+ ### Load More Button
90
+
91
+ 1. Extract visible data
92
+ 2. Click "Load More":
93
+ ```
94
+ opendevbrowser_click ref="[load-more-ref]"
95
+ ```
96
+ 3. Wait for new content
97
+ 4. Repeat until button disappears
98
+
99
+ ## Data Export Workflow
100
+
101
+ 1. Collect all extracted data in structured format
102
+ 2. Use `opendevbrowser_run` to serialize data:
103
+ ```javascript
104
+ return JSON.stringify(collectedData, null, 2);
105
+ ```
106
+
107
+ ## Handling Dynamic Content
108
+
109
+ For JavaScript-rendered content:
110
+
111
+ 1. Wait for specific element to appear
112
+ 2. Use network polling to detect data loading:
113
+ ```
114
+ opendevbrowser_network_poll
115
+ ```
116
+ 3. Take snapshot after XHR/Fetch completes
117
+
118
+ ## Structured Data Detection
119
+
120
+ Look for embedded structured data:
121
+ - JSON-LD scripts: `<script type="application/ld+json">`
122
+ - Microdata attributes: `itemscope`, `itemprop`
123
+ - RDFa attributes: `typeof`, `property`
124
+
125
+ Extract via:
126
+ ```
127
+ opendevbrowser_run script="return document.querySelector('script[type=\"application/ld+json\"]')?.textContent"
128
+ ```
129
+
130
+ ## Rate Limiting Considerations
131
+
132
+ When extracting large datasets:
133
+ - Add delays between page requests
134
+ - Monitor for rate limit responses (429 status)
135
+ - Respect robots.txt and terms of service
136
+ - Consider using persistent profile to maintain session
@@ -0,0 +1,113 @@
1
+ ---
2
+ name: form-testing
3
+ description: Comprehensive form testing patterns including validation, submission, and error handling with OpenDevBrowser.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Form Testing Skill
8
+
9
+ ## Form Field Discovery
10
+
11
+ 1. Take a snapshot to map all form elements:
12
+ ```
13
+ opendevbrowser_snapshot
14
+ ```
15
+
16
+ 2. Identify field types:
17
+ - Text inputs: `<input type="text">`
18
+ - Email fields: `<input type="email">`
19
+ - Number fields: `<input type="number">`
20
+ - Select dropdowns: `<select>`
21
+ - Checkboxes: `<input type="checkbox">`
22
+ - Radio buttons: `<input type="radio">`
23
+ - Textareas: `<textarea>`
24
+ - File uploads: `<input type="file">`
25
+
26
+ 3. Note required fields (often marked with `required` attribute or asterisk).
27
+
28
+ ## Validation Testing
29
+
30
+ Test each field's validation rules:
31
+
32
+ ### Required Fields
33
+ 1. Leave field empty
34
+ 2. Submit form
35
+ 3. Verify error message appears
36
+
37
+ ### Email Validation
38
+ Test with:
39
+ - Valid email: `user@example.com`
40
+ - Missing @: `userexample.com`
41
+ - Missing domain: `user@`
42
+ - Invalid TLD: `user@example`
43
+
44
+ ### Length Constraints
45
+ - Minimum length: Enter fewer characters than required
46
+ - Maximum length: Enter more characters than allowed
47
+ - Boundary values: Test exact min/max limits
48
+
49
+ ### Pattern Matching
50
+ For fields with regex patterns:
51
+ - Valid pattern match
52
+ - Invalid characters
53
+ - Edge cases
54
+
55
+ ## Form Submission Workflow
56
+
57
+ 1. Fill all required fields:
58
+ ```
59
+ opendevbrowser_type ref="[field-ref]" text="value"
60
+ ```
61
+
62
+ 2. For select dropdowns:
63
+ ```
64
+ opendevbrowser_select ref="[select-ref]" value="option-value"
65
+ ```
66
+
67
+ 3. For checkboxes:
68
+ ```
69
+ opendevbrowser_click ref="[checkbox-ref]"
70
+ ```
71
+
72
+ 4. Submit the form:
73
+ ```
74
+ opendevbrowser_click ref="[submit-ref]"
75
+ ```
76
+
77
+ 5. Wait for response:
78
+ ```
79
+ opendevbrowser_wait state="networkidle"
80
+ ```
81
+
82
+ ## Error Message Verification
83
+
84
+ After invalid submission:
85
+
86
+ 1. Take new snapshot to capture error state
87
+ 2. Look for error messages near each field
88
+ 3. Verify error text matches expected message
89
+ 4. Check ARIA attributes for accessibility
90
+
91
+ ## Multi-Step Forms
92
+
93
+ For wizard-style forms:
94
+
95
+ 1. Complete current step
96
+ 2. Click next/continue button
97
+ 3. Wait for next step to load
98
+ 4. Repeat until completion
99
+ 5. Verify final submission
100
+
101
+ ## File Upload Testing
102
+
103
+ 1. Use `opendevbrowser_run` to execute file input script
104
+ 2. Verify file preview appears
105
+ 3. Test file type restrictions
106
+ 4. Test file size limits
107
+
108
+ ## Form Reset Testing
109
+
110
+ 1. Fill form with data
111
+ 2. Click reset button
112
+ 3. Verify all fields cleared
113
+ 4. Verify any default values restored
@@ -0,0 +1,98 @@
1
+ ---
2
+ name: login-automation
3
+ description: Best practices for automating login flows and authentication testing with OpenDevBrowser.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Login Automation Skill
8
+
9
+ ## Credential Handling
10
+
11
+ Store credentials securely using environment variables or config files outside the repository.
12
+
13
+ Never hardcode credentials in test scripts or skill files.
14
+
15
+ Use `opendevbrowser_type` with `sensitive: true` (if available) for password fields.
16
+
17
+ ## Form Detection Workflow
18
+
19
+ 1. Take a snapshot to identify login form elements:
20
+ ```
21
+ opendevbrowser_snapshot
22
+ ```
23
+
24
+ 2. Look for common patterns:
25
+ - Input fields with `type="email"`, `type="text"`, `name="username"`
26
+ - Input fields with `type="password"`
27
+ - Submit buttons with text containing "Sign in", "Log in", "Submit"
28
+
29
+ 3. Use refs to target form elements reliably.
30
+
31
+ ## Authentication Flow
32
+
33
+ 1. Navigate to login page:
34
+ ```
35
+ opendevbrowser_goto url="https://example.com/login"
36
+ ```
37
+
38
+ 2. Wait for form to load:
39
+ ```
40
+ opendevbrowser_wait state="networkidle"
41
+ ```
42
+
43
+ 3. Take snapshot to get refs:
44
+ ```
45
+ opendevbrowser_snapshot
46
+ ```
47
+
48
+ 4. Enter username/email:
49
+ ```
50
+ opendevbrowser_type ref="[email-input-ref]" text="user@example.com"
51
+ ```
52
+
53
+ 5. Enter password:
54
+ ```
55
+ opendevbrowser_type ref="[password-input-ref]" text="password123"
56
+ ```
57
+
58
+ 6. Click submit:
59
+ ```
60
+ opendevbrowser_click ref="[submit-button-ref]"
61
+ ```
62
+
63
+ 7. Wait for navigation:
64
+ ```
65
+ opendevbrowser_wait state="networkidle"
66
+ ```
67
+
68
+ ## Error Handling
69
+
70
+ After login attempt, verify success:
71
+
72
+ 1. Check URL changed to expected destination
73
+ 2. Look for error messages in snapshot
74
+ 3. Verify session cookies are set via network poll
75
+
76
+ Common failure patterns:
77
+ - "Invalid credentials" messages
78
+ - CAPTCHA challenges
79
+ - Multi-factor authentication prompts
80
+ - Rate limiting or lockout
81
+
82
+ ## MFA Handling
83
+
84
+ For TOTP-based MFA:
85
+ 1. Generate code using appropriate library
86
+ 2. Wait for MFA input field to appear
87
+ 3. Enter the code
88
+ 4. Submit
89
+
90
+ For SMS/Email MFA:
91
+ - Requires manual intervention or test account bypass
92
+
93
+ ## Session Persistence
94
+
95
+ Use persistent browser profiles to maintain sessions across runs:
96
+ ```
97
+ opendevbrowser_launch profile="test-user" persistProfile=true
98
+ ```
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: opendevbrowser-best-practices
3
+ description: Use when the user asks to write browser scripts, automate navigation, use snapshot refs, or extract DOM elements. Provides script-first, snapshot/ref guidance.
4
+ version: 0.1.0
5
+ ---
6
+
7
+ # OpenDevBrowser Best Practices
8
+
9
+ Use this guide to generate fast, reliable, script-first workflows without bloating tools or output.
10
+
11
+ ## Core Workflow (Snapshot -> Refs -> Actions)
12
+
13
+ Prefer the snapshot/ref loop as the primary interaction model:
14
+
15
+ 1. Navigate or focus the target page.
16
+ 2. Capture a snapshot to obtain stable refs.
17
+ 3. Act on refs (click, type, select, scroll).
18
+ 4. Re-snapshot after navigation or large DOM changes.
19
+
20
+ Use refs instead of raw selectors whenever possible.
21
+
22
+ ## Script-First Execution
23
+
24
+ Batch related actions in a single run to reduce round-trips:
25
+
26
+ - Use `opendevbrowser_run` for multi-step actions.
27
+ - Keep steps small and deterministic.
28
+ - End each run with a state check (snapshot or targeted extraction).
29
+
30
+ Match the arguments used in the single-action tools.
31
+
32
+ ## Waiting and Stability
33
+
34
+ Stabilize the page before acting:
35
+
36
+ - Use `opendevbrowser_wait` after navigation and before interacting with newly rendered UI.
37
+ - Prefer `networkidle` or `load` when the UI is fully dynamic.
38
+ - Wait for a ref state when targeting specific elements.
39
+
40
+ ## Token-Efficient Extraction
41
+
42
+ Keep outputs small and scoped:
43
+
44
+ - Use `opendevbrowser_dom_get_text` or `opendevbrowser_dom_get_html` only on specific refs.
45
+ - Avoid dumping full page HTML.
46
+ - Use snapshot cursor paging when content is large.
47
+
48
+ ## Debug Signals (Lightweight)
49
+
50
+ Use polling tools only when needed:
51
+
52
+ - Use `opendevbrowser_console_poll` to check for runtime errors.
53
+ - Use `opendevbrowser_network_poll` to confirm API calls and statuses.
54
+
55
+ ## Example Patterns
56
+
57
+ ### Login Flow (Batch)
58
+
59
+ 1. `goto` login URL.
60
+ 2. `wait` for page load.
61
+ 3. `snapshot` to get refs.
62
+ 4. `type` email/password refs.
63
+ 5. `click` submit ref.
64
+ 6. `wait` for navigation.
65
+ 7. `snapshot` to confirm state.
66
+
67
+ ### Targeted Extraction
68
+
69
+ 1. `snapshot` to get ref for the desired element.
70
+ 2. `dom_get_text` on that ref.
71
+
72
+ ## Mode Guidance
73
+
74
+ - Use Mode A (managed) by default for zero-config operation.
75
+ - Use Mode C (extension) only when existing logged-in tabs are required.
76
+
77
+ ## Safe Defaults
78
+
79
+ - Keep CDP local-only by default.
80
+ - Redact secrets in snapshot output.
81
+ - Avoid raw CDP unless explicitly enabled.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: opendevbrowser-continuity-ledger
3
+ description: Maintain an OpenDevBrowser continuity ledger in opendevbrowser_continuity.md for long-running tasks and resumable work.
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # OpenDevBrowser Continuity Ledger
8
+
9
+ Use a lightweight ledger to keep long-running tasks on track across sessions or context compaction.
10
+
11
+ ## When to use
12
+ - Multi-step work that spans several actions
13
+ - Refactors, migrations, or release work
14
+ - Investigations with multiple findings
15
+ - Any task likely to resume later
16
+
17
+ ## Ledger file
18
+ - Always use `opendevbrowser_continuity.md` at the repo root.
19
+ - Create it if it does not exist.
20
+ - Keep it short and factual.
21
+
22
+ ## Exact template (copy as-is)
23
+
24
+ ```markdown
25
+ # OpenDevBrowser Continuity Ledger
26
+
27
+ Goal (incl. success criteria):
28
+ - Constraints/Assumptions:
29
+ - Key decisions:
30
+ - State:
31
+ - Done:
32
+ - Now:
33
+ - Next:
34
+ - Open questions (UNCONFIRMED if needed):
35
+ - Working set (files/ids/commands):
36
+ ```
37
+
38
+ ## Update rules
39
+ 1. At the start of a long task, read the ledger and refresh Goal/Now/Next.
40
+ 2. Update the ledger when goals, decisions, or progress state change.
41
+ 3. Record important tool outcomes briefly.
42
+ 4. If context is lost, rebuild the ledger from visible state and mark gaps as `UNCONFIRMED`.
43
+
44
+ ## Reply pattern
45
+ Start replies with a short "Ledger Snapshot" (Goal + Now/Next + Open questions) when the ledger is in use.