temp-file-python-analysis

temp-file-python-analysis is a skill for Claude Code, Codex from fabioc-aloha/Alex_Skill_Mall. It costs 14 tokens per session (576 once invoked), scanned A, original, MIT.

A shell scripting pattern that puts longer Python analysis into a temporary file instead of embedding it directly in a command.

In plain words
What is it for?
Use it for quick data analysis or other Python tasks launched from Bash or PowerShell.
Why use it?
It avoids quoting problems and makes complex Python easier to read, debug, and run from shell scripts.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for quick data analysis or other Python tasks launched from Bash or PowerShell.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fabioc-aloha/alex_skill_mall/temp-file-python-analysis
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.

Any agent
npx skills add fabioc-aloha/Alex_Skill_Mall --skill temp-file-python-analysis
Clone the repo
git clone --depth 1 https://github.com/fabioc-aloha/Alex_Skill_Mall

Made for: Claude Code, 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 temp-file-python-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/temp-file-python-analysis.svg)](https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/temp-file-python-analysis)
Your own site
<a href="https://agentmods.dev/skills/fabioc-aloha/alex_skill_mall/temp-file-python-analysis"><img src="https://agentmods.dev/badge/skills/fabioc-aloha/alex_skill_mall/temp-file-python-analysis.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 576 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00014 $0.00576
Opus 5 $0.00007 $0.00288
Sonnet 5 $0.00003 $0.00115
Haiku 4.5 $0.00001 $0.00058

Measured 4d ago against content hash 7feaf8c84a94, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

temp-file-python-analysis 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 4d 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.

plugins/data-analytics/temp-file-python-analysis/skills/temp-file-python-analysis/SKILL.md · 113 lines

What it actually says

Temp File Python Analysis

The Problem

Inline Python in shell scripts has quoting issues:

# Fails with quote escaping problems
python -c "import pandas as pd; df = pd.read_csv('data.csv'); print(df[df['name'] == 'John'])"

# Even worse with complex logic
python -c "
import json
with open('config.json') as f:
    data = json.load(f)
    for item in data['items']:
        if item['status'] == 'active':
            print(item['name'])
"

The Solution

Write to _tmp.py, execute, delete:

# Write script
cat > _tmp.py << 'EOF'
import pandas as pd
df = pd.read_csv('data.csv')
result = df[df['name'] == 'John']
print(result.to_json(orient='records'))
EOF

# Execute
python _tmp.py

# Clean up
rm _tmp.py

PowerShell Equivalent

$script = @'
import pandas as pd
df = pd.read_csv('data.csv')
print(df.describe().to_string())
'@

$script | Out-File -FilePath "_tmp.py" -Encoding utf8
python _tmp.py
Remove-Item "_tmp.py"

Benefits

Approach Quoting Issues Debugging Editor Support
Inline -c Many Hard None
Heredoc Some Medium Limited
Temp file None Easy Full

Patterns

Quick Data Analysis

cat > _tmp.py << 'EOF'
import pandas as pd
import sys
df = pd.read_csv(sys.argv[1])
print(f"Rows: {len(df)}")
print(f"Columns: {list(df.columns)}")
print(df.dtypes)
EOF
python _tmp.py data.csv
rm _tmp.py

JSON Transformation

cat > _tmp.py << 'EOF'
import json
with open('input.json') as f:
    data = json.load(f)
# Transform
result = [item for item in data if item.get('active')]
with open('output.json', 'w') as f:
    json.dump(result, f, indent=2)
EOF
python _tmp.py
rm _tmp.py

When to Apply

  • Any multi-line Python in shell context
  • Complex string handling
  • Data analysis one-offs
  • JSON/CSV processing

Tags

data python shell analysis

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. 4d ago First seen · 113 lines · 14 tokens per session scan A 7feaf8c84a94

Subscribe to this mod's changes

temp-file-python-analysis is a skill published in the GitHub repository fabioc-aloha/Alex_Skill_Mall (4 stars, last pushed today), licensed MIT. It adds 14 tokens to every session and 576 once invoked, about $0.0001 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-03.

Related

Other skills, from other repositories

apply-distributed-team-practices

Use when managing a team where members work in different locations, time zones, or on hybrid schedules — to adapt management practices so remote members have equal access to information, relationships, and advancement opportunities as in-office members.

jeffreytse/grimoire-core · 51 tokens

apply-trust-building

Use when a manager is new to a team, has experienced a trust breach, or wants to deliberately strengthen the trust foundation of their management relationships — because trust determines whether employees share real problems, follow direction with confidence, and engage fully.

jeffreytse/grimoire-core · 52 tokens

design-team-meeting-structure

Use when a team's meetings feel like the wrong type of conversation for the decisions being made, when meetings are too frequent or too infrequent, or when team members feel their time is wasted — to design the right meeting types, cadences, and facilitation practices for how the team actually works.

jeffreytse/grimoire-core · 66 tokens

prevent-employee-burnout

Use when a manager wants to reduce the risk of burnout on their team, or when they observe signs that a direct report may be approaching burnout — to identify contributing factors and intervene before the employee becomes disengaged, impaired, or leaves.

jeffreytse/grimoire-core · 54 tokens

run-career-conversation

Use when a manager wants to have a structured career development conversation with a direct report — separate from weekly one-on-ones and performance reviews — to understand their long-term aspirations, identify growth gaps, and create a concrete development plan.

jeffreytse/grimoire-core · 52 tokens

run-underperformance-conversation

Use when a manager first observes that a direct report's performance is declining or falling below expectations — to have an early, direct, non-punitive conversation that names the gap and opens a path to correction before the situation requires formal process.

jeffreytse/grimoire-core · 54 tokens