optimize-python-parallelism

optimize-python-parallelism is a skill for Codex from cloudguo123/atomlane. It costs 70 tokens per session (1,064 once invoked), scanned A, original, MPL-2.0.

A Python analysis skill for finding repeated independent work in a long-running program and preparing a possible parallel rewrite.

In plain words
What is it for?
Inspecting Python entry points, identifying time-consuming independent iterations, and producing evidence-based rewrite previews without running the target code.
Why use it?
It helps determine whether parallel execution is safe and likely to improve runtime before code is changed.

Skill for Codex

Written for Codex: agents/openai.yaml present.

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/cloudguo123/atomlane/optimize-python-parallelism
Any agent
npx skills add cloudguo123/atomlane --skill optimize-python-parallelism
Clone the repo
git clone --depth 1 https://github.com/cloudguo123/atomlane

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for optimize-python-parallelism

README.md
[![agentmods](https://agentmods.dev/badge/skills/cloudguo123/atomlane/optimize-python-parallelism.svg)](https://agentmods.dev/skills/cloudguo123/atomlane/optimize-python-parallelism)
Your own site
<a href="https://agentmods.dev/skills/cloudguo123/atomlane/optimize-python-parallelism"><img src="https://agentmods.dev/badge/skills/cloudguo123/atomlane/optimize-python-parallelism.svg" alt="Measured on agentmods" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,064 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.1 $0.00070 $0.01064
Opus 5 $0.00035 $0.00532
Sonnet 5 $0.00014 $0.00213
Haiku 4.5 $0.00007 $0.00106

Measured 2d ago against content hash a7defb45a084, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

optimize-python-parallelism scanned grade A with 0 findings 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 2d ago.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/optimize-python-parallelism/SKILL.md · 104 lines

How it starts

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

AtomLane Python Advisor

Improve a program only after separating three questions: where time is spent, whether iterations are semantically independent, and whether the proposed executor is likely to beat its overhead. A long runtime is a reason to inspect, not proof that parallel execution is legal or useful.

Keep analysis and execution separate

Use python_parallel_advisor for bounded source analysis. It reads strict project-local UTF-8 Python, builds a conservative same-module call/effect summary, and may return a source-hash-bound rewrite preview. It never imports or executes target code and never changes files.

Read references/python-program-ir.md before interpreting or applying a candidate. It defines classification, proof gates, GIL/spawn constraints, rewrite validity, and the verification certificate.

Call the advisor with:

  • an absolute project_path;
  • concrete paths when the entrypoint is known, otherwise bounded discovery;
  • caller-observed hotspots only when they are real serial measurements;
  • the actual execution_context, so an inner pool is not multiplied by an AtomLane or native worker pool;
  • an explicit worker ceiling only as a ceiling, never as a safety override.
  • target_platform when the optimized program will deploy somewhere other than the analysis host.

Do not run a workload merely to obtain a profile when repeating it may mutate state, incur cost, or affect an external system.

Treat each classification precisely

  • reviewable_rewrite is the strongest static result, not a runtime proof. Its patch is still conditional on pickling, import, memory, correctness, and measured-performance checks.
  • advisory_only identifies a plausible I/O, network, subprocess, or otherwise conditional opportunity. Explain the missing guarantees; do not apply its outline as an automatic transformation.
  • prefer_native means vectorization or a library-owned worker pool should be considered before another Python pool.
  • already_parallel requires one coordinated outer/inner resource budget.
  • blocked remains serial until every hard blocker is removed by evidence or a semantics-preserving redesign. A confidence score cannot override a blocker.

Read the full file on GitHub · 104 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 104 lines · 70 tokens per session scan A a7defb45a084

Subscribe to this mod's changes

optimize-python-parallelism is a skill published in the GitHub repository cloudguo123/atomlane (1 stars, last pushed 2d ago), licensed MPL-2.0. It adds 70 tokens to every session and 1,064 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.

Related

Other skills, from other repositories

python-quality

Python static analysis with ruff, mypy, pyright. Type checking and linting best practices. USE WHEN: "type checking", "mypy", "pyright", "ruff", "linting", "static analysis", "type error", "type hints", "pylint", "flake8", "black", "isort", "code quality" DO NOT USE FOR: Basic type hint syntax - use languages/python…

claude-dev-suite/claude-dev-suite · 105 tokens

frappe-backend

Frappe backend guidance for Python and backend-adjacent JavaScript surfaces such as client interaction patterns, hooks, APIs, patches, scheduler logic, reports, and server-side review. Use when implementing or reviewing Frappe backend behavior.

Dkm0315/frappe-agent · 53 tokens

py-debug

Python debugging expert. Use when the user needs to debug, profile, or trace Python code — e.g. "how do I debug this", "find the memory leak", "why is this slow", "add a breakpoint", "profile this function".

berekvolgyipeter/dotclaude · 54 tokens

dev-python-quality

Use when Python-specific typing, async behavior, packaging, pytest, ruff/mypy, scripting, or performance quality is central to the request. Do not trigger for generic small code edits merely written in Python.

BlueSkyXN/Codex-is-all-you-need · 46 tokens

python-debugging

Use this skill when fixing failing Python tests.

Loveca/tiny-claude-code · 0 tokens

fix-unicode-decode

Diagnose and fix UnicodeDecodeError, UnicodeEncodeError, mojibake, and corrupted Chinese text in Codex coding tasks. Use when Python or another tool cannot decode a file or subprocess stream; Chinese text displays as replacement characters or strings such as "中文" or "涓枃"; file, terminal, CSV, JSON, HTTP, Git, or…

hachiwar/codex-skills · 104 tokens