Skip to content
Agentmart
Submit a tool

code-execution

Execute scientific Python code for computation, data analysis, simulation, and verification.

Skill by beita6969

IndexedMIT★ 1,019
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/beita6969-code-execution

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Execute scientific Python code for computation, data analysis, simulation, and verification. Use when: (1) running statistical analyses, (2) numerical computation, (3) data processing pipelines, (4) verifying calculations, (5) running simulations. NOT for: literature search (use literature-search), writing papers (use paper-writing), or non-computational tasks.

Use cases: data, writing, research

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/code-execution

What's inside

Skill name
code-execution
Description
Execute scientific Python code for computation, data analysis, simulation, and verification. Use when: (1) running statistical analyses, (2) numerical computation, (3) data processing pipelines, (4) verifying calculations, (5) running simulations. NOT for: literature search (use literature-search), writing papers (use paper-writing), or non-computational tasks.
License
MIT
Instructions
117 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Code Execution (Meta Skill)

Execute scientific Python code for computation, analysis, simulation, and
verification of results.

## Common Imports

```python
import numpy as np
import pandas as pd
from scipy import stats, optimize, integrate, signal
import matplotlib; matplotlib.use('Agg')
import matplotlib.pyplot as plt
import json, csv, sys
from collections import Counter, defaultdict
```

## Pattern 1: Statistical Analysis

```python
import numpy as np
from scipy import stats

data_a, data_b = np.array([...]), np.array([...])
print(f"Group A: mean={np.mean(data_a):.4f}, std={np.std(data_a, ddof=1):.4f}, n={len(data_a)}")
print(f"Group B: mean={np.mean(data_b):.4f}, std={np.std(data_b, ddof=1):.4f}, n={len(data_b)}")

t_stat, p_value = stats.ttest_ind(data_a, data_b, equal_var=False)
print(f"Welch's t-test: t={t_stat:.4f}, p={p_value:.6f}")

# Effect size (Cohen's d)
pooled_std = np.sqrt((np.std(data_a, ddof=1)**2 + np.std(data_b, ddof=1)**2) / 2)
print(f"Cohen's d: {(np.mean(data_a) - np.mean(data_b)) / pooled_std:.4f}")
```

## Pattern 2: Numerical Computation

```python
from scipy import integrate, optimize

result, error = integrate.quad(lambda x: np.exp(-x**2), -np.inf, np.inf)
print(f"Integral result: {result:.6f} (error: {error:.2e})")

solution = optimize.fsolve(lambda v: [v[0]**2+v[1]**2-4, v[0]-v[1]-1], [1, 0])
print(f"Solution: x={solution[0]:.4f}, y={solution[1]:.4f}")
```

## Pattern 3: Data Processing

```python
import pandas as pd
from io import StringIO

df = pd.read_csv(StringIO("col1,col2\n1,2\n3,4"))
df = df.dropna()
df['computed'] = df['col1'] * df['col2']
print(df.groupby('col1').agg({'col2': ['mean', 'std', 'count']}).round(4).to_string())
```

## Pattern 4: Monte Carlo Simulation

```python
np.random.seed(42)
n = 100000
x, y = np.random.uniform(-1, 1, n), np.random.uniform(-1, 1, n)
pi_est = 4 * np.sum(x**2 + y**2 <= 1) / n
print(f"Pi estimate: {pi_est:.6f} (error: {abs(pi_est - np.pi):.6f})")
```

## Pattern 5: Verification

```python
# Verify claimed results against raw data
actual_mean = np.mean(data)
se = np.std(data, ddof=1) / np.sqrt(len(data))
ci = (actual_mean - 1.96*se, actual_mean + 1.96*se)
print(f"Mean: {actual_mean:.2f}, 95% CI: ({ci[0]:.2f}, {ci[1]:.2f})")
print(f"Verification: {'PASS' if abs(claimed - actual_mean) < 0.5 else 'FAIL'}")
```

## Error Handling

```python
try:
    result = perform_computation(data)
except (ValueError, np.linalg.LinAlgError) as e:
    print(f"Error: {e}")
except MemoryError:
    print("Data too large. Consider chunked processing.")
```

## Output Formatting

```python
print("=" * 50)
print(f"RESULTS | n={n} | mean={mean:.4f} | p={p:.6f}")
print("=" * 50)
```

## Sandbox Constraints

1. No network access -- data must be provided inline or on disk.
2. No persistent state -- each execution is independent.
3. Memory limits -- use chunked processing for large data.
4. Time limits -- reduce iterations for long simulations.

## Best Practices

1. Set random seeds and report library versions for reproducibility.
2. Use `np.float64` and `np.log1p` for numerical stability.
3. Prefer vectorized NumPy over Python loops.
4. Validate input shapes, types, and ranges before computation.
5. Report appropriate significant figures; do not over-report precision.
6. Check statistical test assumptions before applying parametric methods.
7. Apply Bonferroni/FDR correction for multiple comparisons.

From beita6969/ScienceClaw, MIT.

More from beita6969/ScienceClaw

Signals

Stars
1,019
Forks
109
Open issues
1
Last commit (this folder)
Mar 12, 2026 (7 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from beita6969

Cite this page

code-execution skill. Agent Mart. https://agentmart.dev/skills/beita6969-code-execution (last updated 2026-10-24)