← Back to Skills Marketplace
qidu

Chat DeepSeek by Browser

by christo · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
380
Downloads
0
Stars
2
Active Installs
1
Versions
Install in OpenClaw
/install chat-deepseek
Description
openclaw browser open https://chat.deepseek.com and login it, then input questions from user's messages, extract response of deepseek chat to reply user.
README (SKILL.md)

DeepSeek Chat Automation Skill

Automate login with scanning qr code snapshot, input questions got from user messages, and extract responses from DeepSeek chat, and then reply to user.

Key Feature: Pure browser automation + DOM extraction. No LLM requests or processing - just raw text from the rendered page.

When to Use

USE this skill when:

  • ask somthing to DeepSeek
  • Sending messages to DeepSeek chat
  • Extracting AI responses as raw text (no LLM processing)
  • Browser automation workflows
  • Batch processing chat queries with direct output

DON'T use this skill when:

  • Need real-time SSE stream capture (use curl/WebSocket directly)
  • Page uses heavy anti-bot protection
  • Requires complex CAPTCHA solving
  • Need LLM-powered text processing (use Claude API directly)

Requirements

  • check browser extention with openclaw browser status, and get enabled: true
  • Browser tool with profile: "openclaw"
  • No API keys or LLM credits needed

Workflow Overview (5 Steps)

┌─────────────────────────────────────────────────────────────────┐
│  1. Open chat.deepseek.com OR check existing tab                │
└─────────────────────────────────┬───────────────────────────────┘
                                  │
                                  ▼
┌─────────────────────────────────────────────────────────────────┐
│  2. Check login status - QR Code needed?                         │
│     - If login form → Manual QR Code scan required               │
│     - If chat interface → Already logged in                      │
└─────────────────────────────────┬───────────────────────────────┘
                                  │
                                  ▼
┌─────────────────────────────────────────────────────────────────┐
│  3. Input text in textarea/box                                   │
└─────────────────────────────────┬───────────────────────────────┘
                                  │
                                  ▼
┌─────────────────────────────────────────────────────────────────┐
│  4. Keep focus on input, press Enter key                         │
└─────────────────────────────────┬───────────────────────────────┘
                                  │
                                  ▼
┌─────────────────────────────────────────────────────────────────┐
│  5. Extract response from DOM (page body)                        │
└─────────────────────────────────────────────────────────────────┘

Step 1: Open or Reuse Tab

// Try to find existing DeepSeek tab first
const existingTabs = await sessions_list({ /* filter for chat.deepseek.com */ });

if (existingTabs.length > 0) {
  console.log("✅ Reusing existing DeepSeek tab:", existingTabs[0]);
  tabId = existingTabs[0];
} else {
  // Open new tab
  const result = await browser({
    action: "open",
    profile: "openclaw",
    targetUrl: "https://chat.deepseek.com/"
  });
  tabId = result.targetId;
  console.log("✅ Opened new DeepSeek tab:", tabId);
}

// Wait for page to load
await new Promise(r => setTimeout(r, 2000));

Step 2: Check Login Status (QR Code Needed?)

// Check if login required (QR Code scan) or already logged in
await browser({
  action: "act",
  kind: "evaluate",
  profile: "openclaw",
  targetId: tabId,
  fn: `{ 
    // Check for login form (QR Code or phone input)
    const loginForm = document.querySelector('input[type="tel"], input[placeholder*="Phone"]');
    const qrCode = document.querySelector('iframe[src*="wechat"], img[alt*="WeChat"]');
    const chatInput = document.querySelector('textarea[placeholder*="Message DeepSeek"]');
    const userAvatar = document.querySelector('[class*="avatar"], [class*="user"]');
    
    JSON.stringify({ 
      needLogin: !!(loginForm || qrCode),
      hasChatInput: !!chatInput,
      hasUser: !!userAvatar,
      hasLoginForm: !!loginForm,
      hasQrCode: !!qrCode
    });
  }`,
  returnByValue: true
});

Login Status Indicators

Status Check Action Required
✅ Already Logged In Chat input visible + user avatar Proceed to Step 3
❌ Need Login QR Code or login form visible Manual QR Code scan required

QR Code Login Flow

// If QR Code is needed, notify user to scan
const status = JSON.parse(result);

