Skip to content
Back to skills

Web Research Macro

ASecurity

Unified web research pipeline combining browser navigation, content sanitization, and document extraction into a single call. Use when you need to extract clean text from websites requiring JavaScript rendering or login.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 19, 2026
ai-agentsjavascriptpythonjavabashapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 6 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add Stranglehold/Exocortex --skill web-research-macro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Web Research Macro?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Web Research Macro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/stranglehold-web-research-macro/badge)](https://www.skillsdirectory.com/skills/stranglehold-web-research-macro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "web-research-macro"
description: "Unified web research pipeline combining browser navigation, content sanitization, and document extraction into a single call. Use when you need to extract clean text from websites requiring JavaScript rendering or login."
version: "1.0.0"
author: "agent"
tags: ["web", "research", "scraping", "extraction", "pipeline"]
trigger_patterns:
  - "extract content from website"
  - "scrape webpage text"
  - "get clean text from url"
  - "research website content"
---

# Web Research Macro Skill

## Overview
A unified skill that orchestrates browser_agent, content-sanitizer, and document_query into a single pipeline call. Extracts clean, safe text from websites requiring JavaScript rendering, handles logins, strips dangerous scripts, and returns sanitized content.

## Architecture
```
URL Input → Browser Agent (render + extract HTML) → Content Sanitizer (strip scripts, detect injections) → Document Query (extract text) → Clean Output
```

## Capabilities
- **JavaScript Rendering**: Executes JS via Playwright browser_agent
- **Login Handling**: Supports authentication flows
- **Content Sanitization**: Strips scripts, iframes, event handlers
- **Injection Detection**: Identifies prompt injection attempts
- **Text Extraction**: Returns clean text only, no HTML

## Usage

### Basic Usage
```python
from web_research import WebResearchMacro

researcher = WebResearchMacro()
result = researcher.extract("https://example.com/article")
print(result["clean_text"])  # Sanitized text content
print(result["is_safe"])     # True if no injection detected
```

### With Login Support
```python
result = researcher.extract(
    url="https://example.com/protected",
    login_url="https://example.com/login",
    username_selector="#username",
    password_selector="#password",
    submit_selector="#login-btn",
    credentials={"user": "myuser", "pass": "mypassword"}
)
```

### Batch Extraction
```python
urls = [
    "https://site1.com/article1",
    "https://site2.com/article2",
]
results = researcher.batch_extract(urls)
for url, data in results.items():
    print(f"{url}: {len(data['clean_text'])} chars")
```

## Output Format
```python
{
    "url": "https://example.com",
    "clean_text": "Extracted and sanitized text content...",
    "is_safe": True,
    "warnings": [],  # Any detected issues
    "metadata": {
        "title": "Page Title",
        "word_count": 1234,
        "extraction_time_ms": 5678
    }
}
```

## Dependencies
```bash
pip install playwright beautifulsoup4
playwright install chromium
```

## When to Use
- Extracting content from JavaScript-heavy websites
- Research tasks requiring multiple website visits
- Situations where raw HTML contains dangerous scripts
- Need for clean text without manual sanitization steps

Files in this skill

  • SKILL.md2.7 KB
  • test_web_research.py3.9 KB
  • web-research-macro/SKILL.md3.2 KB
  • web-research-macro/test_web_research.py3.9 KB
  • web-research-macro/web_research.py10.1 KB
  • web_research.py10.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.