Agent skill

Select Trainer

by PINA-org in PINA-org/PINA

Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options.

MITAuto-check passedAI & LLM Engineering

Install Select Trainer

skills CLI
$ npx skills add PINA-org/PINA --skill select-trainer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install PINA-org/PINA select-trainer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/select-trainer .claude/skills/select-trainer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
select-trainer
GitHub stars
797
Token cost
~1.3k tokens
SKILL.md length
423 words
Files
1
Skills in repo
10
Repo updated
First seen
Licence
MIT

At a glance

Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options.

  • Works in 3 steps: Understand what the trainer needs → Configure the trainer → Train and test
  • The user asks how do I train
  • SKILL.md covers Step 1 — Understand what the…, Step 2 — Configure the trainer, Step 3 — Train and test and Templates, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Select Trainer is an agent skill from PINA-org/PINA. Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options. Use when the user asks "how do I train", "how to train", "set up training", "trainer", "Trainer", "train my model", "fit", "training loop", or similar. Also triggers when the user mentions batching, training configuration, train/val/test split, or is confused about how to start training.

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode, codex, claude

It sits in AI & LLM Engineering, covering Deep learning. The repository describes itself as: Physics-Informed Neural networks for Advanced modeling. The licence is MIT.

When your agent uses it

  • The user asks how do I train
  • Set up training
  • The user mentions batching
  • Training configuration

Example prompts

  • “how do I train”
  • “how to train”
  • “set up training”
  • “/select-trainer”

Requirements

  • Python 3
  • Compatibility (from SKILL.md): opencode, codex, claude

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. Understand what the trainer needs
  2. Configure the trainer
  3. Train and test

What it can do on your machine

Read from SKILL.md and the folder at commit 0cd8afb. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    opencode, codex, claude

    From compatibility in the SKILL.md frontmatter.

Context cost

Select Trainer loads about 1.3k tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 423 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from PINA-org/PINA at commit 0cd8afb, republished under its MIT licence (© PINA-org). 423 words, ~1,299 tokens.

