Agent skill

Ok Script Codegen

by AliceJump in AliceJump/ok-end-field

Generate or refine Python automation code for ok-script task run methods from a description or screenshot.

AGPL-3.0Auto-check passedDevelopment

Install Ok Script Codegen

skills CLI
$ npx skills add AliceJump/ok-end-field --skill ok-script-codegen -a claude-code

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

GitHub CLI
$ gh skill install AliceJump/ok-end-field ok-script-codegen --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/AliceJump/ok-end-field.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ok-script-codegen .claude/skills/ok-script-codegen && 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
ok-script-codegen
GitHub stars
556
Token cost
~1k tokens
SKILL.md length
535 words
Files
2
Skills in repo
14
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Generate or refine Python automation code for ok-script task run methods from a description or screenshot.

  • Template matching
  • SKILL.md covers Output, Choose task APIs, Frames and loops and OCR and templates, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Frame refresh behavior

What it does

Ok Script Codegen is an agent skill from AliceJump/ok-end-field. Generate or refine Python automation code for ok-script task run methods from a description or screenshot. Use for OCR, template matching, clicks, waits, and frame refresh behavior.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Development, covering Project scaffolding. It works with Python. The repository describes itself as: 终末地 End Field Automation 基于ok-script开发的自动化. The licence is AGPL-3.0.

When your agent uses it

  • Template matching
  • Frame refresh behavior

Example prompts

  • “/ok-script-codegen”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit a8af4e8. 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.

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

  • Network

    Links to these hosts (documentation or services it may open):

    • raw.githubusercontent.com

    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

Ok Script Codegen loads about 1k tokens when it runs. Until then it costs about 50 tokens; SKILL.md has 535 words of instructions outside code blocks.

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

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 AliceJump/ok-end-field at commit a8af4e8, republished under its AGPL-3.0 licence (© AliceJump). 535 words, ~1,017 tokens.

Download SKILL.mdSave it as .claude/skills/ok-script-codegen/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ok-script-codegen
description
Generate or refine Python automation code for ok-script task run methods from a description or screenshot. Use for OCR, template matching, clicks, waits, and frame refresh behavior.

OK Script Codegen

Output

  • Produce code for run(self) when the user asks for automation code. Return code only unless they ask for an explanation; then put the code first and explain placement in a BaseTask subclass and any templates or setup they must provide.
  • Put a concise Chinese inline comment on every nonblank generated Python line, including imports and control flow. State when a coordinate is estimated from a screenshot.
  • Ask at most a few short questions only when an assumption would make the automation unsafe or unusable.

Choose task APIs

Check APIs already used by the target project or the official ok-script API. Do not invent methods. Adding external libraries requires an explicit user request.

For a screenshot, prefer OCR for stable text and template matching for stable icons; use estimated relative coordinates when neither is suitable, and label the estimate.

  • Prefer wait_ocr, wait_click_ocr, wait_feature, or wait_click_feature for state-dependent transitions. Use ocr, find_one, or find_feature for a single frame or a custom loop.
  • Prefer click_relative(x, y) with values from 0 to 1 for approximate positions; use click_box(box) for a detected target.
  • Use log_info, log_warning, and info_set for progress. Do not call ensure_in_front() unless the user requests foreground activation.
  • Use OpenCV only when task APIs cannot handle the needed detection.

Frames and loops

sleep() clears the cached frame; next_frame() gets a fresh one. An action with after_sleep also clears it. After a UI-changing action, wait for the new state before single-frame detection. wait_ methods refresh frames internally, so do not add a sleep just before them.

In a polling loop, use one refresh per iteration (sleep() or next_frame()). Use sleep() to pace continuous loops and allow manual stop; do not poll exit_is_set(). Do not create an unbounded loop unless the user asks for continuous automation.

Show full SKILL.md (240 more words)Show less

