Agent skill

Gen Test

by mvan231 in mvan231/Scriptable

Generate a Node.js test file for a Scriptable widget script, following the project's existing test conventions in tests/

MITAuto-check passed

Install Gen Test

skills CLI
$ npx skills add mvan231/Scriptable --skill gen-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install mvan231/Scriptable gen-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/mvan231/Scriptable.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/gen-test .claude/skills/gen-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
gen-test
GitHub stars
151
Token cost
~436 tokens
SKILL.md length
125 words
Files
1
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Generate a Node.js test file for a Scriptable widget script, following the project's existing test conventions in tests/

  • Works in 5 steps: Read the target .js script from the… → Read tests/scriptable-mocks.js to… → Identify pure/testable functions in the… → …
  • SKILL.md covers Steps and Rules
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Gen Test is an agent skill from mvan231/Scriptable. Generate a Node.js test file for a Scriptable widget script, following the project's existing test conventions in tests/

Its SKILL.md is about 440 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Node.js. The licence is MIT.

Example prompts

  • “/gen-test”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Read the target .js script from the project root
  2. Read tests/scriptable-mocks.js to understand available mock factories
  3. Identify pure/testable functions in the script (logic that doesn't require a live Scriptable runtime)
  4. Create tests/.test.js following the exact pattern used in existing test files
  5. Add the new test file to the files array in tests/runner.js so it runs automatically.

What it can do on your machine

Read from SKILL.md and the folder at commit 7effc1f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Gen Test loads about 436 tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 125 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~436

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from mvan231/Scriptable at commit 7effc1f, republished under its MIT licence (© mvan231). 125 words, ~436 tokens.

Download SKILL.mdSave it as .claude/skills/gen-test/SKILL.md (or your agent's skills folder).
name
gen-test
description
Generate a Node.js test file for a Scriptable widget script, following the project's existing test conventions in tests/
disable-model-invocation
true

Generate a test file for the Scriptable script named by the user (e.g. /gen-test Twitter Widget.js).

Steps

  1. Read the target .js script from the project root
  2. Read tests/scriptable-mocks.js to understand available mock factories
  3. Identify pure/testable functions in the script (logic that doesn't require a live Scriptable runtime)
  4. Create tests/<kebab-name>.test.js following the exact pattern used in existing test files:
javascript
// Tests for <ScriptName>.js
'use strict'

const {
  makeRequest, makeWebView, makeAlert, /* etc. — import only what's needed */
} = require('./scriptable-mocks')

// ─── Pure logic extracted from the script ────────────────────────────────────

// Copy or re-express pure functions from the script here so they can be tested
// without requiring the Scriptable runtime.

// ─── Tests ───────────────────────────────────────────────────────────────────

module.exports = async ({ test, describe, assert }) => {
  describe('<ScriptName>', () => {
    test('example: <function> returns expected value', () => {
      // arrange
      // act
      // assert
    })
  })
}
  1. Add the new test file to the files array in tests/runner.js so it runs automatically.

Rules

  • Only test logic that can run in plain Node.js — no Scriptable runtime APIs in test bodies
  • Use injected assert from Node's built-in assert module (strict mode)
  • Follow the existing naming: <kebab-case-script-name>.test.js
  • Aim for at least 3 meaningful tests covering happy path, edge case, and error case

© mvan231, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/gen-test of mvan231/Scriptable.

Open the folder on GitHubat commit 7effc1f

Compare with similar skills

Gen Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Gen Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Gen Test this skillmvan231/Scriptable151—~436Automated safety check: PassMIT
Chart Visualizationbytedance/deer-flow84k2 repos~840Automated safety check: PassMIT
Web Access via Browser CDPeze-is/web-access9.1k4 repos~2.2kAutomated safety check: PassMIT
Knap Markdown Templateskepano/obsidian-skills49k2 repos~986Automated safety check: PassMIT
Electron Multi-Process ArchitectureiOfficeAI/AionUi33k1 repos~1.8kAutomated safety check: PassApache-2.0
Chrome CDP Browser Controlzenstory-ai/oh-story-claudecode7.4k2 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Chart Visualization

    bytedance/deer-flow

    Picks a suitable chart type from 26 options for your data, maps the data to that chart's parameters and generates a chart image through a JavaScript script.

    84k GitHub starsUsed in 2 repos~840 tokens
    Data & AnalyticsAuto-check passed
  • Routes every web task, from searching to logged-in browsing, through a tiered choice of search, fetch, curl or a real Chrome or Edge session driven over CDP.

    9.1k GitHub starsUsed in 4 repos~2.2k tokens
    Productivity & AutomationAuto-check passed
  • Knap Markdown Templates

    kepano/obsidian-skills

    Renders Markdown notes from Knap templates and JSON data on the command line, including notes built from Defuddle web page output.

    49k GitHub starsUsed in 2 repos~986 tokens
    Documents & OfficeAuto-check passed
  • Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.

    33k GitHub starsUsed in 1 repo~1.8k tokens
    DevelopmentAuto-check passed
  • Chrome CDP Browser Control

    zenstory-ai/oh-story-claudecode

    Drives a Chrome window over the DevTools Protocol with the agent-browser CLI, so the agent can reuse your logged-in sessions, read pages and pull tokens.

    7.4k GitHub starsUsed in 2 repos~1.2k tokens
    Productivity & AutomationAuto-check passed
  • DeerFlow Smoke Test

    bytedance/deer-flow

    Walks through an end-to-end smoke test of a DeerFlow deployment: pull the latest code, deploy with Docker or locally, verify services, run health checks and write a report.

    84k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check: notes

More from mvan231/Scriptable

  • New Script

    mvan231/Scriptable

    Scaffold a new Scriptable widget script with required headers, FileManager setup, settings JSON pattern, and updateCheck boilerplate

    151 GitHub stars~529 tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Gen Test

What does Gen Test do?

Generate a Node.js test file for a Scriptable widget script, following the project's existing test conventions in tests/. Gen Test is an agent skill from mvan231/Scriptable.

How do I install Gen Test in Claude Code?

Run `npx skills add mvan231/Scriptable --skill gen-test -a claude-code`. Or copy the skill folder (.claude/skills/gen-test in mvan231/Scriptable) into .claude/skills/gen-test in your project. Claude Code loads it when a task matches its description.

How do I install Gen Test in Codex?

Run `npx skills add mvan231/Scriptable --skill gen-test -a codex`. Or copy the skill folder (.claude/skills/gen-test in mvan231/Scriptable) into .agents/skills/gen-test in your project. Codex loads it when a task matches its description.

Can I use Gen Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mvan231/Scriptable --skill gen-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/gen-test, .gemini/skills/gen-test, .github/skills/gen-test and .opencode/skills/gen-test in your project.

What does Gen Test need to run?

SKILL.md names no scripts, command-line tools or credentials: Gen Test is instructions for the agent only. Our summary lists: Node.js.

Does Gen Test access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Gen Test safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Gen Test use?

Gen Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Gen Test use?

About 436 tokens (SKILL.md is roughly 1.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Gen Test?

Skills that share tags, products or a category with Gen Test: Chart Visualization (bytedance/deer-flow, 84k stars), Web Access via Browser CDP (eze-is/web-access, 9.1k stars), Knap Markdown Templates (kepano/obsidian-skills, 49k stars) and Electron Multi-Process Architecture (iOfficeAI/AionUi, 33k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Gen Test?

mvan231 (a GitHub user) maintains it in mvan231/Scriptable, which has 151 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on August 26, 2026.

Source: mvan231/Scriptable on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.