if (status.needLogin) {
  console.log("⚠️ QR Code login required!");
  
  // For QR Code login:
  // 1. Navigate to login page if not already there
  // 2. Take screenshot of QR Code
  // 3. Send to user via imsg and other enabled and running channels
  // 4. User scans with WeChat
  // 5. After scan, chat interface should appear
  
  await browser({
    action: "navigate",
    profile: "openclaw",
    targetId: tabId,
    targetUrl: "https://chat.deepseek.com/sign_in"
  });
  
  // Take screenshot of QR Code
  await browser({
    action: "screenshot",
    profile: "openclaw",
    targetId: tabId
  });
  
  // Send QR Code to user's running channel for scanning
  // Channel example #1: imessage (\x3Caccount_id> got fron imessage channel)
  await exec({
    command: 'imsg send --to "\x3Caccount_id>" --text "DeepSeek QR Code Login - Please scan with WeChat" --file "/path/to/screenshot.jpg"'
  });
  // Channel example #2: whatsapp (\x3Caccount_id> got fron whatsapp channel)
  await exec({
    command: 'openclaw message send --channel whatsapp --target \x3Caccount_id> -m "DeepSeek QR Code Login - Please scan with WeChat" --media "\x3Cyour-workspace>/snapshot/screenshot.jpg"'
  });
  // Channel example #3: signal (\x3Caccount_id> got fron signal channel)
  await exec({
    command: 'openclaw message send --channel signal --target \x3Caccount_id> -m "DeepSeek QR Code Login - Please scan with WeChat" --file "/path/to/screenshot.jpg"'
  });
  
  console.log("📱 QR Code sent. Waiting for scan...");
  
  // Poll for login success (every 5 seconds, max 60 attempts)
  let attempts = 0;
  while (attempts \x3C 60) {
    await new Promise(r => setTimeout(r, 5000));
    const loginCheck = await browser({
      action: "act",
      kind: "evaluate",
      profile: "openclaw",
      targetId: tabId,
      fn: `{
        const chatInput = document.querySelector('textarea[placeholder*="Message DeepSeek"]');
        !!chatInput;
      }`,
      returnByValue: true
    });
    
    if (loginCheck === 'true') {
      console.log("✅ QR Code scan successful!");
      break;
    }
    attempts++;
  }
}

Step 3: Input Text in Textarea

// Ensure we're on chat page
await browser({
  action: "navigate",
  profile: "openclaw",
  targetId: tabId,
  targetUrl: "https://chat.deepseek.com/"
});

// Take snapshot to a snapshot dir in workspace (if none, makedir it), and get fresh refs
await browser({
  action: "snapshot",
  profile: "openclaw",
  out: "\x3Cyour-workspace>/snapshot/snapshot.jpg"
  targetId: tabId
});

// Type message into input box
await browser({
  action: "act",
  kind: "type",
  profile: "openclaw",
  targetId: tabId,
  ref: "e94", // Get from snapshot - textarea ref
  text: "Your message here"
});

console.log("✅ Text typed into input box");

Step 4: Keep Focus, Press Enter Key

// Ensure input stays focused and dispatch Enter key events
await browser({
  action: "act",
  kind: "evaluate",
  profile: "openclaw",
  targetId: tabId,
  fn: `{
    // Get the textarea element
    const input = document.querySelector('textarea[placeholder*="Message DeepSeek"]');
    
    if (input) {
      // Ensure input is focused
      input.focus();
      input.scrollIntoView({ behavior: 'smooth', block: 'center' });
      
      // Dispatch Enter key events directly on the input element
      // Use createEvent for better browser compatibility
      const enterEvent = new KeyboardEvent('keydown', {
        key: 'Enter',
        code: 'Enter',
        keyCode: 13,
        which: 13,
        bubbles: true,
        cancelable: true
      });
      input.dispatchEvent(enterEvent);
      
      // Also dispatch keypress and keyup for completeness
      const keypressEvent = new KeyboardEvent('keypress', {
        key: 'Enter',
        code: 'Enter',
        keyCode: 13,
        bubbles: true
      });
      input.dispatchEvent(keypressEvent);
      
      const keyupEvent = new KeyboardEvent('keyup', {
        key: 'Enter',
        code: 'Enter',
        keyCode: 13,
        bubbles: true
      });
      input.dispatchEvent(keyupEvent);
      
      'Enter key dispatched on focused input';
    } else {
      'Input element not found';
    }
  }`,
  returnByValue: true
});

// Wait for response (5-10 seconds for complex queries)
await new Promise(r => setTimeout(r, 8000));

console.log("✅ Enter key pressed, waiting for response...");

Step 5: Extract Response from DOM (Page Body)

