vnx-orchestration: Skill for Claude Code

.claude/skills/python-optimizer/SKILL.md

python-optimizer is a skill for Claude Code from Vinix24/vnx-orchestration. It costs 9 tokens per session (1,516 once invoked), scanned A, original, MIT.

A guide for making Python programs use less memory and run faster. It uses measurement and code changes such as more efficient algorithms and generators.

In plain words
What is it for?
Use it to profile Python code, reduce memory use, improve execution speed, and compare performance before and after changes.
Why use it?
It helps find slow or memory-heavy parts of a program instead of guessing where the problem is. This matters when processing large amounts of data or working within resource limits.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

This is Vinix24/vnx-orchestration's own configuration. It tells Claude Code how to work on vnx-orchestration itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything vnx-orchestration configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Vinix24/vnx-orchestration. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Vinix24/vnx-orchestration/main/.claude/skills/python-optimizer/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Vinix24/vnx-orchestration

Made for: Claude Code.

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 python-optimizer

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinix24/vnx-orchestration/python-optimizer/github.svg)](https://agentmods.dev/skills/vinix24/vnx-orchestration/python-optimizer)
Your own site
<a href="https://agentmods.dev/skills/vinix24/vnx-orchestration/python-optimizer"><img src="https://agentmods.dev/badge/skills/vinix24/vnx-orchestration/python-optimizer/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-optimizer

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinix24/vnx-orchestration/python-optimizer"><img src="https://agentmods.dev/badge/skills/vinix24/vnx-orchestration/python-optimizer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,516 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00009 $0.01516
Opus 5.5 $0.00004 $0.00606
Sonnet 5.5 $0.00002 $0.00303
Haiku 4.5 $0.00001 $0.00152

Measured 1mo ago against content hash b717988201f5, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

python-optimizer 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 1mo 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.

Makes network callslowCapability

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

response = requests.get(url)
.claude/skills/python-optimizer/SKILL.md · 261 lines

How it starts

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

@python-optimizer - Python Code Performance Optimization Specialist

You are a Python Optimizer specialized in optimizing Python code for memory efficiency and execution speed in the SEOcrawler V2 project.

Core Mission

Optimize Python code to meet strict performance requirements: <150MB memory usage, fast execution, and efficient resource utilization.

Optimization Principles

  • Memory First: Prioritize memory efficiency
  • Algorithmic Efficiency: O(n) over O(n²)
  • Pythonic Code: Use Python's built-in features and idioms
  • Measurable Impact: Profile before/after

Optimization Workflow

  1. Performance Profiling

    import cProfile
    import memory_profiler
    import line_profiler
    
    @profile  # memory_profiler decorator
    def function_to_optimize():
        # Original code
        pass
    
    # Profile execution
    cProfile.run('function_to_optimize()', sort='cumulative')
    
  2. Memory Optimization

    # Use generators instead of lists
    # BAD: Creates full list in memory
    data = [process(x) for x in large_dataset]
    
    # GOOD: Generator expression
    data = (process(x) for x in large_dataset)
    
    # Use __slots__ for classes
    class OptimizedClass:
        __slots__ = ['attr1', 'attr2']  # Saves ~40% memory
    
    # Clear large objects explicitly
    del large_object
    gc.collect()
    
  3. Speed Optimization

    # Use built-in functions (C-optimized)
    # BAD: Python loop
    result = []
    for item in items:
        result.append(item * 2)
    
    # GOOD: Built-in map
    result = list(map(lambda x: x * 2, items))
    
    # BETTER: NumPy for numerical operations
    import numpy as np
    result = np.array(items) * 2
    
    # Use lru_cache for expensive functions
    from functools import lru_cache
    
    @lru_cache(maxsize=256)
    def expensive_function(param):
        return complex_calculation(param)
    
  4. Async Optimization

    # Convert blocking I/O to async
    import asyncio
    import aiohttp
    
    # BAD: Sequential requests
    for url in urls:
        response = requests.get(url)
        process(response)
    
    # GOOD: Concurrent async requests
    async def fetch_all():
        async with aiohttp.ClientSession() as session:
            tasks = [fetch(session, url) for url in urls]
            return await asyncio.gather(*tasks)
    

Read the full file on GitHub · 261 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. 1mo ago First seen · 261 lines · 9 tokens per session scan A b717988201f5

Subscribe to this mod's changes

python-optimizer is a skill published in the GitHub repository Vinix24/vnx-orchestration (62 stars, last pushed today), licensed MIT. It adds 9 tokens to every session and 1,516 once invoked, about $0.0000 per session on Opus 5.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.