CommunityResearch & Data Analysisgithub.com

human-like-automation

RPA human-like mouse trajectories/typing (anti-bot detection): Bezier curves, random delays, hesitant clicks, character-by-character typing. Suitable for RPA testing and batch operations to avoid bans.

What is human-like-automation?

This skill, `shuangying0001-beep/human-like-automation`, provides a set of pure functions (Node ESM, zero dependencies) that transform mechanical browser automation into human-like interactions. It generates Bezier curve mouse paths, adds random delays, simulates hesitant clicks with occasional misclicks, types text character by character with natural pauses, and scrolls in steps. Designed for any Playwright-style `page` object (duck typing), it's ideal for RPA tasks, automated testing, and data scraping where anti-bot detection is a concern. The skill includes a `HumanizeScheduler` that adjusts operation frequency based on local time periods, further enhancing realism. While it focuses purely on interaction rhythm and trajectory shape, it can be combined with fingerprint-altering tools like `playwright-stealth` for a comprehensive human-like automation solution.

Works with~Claude Code~Codex CLI~Cursor
npx skills add shuangying0001-beep/human-like-automation

Installed? Explore more Research & Data Analysis skills: affaan-m/uspto-database, affaan-m/scholar-evaluation, affaan-m/literature-review · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

human-like-automation —— Human-like Browser Interaction

Turn "mechanical" automation into human-like interaction with a natural rhythm: mouse moves in curves, clicks hesitate, typing has pace, scrolling is step-by-step. Pure functions (Node ESM, zero dependencies). Interaction functions accept any Playwright-style page object (duck typing).

Use Cases

  • RPA / Web automation: Make scripted mouse and keyboard behavior more human-like, reducing the risk of anti-bot detection
  • Automated testing: Simulate real user operation paths
  • Data scraping: Combine with anti-detection browser configurations for more natural operation pacing

Provided Functions

FunctionDescription
generateMousePath(x0,y0,x1,y1,steps?)Generate an array of Bezier curve mouse trajectory points (with easing + jitter + occasional pauses)
humanMouseMove(page, x, y)Move the mouse point by point with random delays between points
humanClick(page, selector, opts?)Human-like click: hesitant hover / 10% misclick correction / pixel offset
humanScroll(page, opts?)Step-by-step scrolling with pauses
humanType(page, selector, text)Character-by-character input with random pauses
simulateReading(page, duration?)Random scrolling / moving / pausing to simulate reading
randomDelay(min,max) / waitRandom(min,max)Random delay utilities
HumanizeSchedulerProvides frequency/interval coefficients based on local time period, supports random pauses

Usage

import { humanClick, HumanizeScheduler } from './scripts/humanize.mjs';

// 1) Direct human-like click on a Playwright page
await humanClick(page, '.search-button', { hoverProbability: 0.8 });

// 2) Scheduler: automatically slow down / pause based on time period
const sched = new HumanizeScheduler('D', 8); // Timezone offset +8
const { frequencyMultiplier, shouldPause } = sched.calculate();
const delay = sched.getAdjustedDelay(5000);   // Adjust base delay by coefficient

Design Points (Neutral & Compliant)

  • This skill only changes operation rhythm and trajectory shape, which is a general interaction realism capability.
  • Do not use it to violate the terms of service or laws of target sites.
  • When combined with playwright-stealth (fingerprint environment configuration), it forms a complete "human-like" automation solution.

Self-Test

node scripts/humanize.mjs --selftest

Related Skills