Download SKILL.mdSave it as .claude/skills/select-trainer/SKILL.md (or your agent's skills folder).
name
select-trainer
description
Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options. Use when the user asks "how do I train", "how to train", "set up training", "trainer", "Trainer", "train my model", "fit", "training loop", or similar. Also triggers when the user mentions batching, training configuration, train/val/test split, or is confused about how to start training.
compatibility
opencode, codex, claude
license
MIT
metadata.audience
users
metadata.workflow
training-setup

Configure Training for a PINA Solver

[!IMPORTANT] Read RULES.md before using this skill — it applies to all skills.

Use this skill to set up and run training once a solver has been chosen.

PINA's Trainer wraps Lightning's Trainer with PINA-specific defaults: data splitting across conditions, batching strategies, device placement for inverse parameters, and gradient tracking for physics-informed solvers.

Step 1 — Understand what the trainer needs

The trainer needs three things. If any are missing, ask the user:

  1. Solver (required) — already chosen and instantiated.
  2. Domain discretisation — all DomainEquationCondition domains must be sampled before the trainer can create dataloaders.
  3. Training config — epochs, batch size, accelerator, device.
Domain discretisation

Physics-informed problems use domain=... in their conditions. The trainer requires every such domain to have been sampled:

python
problem.discretise_domain(n=1000, mode="random")

If you forget, the trainer raises a clear error listing which domains are missing.

Step 2 — Configure the trainer

The constructor has two groups of parameters: PINA-specific and Lightning **kwargs passed through to the parent class.

PINA-specific parameters
ParameterDefaultWhat it controls
solver— (required)The solver instance to train
batch_sizeNoneNone = full batch; int = mini-batches
train_size / val_size / test_size1.0 / 0.0 / 0.0Fraction split per condition
batching_mode"common_batch_size"How batches are built across conditions (see below)
automatic_batchingFalseTrue = Lightning's default collation; False = direct subset retrieval
num_workers0Dataloader workers
pin_memoryFalsePin memory for faster GPU transfer
shuffleTrueShuffle before splitting
Show full SKILL.md (193 more words)Show less
Batching modes

The mode controls how condition data is assembled into batches:

ModeBehaviourWhen to use
"common_batch_size"Each condition supplies batch_size points per batchDefault — works for most cases
"proportional"Batch sizes are scaled by condition dataset sizesUnbalanced datasets (e.g., many interior points but few boundary points)
"separate_conditions"Iterates through each condition separatelyEach condition's data is heterogeneous (e.g., one is pointwise, another is a graph)
Common Lightning kwargs

These are passed as **kwargs and fully documented by PyTorch Lightning. Key ones for PINA users:

KwargWhat it does
max_epochsNumber of training epochs
accelerator"cpu", "gpu", "mps" (Apple Silicon)
devicesDevice index or count (e.g., 1, [0], "auto")
precision"16-mixed", "32", "64", "bf16-mixed"
enable_progress_barTrue / False
gradient_clip_valGradient clipping threshold
callbacksList of Lightning callbacks (e.g., ModelCheckpoint, EarlyStopping)

Step 3 — Train and test

Usage is uniform regardless of solver type:

python
from pina import Trainer

trainer = Trainer(
    solver=solver,
    max_epochs=1000,
    batch_size=32,
    accelerator="cpu",
    train_size=0.8,
    val_size=0.1,
    test_size=0.1,
)

trainer.train()   # Lightning fit()
trainer.test()    # Lightning test() — optional

Templates

Full-batch physics-informed
python
problem.discretise_domain(n=5000, mode="random")

trainer = Trainer(
    solver=solver,
    max_epochs=10000,
    batch_size=None,          # full batch — no mini-batching
    accelerator="cpu",
)
trainer.train()
Mini-batch supervised
python
trainer = Trainer(
    solver=solver,
    max_epochs=500,
    batch_size=64,
    train_size=0.8,
    val_size=0.1,
    test_size=0.1,
    accelerator="gpu",
    devices=1,
    num_workers=4,
    shuffle=True,
)
trainer.train()
trainer.test()
Unbalanced conditions (proportional batching)
python
trainer = Trainer(
    solver=solver,
    batch_size=512,
    batching_mode="proportional",
    max_epochs=1000,
)

Checklist

  • Solver already chosen and instantiated (see select-solver skill)
  • All domains discretised: problem.discretise_domain(n=..., mode="...")
  • Batch size decided: None for full-batch, an int for mini-batches
  • Batching mode selected based on condition balance
  • Train/val/test split configured
  • Accelerator and device chosen
  • Training started: trainer.train()

© PINA-org, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .opencode/skills/select-trainer of PINA-org/PINA.

Open the folder on GitHubat commit 0cd8afb

Compare with similar skills

Select Trainer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Select Trainer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Select Trainer this skillPINA-org/PINA797—~1.3kAutomated safety check: PassMIT
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs13k9 repos~3.3kAutomated safety check: PassMIT
Add Oponnx/onnx22k—~1.2kAutomated safety check: PassApache-2.0
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k8 repos~1.7kAutomated safety check: PassMIT
Add Function Bodyonnx/onnx22k—~1.1kAutomated safety check: PassApache-2.0

Similar skills

  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Segment Anything Model Guide

    Orchestra-Research/AI-Research-SKILLs

    Guide to using Meta's Segment Anything Model for zero-shot image segmentation with point, box or mask prompts, or automatic mask generation.

    13k GitHub starsUsed in 9 repos~3.3k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Op

    onnx/onnx

    Add a new ONNX operator or update an existing operator to a new opset version.

    22k GitHub stars~1.2k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 8 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Add a function body definition to an ONNX operator, defining how it decomposes into simpler ops.

    22k GitHub stars~1.1k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Paddle Design Distributed

    PaddlePaddle/Paddle

    A skill your agent uses when working with Paddle's distributed training system: understanding parallelism strategies (DP, ZeRO, TP, PP, SP), semi-automatic parallel with ProcessMesh + shardtensor…

    24k GitHub stars~660 tokensUpdated 8 days ago
    AI & LLM EngineeringAuto-check passed

More from PINA-org/PINA

All 10 skills in this repo
  • Create Skill

    PINA-org/PINA

    Create, modify, and improve PINA skills. An agent skill from PINA-org/PINA.

    797 GitHub stars~1.8k tokensUpdated 2 days ago
    Auto-check passed
  • Pina Workflow

    PINA-org/PINA

    Orchestrates a complete session from problem definition through trained solver.

    797 GitHub stars~1.1k tokensUpdated 2 days ago
    Auto-check passed
  • Select Model

    PINA-org/PINA

    Guides users through selecting, configuring, or creating a PyTorch model for a PINA problem.

    797 GitHub stars~2.4k tokensUpdated 2 days ago
    Auto-check passed
  • Select Solver

    PINA-org/PINA

    Guides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits.

    797 GitHub stars~2.9k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Sync Checker

    PINA-org/PINA

    Audits SKILL.md files in this repo's skills directory for references to functions, classes, or modules (mentioned by name in prose, e.g.

    797 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Condition Setup

    PINA-org/PINA

    Set up conditions for PINA problems. An agent skill from PINA-org/PINA.

    797 GitHub stars~1k tokensUpdated 2 days ago
    Auto-check passed

Questions about Select Trainer

What does Select Trainer do?

Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options. Select Trainer is an agent skill from PINA-org/PINA. Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options.

When should I use Select Trainer?

Select Trainer fits situations like: the user asks how do I train; set up training; the user mentions batching; training configuration.

How do I install Select Trainer in Claude Code?

Run `npx skills add PINA-org/PINA --skill select-trainer -a claude-code`. Or copy the skill folder (.opencode/skills/select-trainer in PINA-org/PINA) into .claude/skills/select-trainer in your project. Claude Code loads it when a task matches its description.

How do I install Select Trainer in Codex?

Run `npx skills add PINA-org/PINA --skill select-trainer -a codex`. Or copy the skill folder (.opencode/skills/select-trainer in PINA-org/PINA) into .agents/skills/select-trainer in your project. Codex loads it when a task matches its description.

Can I use Select Trainer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add PINA-org/PINA --skill select-trainer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/select-trainer, .gemini/skills/select-trainer, .github/skills/select-trainer and .opencode/skills/select-trainer in your project.

What does Select Trainer need to run?

SKILL.md names no scripts, command-line tools or credentials: Select Trainer is instructions for the agent only. Our summary lists: Python 3. Compatibility (from SKILL.md): opencode, codex, claude.

Does Select Trainer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Select Trainer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Select Trainer use?

Select Trainer is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Select Trainer use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Select Trainer?

Skills that share tags, products or a category with Select Trainer: Add Uint Support (pytorch/pytorch, 104k stars), Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars), Add Op (onnx/onnx, 22k stars) and CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Select Trainer?

PINA-org (a GitHub organization) maintains it in PINA-org/PINA, which has 797 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 6, 2026.

Source: PINA-org/PINA on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.