Skip to content
Back to skills

Structured Expressions

ASecurity

"Use when PySR needs TemplateExpressionSpec, parametric templates,

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
businessgoexpressapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill structured-expressions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Structured Expressions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Structured Expressions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-structured-expressions/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-structured-expressions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: structured-expressions
description: "Use when PySR needs TemplateExpressionSpec, parametric templates,
  shared or vector-valued expressions, differential operators, or seeded
  template guesses."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Structured expressions

Use this sub-skill when the equation shape is partly known and PySR should search only the unknown pieces.

## Use this sub-skill for
- `TemplateExpressionSpec` planning or repair
- parametric expressions with category-specific learned constants
- shared subexpressions or vector-valued residual templates
- differential templates that use `D`
- seeded guesses for known template placeholders

## Route to another sub-skill when
- the task is a free-form fit without known structure → `fit-and-diagnose`
- the task needs custom losses, operator constraints, or tree walks → `customization-and-constraints`
- the task needs SymPy / LaTeX / JAX / PyTorch exports or reload handling → `export-and-artifacts`

## Operating rules
1. Keep the template shape explicit: `combine`, `expressions`, `variable_names`, and optional `parameters`.
2. Treat category indices as Julia indices inside the template. If the source labels are 0-based, shift them before `fit`.
3. For vector-valued templates, move the extra targets into `X`, use a dummy `y`, and make the elementwise loss return the residual from the template.
4. For differential templates, use `D` and verify the argument index.
5. Do not promise template export methods that are unsupported. Use `model.equations_["julia_expression"]` and component trees instead.
6. If the template also needs a custom objective, hand off to `customization-and-constraints` and use `loss_function_expression`.

## Bundled assets
- `references/template-workflows.md`
- `references/api-reference.md`
- `references/troubleshooting.md`
- `scripts/template_spec_builder.py`

## Verification target
A later agent should be able to build a valid template plan, explain indexing and parameters, seed guesses correctly, and identify unsupported exports without running a search.

Files in this skill

  • SKILL.md2.1 KB
  • references/api-reference.md3 KB
  • references/template-workflows.md4.4 KB
  • references/troubleshooting.md2.7 KB
  • scripts/template_spec_builder.py15.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.