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
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/skill2/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How import json Compares
| Feature / Agent | import json | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/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
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
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
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
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
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
Convert YAML to JSON format
xml-to-json
Convert XML to JSON format
json-validate
"Validate JSON syntax and structure"
json-to-yaml
Convert JSON to YAML format
json-to-csv
"Convert JSON array of objects to CSV format"
json-pretty
"Pretty print JSON with indentation"
json-flatten
Flatten nested JSON objects
csv-to-json
"Convert CSV data to JSON array of objects"
jq-json-processor
Process, filter, and transform JSON data using jq - the lightweight and flexible command-line JSON processor.