/symbolic-equation
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.
$ npx -y skills add lingzhi227/agent-research-skills --skill symbolic-equation --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/symbolic-equation
Context preview
The summary Claude sees to decide when to auto-load this skill.
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.
SKILL.md
symbolic-equation.SKILL.mdname: symbolic-equation
description: 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.
argument-hint: [data-and-variables]
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: 1. **Input variables**: Physical quantities with types (e.g., `x: np.ndarray`, `v: np.ndarray`) 2. **Output variable**: Target quantity to predict 3. **Evaluation function**: Fitness metric (typically negative MSE with parameter optimization) 4. **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] * xStep 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: 1. **Select island**: Random island selection 2. **Build prompt**: Sample top equations from clusters (softmax-weighted by score) 3. **LLM proposes**: Generate new equation as improved version 4. **Evaluate**: Execute on test data, compute fitness score 5. **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 thisStep 5: Island Reset (Diversity Maintenance)
Periodically (default: every 4 hours): 1. Sort islands by best score 2. Reset bottom 50% of islands 3. Seed each reset island with best equation from a surviving island 4. Restart cluster sampling temperature
Step 6: Extract Best Equations
After search completes: 1. Collect best equation from each island 2. Rank by fitness score 3. Simplify if possible (algebraic simplification) 4. 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
Related Skills
- Upstream: [data-analysis](../data-analysis/), [math-reasoning](../math-reasoning/)
- Downstream: [paper-writing-section](../paper-writing-section/)
- See also: [algorithm-design](../algorithm-design/)
Read more
name: symbolic-equation description: 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. argument-hint: [data-and-variables]
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: 1. **Input variables**: Physical quantities with types (e.g., `x: np.ndarray`, `v: np.ndarray`) 2. **Output variable**: Target quantity to predict 3. **Evaluation function**: Fitness metric (typically negative MSE with parameter optimization) 4. **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] * xStep 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: 1. **Select island**: Random island selection 2. **Build prompt**: Sample top equations from clusters (softmax-weighted by score) 3. **LLM proposes**: Generate new equation as improved version 4. **Evaluate**: Execute on test data, compute fitness score 5. **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 thisStep 5: Island Reset (Diversity Maintenance)
Periodically (default: every 4 hours): 1. Sort islands by best score 2. Reset bottom 50% of islands 3. Seed each reset island with best equation from a surviving island 4. Restart cluster sampling temperature
Step 6: Extract Best Equations
After search completes: 1. Collect best equation from each island 2. Rank by fitness score 3. Simplify if possible (algebraic simplification) 4. 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
Related Skills
- Upstream: [data-analysis](../data-analysis/), [math-reasoning](../math-reasoning/)
- Downstream: [paper-writing-section](../paper-writing-section/)
- See also: [algorithm-design](../algorithm-design/)
31 skills for Claude Code covering the full academic research paper lifecycle — from literature search to slide generation — plus GitHub repository analysis for research topics. Extracted from 17 GitHub repos studying LLM-agent-driven research automation.
Other skills on agent-research-skills.
- /algorithm-design
Design algorithms with LaTeX pseudocode and UML diagrams. Generate algorithmic environments, Mermaid class/sequence diagrams, and ensure consistency between pseudocode and implementation. Use when formalizing methods for a paper.
Open skill - /atomic-decomposition
Decompose research ideas into atomic, self-contained concepts with bidirectional math-code mapping. For each concept, extract the math formula from papers and find code implementations. Use for complex system papers requiring formal grounding.
Open skill - /backward-traceability
Make every number in the final PDF traceable to the exact code line that produced it. Uses \hypertarget/\hyperlink LaTeX commands and \num{formula} evaluated at compile time. Use for reproducibility and data integrity verification.
Open skill - /citation-management
Manage BibTeX citations for LaTeX papers. Harvest missing citations from a draft using Semantic Scholar, validate cite keys against .bib files, deduplicate entries, and format bibliography. Use when working with references, BibTeX, or citations.
Open skill - /code-debugging
Debug experiment code with structured error analysis. Categorize errors, apply targeted fixes with retry logic, and use reflection to prevent recurring issues. Use when experiment code fails or produces incorrect results.
Open skill - /data-analysis
Generate statistical analysis code with 4-round review. Select appropriate statistical tests, interpret results, and produce analysis reports with p-values, effect sizes, and confidence intervals. Use when analyzing experimental data for a paper.
Open skill