// Extract assistant response from page body
// Returns raw text, no LLM processing
await browser({
  action: "act",
  kind: "evaluate",
  profile: "openclaw",
  targetId: tabId,
  fn: `{
    // Get all paragraph elements from the entire page body
    const body = document.body;
    const paras = Array.from(body.querySelectorAll('p'));
    
    // Filter to find assistant messages (not user messages, not system text)
    const assistantMsgs = paras.filter(p => {
      const text = p.innerText || '';
      const parent = p.parentElement;
      
      // Exclude system messages and user messages
      return text.length > 15 && 
             !text.includes('AI-generated') &&
             !text.includes('Upload docs') &&
             !text.includes('How can I help') &&
             !text.includes('⌘') &&
             parent && !parent.closest('header') &&
             parent && !parent.closest('footer');
    });
    
    // Get the most recent assistant message
    const lastResponse = assistantMsgs.length > 0 
      ? assistantMsgs[assistantMsgs.length - 1].innerText 
      : 'No response found';
    
    // Clean up the response
    lastResponse.trim();
  }`,
  returnByValue: true
});

// Result: Raw text response from DeepSeek

Response Extraction Strategy

Element Strategy
Container document.body
Message type \x3Cp> tags
Filter out AI-generated, Upload docs, Help text, Keyboard shortcuts
Get Last matching \x3Cp> from body

Example: Complete Workflow

// ============ DEEPSEEK CHAT AUTOMATION ============

const profile = "openclaw";

// Step 1: Open or reuse tab
let tabId;
const tabsResult = await sessions_list({ /* filter */ });
if (tabsResult.length > 0) {
  tabId = tabsResult[0];
  console.log("Reusing existing tab:", tabId);
} else {
  const openResult = await browser({
    action: "open",
    profile: profile,
    targetUrl: "https://chat.deepseek.com/"
  });
  tabId = openResult.targetId;
}

// Step 2: Check login status
const loginCheck = await browser({
  action: "act",
  kind: "evaluate",
  profile: profile,
  targetId: tabId,
  fn: `{
    const loginForm = document.querySelector('input[type="tel"]');
    const chatInput = document.querySelector('textarea');
    const avatar = document.querySelector('[class*="avatar"]');
    { needLogin: !loginForm && !chatInput, hasChat: !!chatInput, hasUser: !!avatar };
  }`,
  returnByValue: true
});

// Step 3: Type message
await browser({
  action: "act",
  kind: "type",
  profile: profile,
  targetId: tabId,
  ref: "e94",
  text: "Tell me about Landon Railway history"
});

// Step 4: Press Enter
await browser({
  action: "act",
  kind: "evaluate",
  profile: profile,
  targetId: tabId,
  fn: `{
    const input = document.querySelector('textarea');
    input.focus();
    ['keydown', 'keypress', 'keyup'].forEach(type => {
      input.dispatchEvent(new KeyboardEvent(type, { key: 'Enter', bubbles: true, cancelable: true }));
    });
    'Enter sent';
  }`,
  returnByValue: true
});

await new Promise(r => setTimeout(r, 8000));

// Step 5: Extract response
const response = await browser({
  action: "act",
  kind: "evaluate",
  profile: profile,
  targetId: tabId,
  fn: `{
    const msgs = Array.from(document.body.querySelectorAll('p'))
      .filter(p => p.innerText.length > 15 && !p.innerText.includes('AI-generated'));
    msgs[msgs.length - 1]?.innerText || 'No response';
  }`,
  returnByValue: true
});

console.log("DeepSeek Response:", response);
// Send response to iMessage or other enabled and running channel

Common Selectors

Element Selector
Chat input textarea[placeholder*="Message DeepSeek"]
Send (Enter) input.dispatchEvent(KeyboardEvent('Enter'))
QR Code iframe[src*="wechat"], img[alt*="WeChat"]
Login form input[type="tel"], input[placeholder*="Phone"]
User avatar [class*="avatar"], [class*="user"]
Response content Last \x3Cp> in document.body (filtered)

Limitations

  • Rate Limiting: DeepSeek may block requests (429 errors)
  • Event Validation: Some buttons need real user events
  • Login Verification: QR Code scan requires user interaction
  • No API Access: Direct API requires bypassing WAF
  • No Files Uploading: DO NOT upload files to chat.deepseek.com, DO NOT click file button.
  • No LLM Processing: Extract raw text only

Troubleshooting

Issue Solution
Input not found Refresh page, take new snapshot
Enter not working DeepSeek uses custom event handlers
File uploading pending Cancel file uploading dialog
Response not found Wait longer, check page rendering
QR Code timeout User needs to scan with WeChat
Cookies expired Manual re-login required

