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.
Guides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits.
$ npx skills add PINA-org/PINA --skill select-solver -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install PINA-org/PINA select-solver --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/select-solver .claude/skills/select-solver && rm -rf skills-srcUse ~/.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/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .claude/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solverType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add PINA-org/PINA --skill select-solver -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install PINA-org/PINA select-solver --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/select-solver .agents/skills/select-solver && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .agents/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PINA-org/PINA --skill select-solver -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install PINA-org/PINA select-solver --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/select-solver .cursor/skills/select-solver && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .cursor/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/PINA-org/PINA.git --path .opencode/skills/select-solver--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add PINA-org/PINA --skill select-solver -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install PINA-org/PINA select-solver --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/select-solver .gemini/skills/select-solver && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .gemini/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install PINA-org/PINA select-solverInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add PINA-org/PINA --skill select-solver -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/select-solver .github/skills/select-solver && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .github/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add PINA-org/PINA --skill select-solver -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install PINA-org/PINA select-solver --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/PINA-org/PINA.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/select-solver .opencode/skills/select-solver && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "select-solver" agent skill from https://github.com/PINA-org/PINA/tree/master/.opencode/skills/select-solver into .opencode/skills/select-solver/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "select-solver", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
select-solverGuides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits.
Select Solver is an agent skill from PINA-org/PINA. Guides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits. Use when the user asks "what solver should I use", "how do I train this", "which solver", "choose a solver", "pick a solver", "solver selection", "how do I set up training", "what's the right solver", or similar. Also triggers when the user mentions specific solver names (PINN, CausalPINN, SelfAdaptivePINN, SupervisedSolver, etc.) or asks about custom training loops / custom solvers.
Its SKILL.md is about 2.9k 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.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 0cd8afb. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
opencode, codex, claude
From compatibility in the SKILL.md frontmatter.
Select Solver loads about 2.9k tokens when it runs. Until then it costs about 131 tokens; SKILL.md has 852 words of instructions outside code blocks.
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.
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.
The full file from PINA-org/PINA at commit 0cd8afb, republished under its MIT licence (© PINA-org). 852 words, ~2,907 tokens.
.claude/skills/select-solver/SKILL.md (or your agent's skills folder).[!IMPORTANT] Read RULES.md before using this skill — it applies to all skills.
Use this skill to pick the correct PINA solver — or design a custom one — based on your problem type, conditions, and training requirements.
PINA solvers are driven by conditions (data format) and model count
(single vs ensemble). The condition types in your problem.conditions dictate
which solver families are compatible; additional requirements (causality,
gradient enhancement, adaptive weighting) narrow the choice further.
Start by identifying what kind of data your problem works with. Ask conversationally if the user hasn't already built their problem object:
n_windows and unroll_length.
The data has a sequential structure and the model rolls out predictions
step by step.Condition(input=..., target=...).Condition(domain=..., equation=...) or
Condition(input=..., equation=...).You can inspect an existing problem object directly:
for name, cond in problem.conditions.items():
print(name, type(cond).__name__)If the user hasn't defined conditions yet, ask if you can help setting up the problem.
Once the condition types are clear, map them to solver families. This is a decision tree, not a menu — work through it with the user.
If every condition is (or includes) a TimeSeriesCondition:
→ AutoregressiveSingleModelSolver (one model)
→ AutoregressiveEnsembleSolver (multiple models, averaged)No other solver family handles TimeSeriesCondition.
Key parameters:
eps — noise injected during unrolling (regularisation)unroll_length — number of steps per forward passIf all conditions are InputTargetCondition (no equations, no domains):
→ SupervisedSingleModelSolver (one model)
→ SupervisedEnsembleSolver (N models with deep ensemble)The Ensemble variant trains N independent copies and averages their
predictions at inference.
If conditions include InputEquationCondition or DomainEquationCondition,
you're in the physics-informed family. Now ask two follow-up questions:
| Count | Options |
|---|---|
| Single model | PhysicsInformedSingleModelSolver (base) + its specialisations below |
| Multiple models (ensemble) | PhysicsInformedEnsembleSolver |
Multiple models trains N independent copies and averages predictions.
For the single-model physics-informed case, ask the user about these. Each maps to a distinct solver:
| Requirement | Solver | What it does |
|---|---|---|
| Standard (no special needs) | PhysicsInformedSingleModelSolver | Plain PINN training |
| Gradient-enhanced | GradientPhysicsInformedSingleModelSolver | Adds gradient norm penalty — regularises the solution's derivatives. Requires SpatialProblem (needs .spatial_variables). |
| Causality in time | CausalPhysicsInformedSingleModelSolver | Applies causal temporal weighting so the solver learns forward in time. Requires TimeDependentProblem. |
| Per-point residual attention | RBAPhysicsInformedSingleModelSolver | Re-weights collocation points by residual magnitude across epochs (focus on hard regions). |
| Per-parameter adaptive weights | SelfAdaptivePhysicsInformedSolver | Learns a per-point weight through a second model (min-max optimisation). |
| Adversarial discriminator | CompetitivePhysicsInformedSolver | A discriminator model bets on point residuals; solver must fool it — minimax game. |
Self-adaptive and competitive are not single-model solvers — they manage
multiple optimisers internally. SelfAdaptive trains a weight network
alongside the model; Competitive trains a discriminator.
Ensemble + special requirements? The PhysicsInformedEnsembleSolver
does not layer gradient/causal/self-adaptive on top. For those combinations,
create a custom solver (Step 4).
Once the solver is chosen, the construction pattern is consistent:
from pina.solver import PhysicsInformedSingleModelSolver
# or any other solver
solver = PhysicsInformedSingleModelSolver(
problem=problem,
model=model,
learning_rate=0.001,
# optional:
# loss=torch.nn.MSELoss(),
# weighting=my_weighting,
# scheduler=torch.optim.lr_scheduler.CosineAnnealingLR(...),
# batch_size=32,
)When no built-in solver matches your requirements, PINA's architecture makes
it straightforward to compose one. The key building blocks are mixins —
reusable training_step and _compute_condition_loss overrides.
_compute_condition_loss overridestraining_step for a non-standard optimiser loopEvery solver is a class hierarchy:
BaseSolver
├── training/val/test_step
├── _compute_condition_loss
├── _prepare_condition_data
├── _regularize_condition_loss
└── _loss_from_residual
SingleModelSolver(BaseSolver)
└── automatic_optimization=True, single forward
MultiModelSolver(BaseSolver)
└── automatic_optimization=False, multiple optimisers
EnsembleSolver(BaseSolver) — uses MultiModelSolver internally
└── automatic_optimization=False, averages N modelsMixins override specific methods:
| Mixin | Overrides | Purpose |
|---|---|---|
PhysicsInformedMixin | validation_step, test_step | Enables autograd in no-grad contexts |
GradientEnhancedMixin | _prepare_condition_data, _regularize_condition_loss | Gradient penalty regularisation |
ResidualBasedAttentionMixin | _regularize_condition_loss | Per-point attention weights |
AutoregressiveMixin | _loss_from_residual | Step-wise adaptive loss |
ManualOptimizationMixin | training_step | Disables automatic optimisation |
ConditionAggregatorMixin | training_step | Iterates conditions, aggregates losses |
Pick a base: SingleModelSolver (auto-optim) or MultiModelSolver
(manual optim for multiple optimisers) or EnsembleSolver (N-model avg).
Mix in behaviours by inheriting the mixins in the right order (mixins first so their method overrides take priority):
from pina.solver import SingleModelSolver
from pina.solver.mixin import GradientEnhancedMixin, PhysicsInformedMixin
class MyCustomSolver(
PhysicsInformedMixin, # 1st — ensures autograd in val/test
GradientEnhancedMixin, # 2nd — adds gradient penalty
SingleModelSolver, # 3rd — base training loop
):
def __init__(self, problem, model, **kwargs):
super().__init__(problem=problem, model=model, **kwargs)Override _compute_condition_loss if you need custom per-condition
logic (e.g., different loss functions per condition, special weighting).
The signature is:
def _compute_condition_loss(self, condition, data, batch_idx):
# data is a dict like {"input": tensor, "target": tensor}
# condition is the Condition object
...
return scalar_tensorOverride training_step only for fundamental changes to the optimiser
loop (e.g., alternating min-max, multi-stage schedules):
def training_step(self, batch, batch_idx):
# Custom loop: zero_grad → compute loss → manual_backward → step
...from pina.solver import EnsembleSolver
class CausalEnsemblePINN(EnsembleSolver):
"""Ensemble of models with causal temporal weighting."""
def _compute_condition_loss(self, condition, data, batch_idx):
# Inject causal weighting logic here
# (iterate over time segments, apply causal mask)
...When guiding a user through creating a custom solver, discuss their specific need, identify which existing mixin or base class covers most of it, and then describe only the method they need to override. Avoid generating the full solver class unless the user explicitly asks for it.
Use this pattern when the problem object already exists:
from pina.solver import (
SupervisedSingleModelSolver,
PhysicsInformedSingleModelSolver,
AutoregressiveSingleModelSolver,
PhysicsInformedEnsembleSolver,
)
condition_types = {type(c).__name__ for _, c in problem.conditions.items()}
if "TimeSeriesCondition" in condition_types:
solver = AutoregressiveSingleModelSolver(problem=problem, model=model)
elif "InputTargetCondition" in condition_types and not \
("InputEquationCondition" in condition_types or
"DomainEquationCondition" in condition_types):
solver = SupervisedSingleModelSolver(problem=problem, model=model)
else:
solver = PhysicsInformedSingleModelSolver(problem=problem, model=model)from pina.solver import SingleModelSolver
class MySolver(SingleModelSolver):
"""Custom solver for specialised loss logic."""
def _compute_condition_loss(self, condition, data, batch_idx):
# Your custom loss computation
# data keys: "input", "target" (if InputTargetCondition)
# "input", "equation" (if InputEquationCondition)
...
return loss
def training_step(self, batch, batch_idx):
# Only if you need a custom optimiser loop
...© 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
Just SKILL.md in .opencode/skills/select-solver of PINA-org/PINA.
Open the folder on GitHubat commit 0cd8afb
Select Solver 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Select Solver this skillPINA-org/PINA | 797 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Segment Anything Model GuideOrchestra-Research/AI-Research-SKILLs | 13k | 9 repos | ~3.3k | Automated safety check: Pass | MIT | |
| Add Oponnx/onnx | 22k | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Add Function Bodyonnx/onnx | 22k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 | |
| Add Shape Inferenceonnx/onnx | 22k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Onnxtxtonnx/onnx | 22k | — | ~1.3k | Automated safety check: Pass | Apache-2.0 |
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.
onnx/onnx
Add a new ONNX operator or update an existing operator to a new opset version.
onnx/onnx
Add a function body definition to an ONNX operator, defining how it decomposes into simpler ops.
onnx/onnx
Add or update type and shape inference for an ONNX operator.
onnx/onnx
Read or write ONNX text format ("onnxtxt"). An agent skill from onnx/onnx.
comet-ml/comet-examples
Scaffold a brand-new Comet example in this repo from the canonical template under templates/integration-example/.
PINA-org/PINA
Create, modify, and improve PINA skills. An agent skill from PINA-org/PINA.
PINA-org/PINA
Orchestrates a complete session from problem definition through trained solver.
PINA-org/PINA
Guides users through selecting, configuring, or creating a PyTorch model for a PINA problem.
PINA-org/PINA
Guides users through configuring the PINA Trainer for solver training, including batching strategy, data splitting, and Lightning options.
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.
PINA-org/PINA
Set up conditions for PINA problems. An agent skill from PINA-org/PINA.
Categories
Guides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits. Select Solver is an agent skill from PINA-org/PINA. Guides users through selecting the right PINA solver for their problem, or creating a custom solver when no built-in fits.
Select Solver fits situations like: the user asks what solver should I use; how do I train this; choose a solver; solver selection.
Run `npx skills add PINA-org/PINA --skill select-solver -a claude-code`. Or copy the skill folder (.opencode/skills/select-solver in PINA-org/PINA) into .claude/skills/select-solver in your project. Claude Code loads it when a task matches its description.
Run `npx skills add PINA-org/PINA --skill select-solver -a codex`. Or copy the skill folder (.opencode/skills/select-solver in PINA-org/PINA) into .agents/skills/select-solver in your project. Codex loads it when a task matches its description.
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-solver -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-solver, .gemini/skills/select-solver, .github/skills/select-solver and .opencode/skills/select-solver in your project.
SKILL.md names no scripts, command-line tools or credentials: Select Solver is instructions for the agent only. Our summary lists: Python 3. Compatibility (from SKILL.md): opencode, codex, claude.
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.
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.
Select Solver is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Select Solver: Segment Anything Model Guide (Orchestra-Research/AI-Research-SKILLs, 13k stars), Add Op (onnx/onnx, 22k stars), Add Function Body (onnx/onnx, 22k stars) and Add Shape Inference (onnx/onnx, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
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.