OCR and templates

  • OCR string match is exact. Use re.compile(...) for partial matches and import re when needed. A match list handles alternatives in one call; when all texts are required, OCR once and inspect the returned boxes. Restrict box when the location is known. Box.name contains recognized text.
  • Use add_text_fix for known OCR confusion. To wait for text to disappear, poll ocr with fresh frames; wait_ocr waits for appearance.
  • Do not assume a template exists. If one is needed but not supplied, use a clearly named placeholder and a comment describing the image area the user must mark. Prefer wait_feature / wait_click_feature for late-appearing templates.
  • In ok-end-field, read docs/dev/文字识别示例.md and docs/dev/图像模板匹配示例.md for project extensions. wait_click_ocr(recheck_time=...) re-locates moving text before clicking; alt=True is for open-world interactions. Omit box in feature detection to use the marked default region; supply it only for a dynamic region. find_one returns one Box or None.

Failure handling

Use raise_if_not_found=False for optional waits and check the result; use True when absence should stop the task. Log and return for a recoverable absence. Keep try/except around meaningful failure boundaries and log the error.

Setup explanations

When requested, explain saving the task under the project's src/tasks/ or ok_tasks/ convention, registering its class, starting the app, and selecting the task. For window, browser, or emulator/ADB capture setup, point to the project's capture_config and existing device configuration. Debug failed detection with OCR regions/thresholds, marked templates, coordinates, logs, and a fresh screenshot.

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

Files

SKILL.md and 1 other file in .agents/skills/ok-script-codegen of AliceJump/ok-end-field.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit a8af4e8

Compare with similar skills

Ok Script Codegen 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.

Ok Script Codegen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ok Script Codegen this skillAliceJump/ok-end-field556—~1kAutomated safety check: PassAGPL-3.0
Mirage VFS Adapter Authoringstrukto-ai/mirage3.7k—~2.5kAutomated safety check: PassApache-2.0
CLI-Anything for CodexHKUDS/CLI-Anything52k—~1.5kAutomated safety check: PassApache-2.0
CLI-Anything for ReasonixHKUDS/CLI-Anything52k—~1.8kAutomated safety check: PassApache-2.0
README and DESIGN Generatorfengshao1227/ccg-workflow5.9k—~410Automated safety check: NotesMIT
Project Scaffolderpretend1111/claude-desktop-app4941 repos~498Automated safety check: PassCustom licence

Similar skills

  • Builds or extends a custom Mirage virtual filesystem adapter for an API, database, object store or app data, with a working mount configuration and filesystem tests.

    3.7k GitHub stars~2.5k tokensUpdated today
    DevelopmentAuto-check passed
  • CLI-Anything for Codex

    HKUDS/CLI-Anything

    Lets Codex build, refine, test, validate and list CLI-Anything harnesses for GUI applications or source repositories, following the project's full methodology.

    52k GitHub stars~1.5k tokensUpdated 16 days ago
    DevelopmentAuto-check passed
  • CLI-Anything for Reasonix

    HKUDS/CLI-Anything

    Adapts the CLI-Anything methodology so Reasonix can build, refine, test and validate a command-line harness for an existing GUI application or source repository.

    52k GitHub stars~1.8k tokensUpdated 16 days ago
    DevelopmentAuto-check passed
  • README and DESIGN Generator

    fengshao1227/ccg-workflow

    Generates README.md and DESIGN.md skeletons for a module by scanning its structure with a Node script, then lists what to fill in by hand.

    5.9k GitHub stars~410 tokensUpdated 23 days ago
    DevelopmentAuto-check: notes
  • Project Scaffolder

    pretend1111/claude-desktop-app

    Scaffolds a complete, runnable project from scratch, covering web, Python and Node.js projects, with a working entry point and no placeholder code.

    494 GitHub starsUsed in 1 repo~498 tokens
    DevelopmentAuto-check passed
  • Guides Hermes Agent through building, refining and testing a CLI-Anything harness that wraps a GUI application or source repository in a scriptable command line.

    52k GitHub stars~1.1k tokensUpdated 16 days ago
    DevelopmentAuto-check passed

