Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) for Openclaw

An automated browser-automation agent designed to manage course enrollment, video playback, and study hour tracking on the China Tobacco Network Academy platform.

gandli
v1.0.0
Jun 18, 2026
0
407
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install cttc-auto-learn

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install cttc-auto-learn using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Tobacco Network Academy Auto Learning Skill (cttc-auto-learn)?

The Tobacco Network Academy Auto Learning skill (cttc-auto-learn) is a highly efficient browser-automation workflow that streamlines video study and credit accumulation on the mooc.ctt.cn platform. Powered by Playwright and Python, this AI-ready skill acts as a hands-free study assistant capable of completing login routines, selecting target courses, tracking metrics, and resolving common platform session timeouts without manual intervention.

By deploying this skill within the Openclaw Skills framework, developers and users can completely automate tedious digital learning tasks. The agent automatically handles QR-code login generation, keeps track of the active user state via secure JSON, and employs advanced anti-idle overrides, crash recovery systems, and multi-tab browser constraints to bypass common platform limits.

Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) Use Cases

  • Hands-free completion of mandatory study hours on the China Tobacco Network Academy (mooc.ctt.cn).
  • Automated specialized topic progression and task-oriented course tracking.
  • Seamless progress resumption during multi-hour video training modules.
  • Eliminating the need to monitor long-running online course progression manually.

How Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) Works

  1. Environment Setup: The agent checks for Python 3.11+ and clones the repository into the user's workspace, configuring dependencies using the uv package manager.
  2. Session Sanitation: Extraneous browser instances are terminated and cached Python outputs are cleared to establish an isolated workspace.
  3. Dual QR Authentication: The runner initiates Playwright, navigating the browser to generate both WeChat and Mobile App QR login codes. These codes are saved locally and monitored via the framenavigated event.
  4. Credential Persistent Storage: Once authenticated via scan, the script instantly intercepts the response, serializes login state keys into a local file, and shuts down the browser.
  5. Intelligent Playback Loop: Using target modes (hours, topics, courses, tasks), the skill queries course APIs, triggers video elements, closes unneeded browser tabs, and implements anti-idle cursor-movement events.
  6. Telemetry Broadcasting: Telemetry data is exported to a local JSON payload every 30 seconds, allowing agents or CLI dashboards to display progress in real-time.

Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) Setup

Prerequisites

Verify that Python 3.11+, the uv tool, and Chrome/Playwright dependencies are installed on your host system.

Step 1: Clone the Skill Repository

# Check for folder existence and clone the source code
if [ ! -d ~/Desktop/cttc-auto-learn ]; then
  git clone https://github.com/gandli/cttc-auto-learn.git ~/Desktop/cttc-auto-learn
fi
cd ~/Desktop/cttc-auto-learn

Step 2: Sync Virtual Environment Dependencies

uv sync

Step 3: Run Setup and Perform First Login

Initiate the login script to render the QR codes. Check the log file for code generation signals, read the output images, and complete the WeChat or Mobile App scan.

uv run python main.py

After logging in, credentials will be saved under output/auth-state.json to bypass subsequent logins.

Step 4: Configure Study Modes

You can instruct the agent to run under four distinctive automated modes:

  • Study Hours Mode (Default): uv run python main.py --mode hours
  • Special Topics Mode: uv run python main.py --mode topics
  • Courses Completion Mode: uv run python main.py --mode courses
  • Assigned Tasks Mode: uv run python main.py --mode tasks

Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) Data Schema & Taxonomy

Directory Structure & File Assets

The skill persists progress, configurations, and scan codes inside the local file system:

Path Description
output/auth-state.json Encrypted session token and authentication keys to bypass manual scan prompts.
output/qrcode-app.png App-specific login QR code dynamically updated on expiration.
output/qrcode-wechat.png WeChat login QR code dynamically updated on expiration.
output/status.json Real-time state dump payload (written every 30 seconds).
logs/cttc.log Persistent log files recording runtime info, event frames, and errors.

Telemetry Schema (status.json)

Field Name Type Description
status string Playback state (playing, completed, or error).
current_video string Name of the video course currently active in the Playwright DOM.
video_progress float Percentage of player progress (0.0 to 100.0).
api_completed_rate integer Server-side progress registration rate.
study_hours_current float Current total hours completed on the active account.
study_hours_target float Milestones configured for execution (e.g., 50.0).
courses_completed integer Metric counting finalized video modules.
courses_pending integer Count of indexed modules remaining in queue.
courses_total integer Total courses registered inside the current workspace.
errors_count integer Rolling error tally for automated monitoring loops.
stall_recoveries integer Number of active video recovery routines fired.
uptime_seconds integer Cumulative runtime metric of the script.
last_update string ISO timestamp of the latest status generation.

Tobacco Network Academy Auto Learning Skill (cttc-auto-learn) Advanced Features

  • Dual Scan Logic: Simultaneous generation of WeChat and APP login codes featuring automatic polling and local token renewal.
  • Encrypted Progression Processing: Bypasses basic API blocks by processing and dispatching progress calls with native AES-128-ECB cryptography.
  • Anti-Idle Mouse Simulation: Moves the cursor programmatically every 25 minutes inside the DOM sandbox to avoid idle logout checks.
  • Mutex Lock Management: Employs physical file locks to restrict script execution to a single instance, protecting files against read/write errors.
  • Modal Overrides: Discovers and force-closes generic modal overlay components on the fly without disrupting HTML5 core players.
  • Terminal GUI Dashboard: Standalone monitoring framework (scripts/monitor.py) containing interactive terminal bars and output telemetry visualizations.
  • Auto-Retry Failover: Crash-safe automation with up to 5 automatic system re-initializations upon facing unexpected memory/GPU drops.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*