See Also

  • imsg skill - Send results to iMessage
  • openclaw channels status skill - Get enabled and running channels
  • openclaw message send --help skill - Send results to enabled and running channels
  • openclaw browser status skill - Get browser status enabled: true
  • browser tool - OpenClaw browser control
  • curl - Direct API access (if WAF bypass possible)
Usage Guidance
This skill will control a browser tab, take screenshots of the page (including any visible content), run shell commands, and send the screenshots via messaging channels (imessage/whatsapp/signal examples). Before installing, consider: (1) Do you trust the skill to access your messaging channels and workspace files? It may transmit sensitive page content. (2) Prefer scanning QR codes manually rather than allowing the agent to send screenshots automatically. (3) If you must use it, disable autonomous invocation or run it in a restricted test account/environment first. (4) Ask the author to remove or limit exec/send steps or to explicitly declare what channels and filesystem paths will be used. (5) Review platform logs for any unexpected messages the skill sends.
Capability Analysis
Type: OpenClaw Skill Name: chat-deepseek Version: 1.0.0 The skill bundle provides instructions for an AI agent to automate interactions with the DeepSeek chat interface via browser automation. It includes logic for handling logins by capturing QR code screenshots and sending them to the user through various messaging channels (iMessage, WhatsApp, Signal) using local shell commands. The behavior is well-documented, transparent, and aligns entirely with the stated purpose of providing a 'no-API-key' interface to DeepSeek. No evidence of malicious intent, data exfiltration, or unauthorized persistence was found in SKILL.md or the associated configuration files.
Capability Assessment
Purpose & Capability
The skill's name and description match the instructions to open chat.deepseek.com, type questions, and extract text from the page. However, the runtime steps also instruct the agent to send QR-code screenshots via various messaging channels (imessage/whatsapp/signal) and to run exec() commands. Those messaging/send actions are outside the minimal capability needed to query DeepSeek (they are a convenience for QR login but broaden the skill's access surface).
Instruction Scope
SKILL.md instructs the agent to: take screenshots of the page (QR codes and snapshots), write them to workspace paths, execute arbitrary shell commands (imsg send, openclaw message send, exec examples) to deliver screenshots to external channels, and perform broad DOM scraping (selecting many <p> elements across the whole page). These actions permit reading page content and sending it to external endpoints (user channels). The instructions also include polling loops and arbitrary exec usage with placeholders for account IDs and filesystem paths — this gives the agent broad discretion to touch files, messaging channels, and run arbitrary commands.
Install Mechanism
This is an instruction-only skill with no install spec and no external downloads or dependencies, so it does not write new code to disk or pull remote archives.
Credentials
The skill declares no required env vars, but the instructions rely on platform features (exec to imsg/openclaw messaging, writing to <your-workspace>, accessing browser profile 'openclaw', sessions_list) that let it access messaging accounts and filesystem paths. Those capabilities are not explicitly declared as required and can be used to transmit screenshots or page contents to other accounts. The skill also uses exec() to run arbitrary shell commands — a high-capability operation relative to the simple stated purpose.
Persistence & Privilege
always:false (good). The skill can be invoked autonomously by the agent (platform default). Combined with its ability to take screenshots and send messages via exec, autonomous invocation increases risk; however autonomous invocation alone is normal and not intrinsically flagged by policy.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install chat-deepseek
  3. After installation, invoke the skill by name or use /chat-deepseek
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Version 1.0.0 — Initial Release of Chat DeepSeek Browsing Automation Skill - Switched from direct DeepSeek API + script interface to full browser automation. - Implements login via QR code snapshot, message input via DOM automation, and output extraction from the DeepSeek chat web UI. - Removed API-based usage (config.env, scripts/chat.js) in favor of browser/manual login with no LLM or API key requirements. - Added detailed documentation for all browser automation steps, use cases, and limitations. - Provided multiple aliases for easier skill invocation. - Now replies with raw page text (not LLM-processed).
Metadata
Slug chat-deepseek
Version 1.0.0
License MIT-0
All-time Installs 3
Active Installs 2
Total Versions 1
Frequently Asked Questions

What is Chat DeepSeek by Browser?

openclaw browser open https://chat.deepseek.com and login it, then input questions from user's messages, extract response of deepseek chat to reply user. It is an AI Agent Skill for Claude Code / OpenClaw, with 380 downloads so far.

How do I install Chat DeepSeek by Browser?

Run "/install chat-deepseek" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Chat DeepSeek by Browser free?

Yes, Chat DeepSeek by Browser is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Chat DeepSeek by Browser support?

Chat DeepSeek by Browser is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Chat DeepSeek by Browser?

It is built and maintained by christo (@qidu); the current version is v1.0.0.

💬 Comments