More from AliceJump/ok-end-field

All 14 skills in this repo
  • Ok Script I18n

    AliceJump/ok-end-field

    Maintain gettext translations for ok-script task UI and runtime messages.

    556 GitHub stars~828 tokensUpdated today
    Auto-check passed
  • Deploy

    AliceJump/ok-end-field

    Commit validated changes, calculate an annotated stable/beta/alpha version tag, and push the release to the publishing remote.

    556 GitHub stars~625 tokensUpdated today
    Auto-check passed
  • GitHub Rulesets

    AliceJump/ok-end-field

    Diagnose or configure GitHub branch/tag rulesets on ok-script repos.

    556 GitHub stars~595 tokensUpdated today
    Auto-check passed
  • Use Local Venv

    AliceJump/ok-end-field

    Prefer the repository-local Python virtual environment for coding-agent work.

    556 GitHub stars~688 tokensUpdated today
    Auto-check passed
  • Ok Script PR Review

    AliceJump/ok-end-field

    Triage CodeRabbit reviews on ok-script pull requests. An agent skill from AliceJump/ok-end-field.

    556 GitHub stars~904 tokensUpdated today
    Auto-check passed
  • Ok Script Tasks

    AliceJump/ok-end-field

    Create, modify, register, or review ok-script BaseTask and TriggerTask classes.

    556 GitHub stars~619 tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Ok Script Codegen

What does Ok Script Codegen do?

Generate or refine Python automation code for ok-script task run methods from a description or screenshot. Ok Script Codegen is an agent skill from AliceJump/ok-end-field. Generate or refine Python automation code for ok-script task run methods from a description or screenshot.

When should I use Ok Script Codegen?

Ok Script Codegen fits situations like: template matching; frame refresh behavior.

How do I install Ok Script Codegen in Claude Code?

Run `npx skills add AliceJump/ok-end-field --skill ok-script-codegen -a claude-code`. Or copy the skill folder (.agents/skills/ok-script-codegen in AliceJump/ok-end-field) into .claude/skills/ok-script-codegen in your project. Claude Code loads it when a task matches its description.

How do I install Ok Script Codegen in Codex?

Run `npx skills add AliceJump/ok-end-field --skill ok-script-codegen -a codex`. Or copy the skill folder (.agents/skills/ok-script-codegen in AliceJump/ok-end-field) into .agents/skills/ok-script-codegen in your project. Codex loads it when a task matches its description.

Can I use Ok Script Codegen 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 AliceJump/ok-end-field --skill ok-script-codegen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ok-script-codegen, .gemini/skills/ok-script-codegen, .github/skills/ok-script-codegen and .opencode/skills/ok-script-codegen in your project.

What does Ok Script Codegen need to run?

SKILL.md names no scripts, command-line tools or credentials: Ok Script Codegen is instructions for the agent only. Our summary lists: Python 3.

Does Ok Script Codegen access the network?

SKILL.md names 1 domain. As links in the text: raw.githubusercontent.com. This is read from the text; nothing was executed.

Is Ok Script Codegen 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 Ok Script Codegen use?

Ok Script Codegen is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ok Script Codegen use?

About 1k tokens (SKILL.md is roughly 4.1k 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 Ok Script Codegen?

Skills that share tags, products or a category with Ok Script Codegen: Mirage VFS Adapter Authoring (strukto-ai/mirage, 3.7k stars), CLI-Anything for Codex (HKUDS/CLI-Anything, 52k stars), CLI-Anything for Reasonix (HKUDS/CLI-Anything, 52k stars) and README and DESIGN Generator (fengshao1227/ccg-workflow, 5.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ok Script Codegen?

AliceJump (a GitHub user) maintains it in AliceJump/ok-end-field, which has 556 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 8, 2026.

Source: AliceJump/ok-end-field on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.