creating-python-scripts

Guidance for creating or editing one standalone Python script, with its package requirements recorded inside the file when needed. UV is the Python tool used to run such scripts and manage those inline requirements.

In plain words
What is it for?
Use it for a single-file Python utility, command-line helper, prototype, or small automation.
Why use it?
It keeps small utilities and one-off automations easy to run and avoids turning them into unnecessary multi-file projects.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/signal-loop/unitycodemcpserver/creating-python-scripts
Any agent
npx skills add Signal-Loop/UnityCodeMCPServer --skill creating-python-scripts
Clone the repo
git clone --depth 1 https://github.com/Signal-Loop/UnityCodeMCPServer

Made for: Claude Code, Codex.

Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,036 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.01036
Opus 5 $0.00021 $0.00518
Sonnet 5 $0.00008 $0.00207
Haiku 4.5 $0.00004 $0.00104

Measured yesterday against content hash 8a58aa10c2b1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

creating-python-scripts scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

response = requests.get(args.url, timeout=30)
.agents/skills/creating-python-scripts/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Creating Single-File UV Python Scripts

Overview

Use this skill to keep Python script work script-shaped.

The default outcome is one .py file that can be run with uv. If third-party packages are needed, declare them inside the script with inline metadata instead of creating separate dependency files.

When To Use

Use this skill when the user asks for:

  • a Python script
  • a small Python utility
  • a one-off automation
  • a standalone CLI helper
  • a quick prototype that does not need to become a package

Do not use this skill when the user explicitly asks for:

  • a multi-file Python project
  • a package or library
  • a framework app
  • a repository scaffold with pyproject.toml

If the user asks for a script but the requested architecture clearly requires multiple files, say that the single-file constraint conflicts with the requested design and ask whether to keep the script constraint or expand to a project.

Core Rules

  1. Produce a single .py file.
  2. Do not create helper modules, packages, requirements.txt, or pyproject.toml for script tasks.
  3. Use uv commands when showing how to run the script.
  4. If the script needs third-party packages, use inline metadata in the script.
  5. If the script only uses the standard library, omit the dependency metadata block.
  6. If you are asked to execute, test, or verify the script, do it with uv run rather than raw python.

Required Workflow

1. Confirm the work is really script-sized

Prefer a single-file script when the task is automation, data processing, API calls, file transformation, or a small CLI.

If the request starts drifting toward a package, service, or app structure, stop and surface the tradeoff instead of quietly creating extra files.

2. Keep everything in one file

Put imports, configuration constants, helper functions, CLI parsing, and the main entry point in the same file.

Avoid splitting code into separate modules unless the user explicitly relaxes the single-file requirement.

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 165 lines · 42 tokens per session scan A 8a58aa10c2b1

Subscribe to this mod's changes

creating-python-scripts is a skill published in the GitHub repository Signal-Loop/UnityCodeMCPServer (19 stars, last pushed 1mo ago), licensed MIT. It adds 42 tokens to every session and 1,036 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

assets-get-data

Get asset data from the asset file in the Unity project — every serializable field and property. Supports token-saving path-scoped reads via paths or viewQuery. Use 'assets-find' to find the asset first.

IvanMurzak/Unity-MCP · 50 tokens

gameobject-component-destroy

Destroy one or more Components from a target GameObject. Missing (null) components are skipped — they cannot be destroyed. Use 'gameobject-find' and 'gameobject-component-get' to identify the components first.

IvanMurzak/Unity-MCP · 49 tokens

gameobject-set-parent

Reparent a batch of GameObjects under a new parent in the currently opened Prefab or active Scene. Per-item failures are reported in the returned status string instead of aborting the batch. Use 'gameobject-find' to locate the GameObjects first.

IvanMurzak/Unity-MCP · 56 tokens

assets-create-folder

Create a new folder under a parent folder inside 'Assets/'. The parent path must start with 'Assets/' and every intermediate folder in it must already exist. Refreshes the AssetDatabase at the end and returns the GUID(s) of the created folder(s).

IvanMurzak/Unity-MCP · 55 tokens

console-get-logs

Retrieve Unity Editor logs from the MCP plugin's LogCollector, optionally filtered by log type or time window. Useful for debugging and monitoring Editor activity.

IvanMurzak/Unity-MCP · 35 tokens

assets-prefab-save

Save the currently opened prefab edit stage back to its prefab asset without exiting the stage. Pair with 'assets-prefab-open' to enter the edit mode first.

IvanMurzak/Unity-MCP · 37 tokens