mcpbeat Sign in

Symbolic Equation Skill for Claude

Discover scientific equations from data using LLM-guided evolutionary search (LLM-SR). Multi-island algorithm with softmax-based cluster sampling, island reset, and LLM-proposed equation mutations. Use for symbolic regression and equation discovery.

3k tokens
context cost
the whole folder, loaded on every use
2
files
instructions only
0
copies elsewhere
how many repositories repackaged it
256
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/lingzhi227/agent-research-skills --skill symbolic-equation

The instruction itself

13 sections, as written by the author

Symbolic Equation Discovery

Discover interpretable scientific equations from data using LLM-guided evolutionary search.

Input

  • $0 — Dataset description, variable names, and physical context

References

  • LLM-SR patterns (prompts, evolution, sampling): ~/.claude/skills/symbolic-equation/references/llmsr-patterns.md

Workflow (from LLM-SR)

Step 1: Define Problem Specification

Create a specification with:

  • Input variables: Physical quantities with types (e.g., x: np.ndarray, v: np.ndarray)
  • Output variable: Target quantity to predict
  • Evaluation function: Fitness metric (typically negative MSE with parameter optimization)
  • Physical context: Domain knowledge to guide equation discovery
# Example specification
@equation.evolve
def equation(x: np.ndarray, v: np.ndarray, params: np.ndarray) -> np.ndarray:
    """Describe the acceleration of a damped nonlinear oscillator."""
    return params[0] * x

Step 2: Initialize Multi-Island Buffer

  • Create N islands (default: 10) for population diversity
  • Each island maintains independent clusters of equations
  • Clusters group equations by performance signature

Step 3: Evolutionary Search Loop

Repeat until convergence or max samples:

  • Select island: Random island selection
  • Build prompt: Sample top equations from clusters (softmax-weighted by score)
  • LLM proposes: Generate new equation as improved version
  • Evaluate: Execute on test data, compute fitness score
  • Register: Add to island's cluster if valid

Step 4: Prompt Construction

Present previous equations as versioned sequence:

def equation_v0(x, v, params):
    """Initial version."""
    return params[0] * x

def equation_v1(x, v, params):
    """Improved version of equation_v0."""
    return params[0] * x + params[1] * v

def equation_v2(x, v, params):
    """Improved version of equation_v1."""
    # LLM completes this

Step 5: Island Reset (Diversity Maintenance)

Periodically (default: every 4 hours):

  • Sort islands by best score
  • Reset bottom 50% of islands
  • Seed each reset island with best equation from a surviving island
  • Restart cluster sampling temperature

Step 6: Extract Best Equations

After search completes:

  • Collect best equation from each island
  • Rank by fitness score
  • Simplify if possible (algebraic simplification)
  • Report with physical interpretation

Cluster Sampling

Temperature-scheduled softmax over cluster scores:

temperature = T_init * (1 - (num_programs % period) / period)
probabilities = softmax(cluster_scores / temperature)
  • Higher temperature → more exploration
  • Lower temperature → more exploitation of best clusters
  • Within clusters: shorter programs are preferred (Occam's razor)

Rules

  • Equations must use only standard mathematical operations
  • Parameter optimization via scipy BFGS or Adam
  • Fitness = negative MSE (higher is better)
  • Timeout protection for equation evaluation
  • No recursive equations allowed
  • Physical interpretability is preferred over pure fit
  • Upstream: data-analysis, math-reasoning
  • Downstream: paper-writing-section
  • See also: algorithm-design

Other skills for the same job

different authors, same section of the catalogue
Scikit Learn
by christophacham
×3

Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

30k tokens scripts
Scikit Learn
by ComeOnOliver
×3

Machine learning in Python with scikit-learn. Use when working with supervised learning (classification, regression), unsupervised learning (clustering, dimensionality reduction), model evaluation, hyperparameter tuning, preprocessing, or building ML pipelines. Provides comprehensive reference documentation for algorithms, preprocessing techniques, pipelines, and best practices.

32k tokens scripts
LLM Evaluation
by ComeOnOliver
×2

Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

6k tokens
LLM Evaluation
by ComeOnOliver
×2

Implement comprehensive evaluation strategies for LLM applications using automated metrics, human feedback, and benchmarking. Use when testing LLM performance, measuring AI application quality, or establishing evaluation frameworks.

6k tokens
Agent Evaluation
by lingxling
×1

Testing and benchmarking LLM agents including behavioral testing, capability assessment, reliability metrics, and production monitoring—where even top agents achieve less than 50% on real-world benchmarks

9k tokens
Celltypist Cell Annotation
by BioTender-max
×1

Automated scRNA-seq cell type annotation via pre-trained logistic regression. 45+ models: immune, gut, lung, brain, fetal, cancer microenvironments. Input normalized AnnData; outputs per-cell labels, majority-vote cluster labels, confidence scores. Use for fast, reference-backed annotation without manual marker inspection.

5k tokens
Scikit Learn Machine Learning
by BioTender-max
×1

Classical ML in Python: classification, regression, clustering, dim reduction, evaluation, tuning, preprocessing pipelines. Linear models, tree ensembles, SVMs, K-Means, PCA, t-SNE. Use PyTorch/TF for deep learning; XGBoost/LightGBM for scale.

4k tokens
Statsmodels Statistical Modeling
by BioTender-max
×1

Python statistical modeling: regression (OLS, WLS, GLM), discrete (Logit, Poisson, NegBin), time series (ARIMA, SARIMAX, VAR), with rigorous inference, diagnostics, and hypothesis tests. Use scikit-learn for ML; statistical-analysis for test choice.

4k tokens

How to use it

Copy the folder

Take lingzhi227/symbolic-equation from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.