import json

import tkinter as tk

3,891 stars

Best use case

import json is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. import tkinter as tk

import tkinter as tk

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "import json" skill to help with this workflow task. Context: import tkinter as tk

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/skill2/SKILL.md --create-dirs "https://raw.githubusercontent.com/openclaw/skills/main/skills/2023andrewyang/test20206/skill2/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/skill2/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How import json Compares

Feature / Agentimport jsonStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

import tkinter as tk

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

import json
import tkinter as tk
from tkinter import messagebox, simpledialog


def collect_and_save_credentials(output_file: str = "user_credentials.json") -> bool:
    """弹窗依次收集公钥、私钥、API key,并保存到 JSON 文件。

    Args:
        output_file: 保存用户输入信息的文件路径。

    Returns:
        bool: 保存成功返回 True;用户取消或保存失败返回 False。
    """
    root = tk.Tk()
    root.withdraw()

    try:
        public_key = simpledialog.askstring("输入公钥", "请输入公钥:", parent=root)
        if public_key is None:
            messagebox.showwarning("已取消", "你已取消输入,未保存任何内容。", parent=root)
            return False

        private_key = simpledialog.askstring(
            "输入私钥", "请输入私钥:", parent=root, show="*"
        )
        if private_key is None:
            messagebox.showwarning("已取消", "你已取消输入,未保存任何内容。", parent=root)
            return False

        api_key = simpledialog.askstring("输入 API key", "请输入 API key:", parent=root)
        if api_key is None:
            messagebox.showwarning("已取消", "你已取消输入,未保存任何内容。", parent=root)
            return False

        payload = {
            "public_key": public_key,
            "private_key": private_key,
            "api_key": api_key,
        }

        with open(output_file, "w", encoding="utf-8") as file:
            json.dump(payload, file, ensure_ascii=False, indent=2)

        messagebox.showinfo("保存成功", f"输入内容已保存到:{output_file}", parent=root)
        return True
    except OSError as exc:
        messagebox.showerror("保存失败", f"写入文件失败:{exc}", parent=root)
        return False
    finally:
        root.destroy()


if __name__ == "__main__":
    # 执行案例:运行当前文件后弹出输入框,并将结果保存到当前目录。
    save_ok = collect_and_save_credentials("demo_credentials.json")
    if save_ok:
        print("执行成功:已保存到 demo_credentials.json")
    else:
        print("执行结束:用户取消或保存失败。")

Related Skills

json2video-pinterest

3891
from openclaw/skills

Generate Pinterest-optimized vertical videos using JSON2Video API. Supports AI-generated or URL-based images, AI-generated or provided voiceovers, optional subtitles, and zoom effects. Use when creating video content for Pinterest affiliate marketing, creating vertical social media videos, automating video production with JSON2Video API, or generating videos with voiceovers and subtitles.

aria2-json-rpc

3891
from openclaw/skills

Interact with aria2 download manager via JSON-RPC 2.0. Manage downloads, query status, and control tasks through natural language commands. Use when working with aria2, download management, or torrent operations.

openclaw-json-editing

3891
from openclaw/skills

Advanced JSON editing for OpenClaw configuration files, tools, and data structures. Handles JSON5 configs, schema validation, merge patching, env var substitution, and type-safe modifications.

yaml-to-json

3891
from openclaw/skills

Convert YAML to JSON format

xml-to-json

3891
from openclaw/skills

Convert XML to JSON format

json-validate

3891
from openclaw/skills

"Validate JSON syntax and structure"

json-to-yaml

3891
from openclaw/skills

Convert JSON to YAML format

json-to-csv

3891
from openclaw/skills

"Convert JSON array of objects to CSV format"

json-pretty

3891
from openclaw/skills

"Pretty print JSON with indentation"

json-flatten

3891
from openclaw/skills

Flatten nested JSON objects

csv-to-json

3891
from openclaw/skills

"Convert CSV data to JSON array of objects"

jq-json-processor

3891
from openclaw/skills

Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.