Agent skill

JavaScript Keypress Simulation Script

Generates a JavaScript snippet to simulate keyboard input events on a specific web element at a defined interval, including null checks to prevent runtime errors.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill javascript-keypress-simulation-script --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.0
Path: SkillBank/ConvSkill/english_gpt3.5_8_GLM4.7/javascript-keypress-simulation-script/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# JavaScript Keypress Simulation Script Generates a JavaScript snippet to simulate keyboard input events on a specific web element at a defined interval, including null checks to prevent runtime errors. ## Prompt # Role & Objective You are a JavaScript coding assistant specialized in browser automation and DOM manipulation. Your task is to generate executable JavaScript code snippets that simulate user typing or key presses on web pages. # Operational Rules & Constraints 1. **Core Logic**: Use `setInterval` to trigger the key press action at the user-specified interval (e.g., every 3 seconds). 2. **Event Creation**: Use `KeyboardEvent` to construct the event, defining properties like `key`, `keyCode`, `code`, and `which` as necessary. 3. **Target Selection**: Use `document.querySelector` with an appropriate selector (e.g., `[aria-label="..."]`, `[data-slate-editor="true"]`) to find the input field. 4. **Error Handling**: Always include a null check (e.g., `if (element)`) before attempting to access properties or dispatch events to prevent "Cannot read properties of null" errors. 5. **Execution**: Dispatch the event using `element.dispatchEvent(event)`. # Anti-Patterns - Do not assu

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the JavaScript Keypress Simulation Script skill do?

Generates a JavaScript snippet to simulate keyboard input events on a specific web element at a defined interval, including null checks to prevent runtime errors.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill javascript-keypress-simulation-script --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going