Skip to content
Skills Library
Science & research · Analysis

code-execution

/code-execution

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.

Repository
scienceclaw ↗
Licence
MIT
Last repository change
07.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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.

Original author 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.

How it works

  1. Common Imports
  2. Pattern 1: Statistical Analysis
  3. Pattern 2: Numerical Computation
  4. Pattern 3: Data Processing
  5. Pattern 4: Monte Carlo Simulation
  6. Pattern 5: Verification
  7. Error Handling
  8. Output Formatting
  9. Sandbox Constraints
  10. Best Practices
Original SKILL.md headings · 117 lines, 415 words
SKILL.md preview
---
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."
metadata: { "openclaw": { "emoji": "💻", "requires": { "bins": ["python3"] } } }
---

# 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.

Versions

RepositoryScoreLicence
This page · beita6969/scienceclaw100MIT
darrenhinde/OpenAgentsControl100MIT
latestaiagents/agent-skills100MIT
mhattingpete/claude-skills-marketplace100Apache-2.0

Identical content appears in 1 other GitHub folders. We show one copy with the highest score.

Database snapshot: 13.11.2026 · package version f4e225d9c765 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95code_execution_analysis
    Computational Analysis via Code Execution - Execute custom computational analysis code, analyze software, and search for reference implementations. Use this skill for computational science tasks involving exec code software analysis search dataset search literature. Combines 4…
  • 95code_execution_analysis
    Computational Analysis via Code Execution - Execute custom computational analysis code, analyze software, and search for reference implementations. Use this skill for computational science tasks involving exec code software analysis search dataset search literature. Combines 4…
  • 95biomed-dispatch
    Dispatch biomedical research and data analysis tasks to Claude Code with K-Dense Scientific Skills. Use this skill when the user asks to run any bioinformatics, genomics, drug discovery, clinical data analysis, proteomics, multi-omics, medical imaging, or scientific computation…
  • 90matlab-execution
    Use when the user explicitly needs MATLAB or .m scripts for local scientific computing, simulation, signal processing, image processing, statistics, or experiment reproduction. Prefer command-line MATLAB batch execution and do not imply GUI control.
  • 100computation-audit
    Design, run, or audit a mathematical computation supporting a research claim when correctness, provenance, tested range, reproducibility, or interpretation matters. Includes symbolic, exact, finite-field, representation-theoretic, homological and numerical experiments. Do not…
  • 100scientific-toolkit-skill
    Research computing toolkit for optoelectronic information science and engineering, MATLAB/Octave, Python scientific analysis, signal processing, image processing, statistics, simulation, optimization, publication figures, sensor/time-series data, citation lookup, and common…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.