Skip to content
Back to skills

Cosmology

ASecurity

"Use Astropy cosmology realizations, FLRW classes, distances, ages,

  • 247 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 8, 2026
dataangularapi

Works with

  • api

Security analysis

A100/100

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

Scanned September 8, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Cosmology?

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

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

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: cosmology
description: "Use Astropy cosmology realizations, FLRW classes, distances, ages,
  redshift inversion, cosmology units, equivalencies, and serialization."
metadata:
  disco-role: operating
disable-model-invocation: true
license: BSD 3-Clause
---

# Cosmology Router

Use this sub-skill when a task centers on `astropy.cosmology` models,
realizations, cosmological calculations, redshift inversion, or cosmology I/O.

## Load This When

- The task mentions `Planck18`, `default_cosmology`, `FlatLambdaCDM`,
  `LambdaCDM`, `w0waCDM`, cosmology parameters, or cloning a cosmology.
- The user needs age, lookback time, comoving/luminosity/angular-diameter
  distance, distance modulus, Hubble parameter, density parameters, critical
  density, or absorption distance.
- The task uses `z_at_value`, vectorized redshifts, cosmology units, little-h
  equivalencies, or cosmology serialization.
- A workflow must preserve cosmology metadata in mappings, tables, YAML, ECSV,
  or another registered format.

## Route Away When

- General units/equivalencies are the main question; use
  `../units-constants/SKILL.md`.
- Table format mechanics are central; use `../tables-io/SKILL.md`.
- Model fitting or time-series analysis is central; use
  `../modeling-stats-timeseries/SKILL.md`.

## First Actions

1. Identify whether the user wants a built-in realization, current default, or
   custom class.
2. Keep redshift inputs scalar/vectorized and unitless unless an API expects a
   `Quantity`.
3. Preserve output quantities with units; do not strip `.value` until necessary.
4. For custom cosmologies, state all required parameters and units.
5. For inverse calculations, bound `z_at_value` and validate the solution.
6. For serialization, choose the target format and verify round-trip metadata.

## References

- [references/api-reference.md](references/api-reference.md) lists classes,
  functions, realizations, and I/O APIs.
- [references/workflows.md](references/workflows.md) covers common calculations,
  custom cosmologies, redshift inversion, and serialization.
- [references/troubleshooting.md](references/troubleshooting.md) covers unit
  issues, solver bounds, default cosmology surprises, optional dependencies, and
  metadata round-trips.

## Safety and Validation

- Always state which cosmology was used.
- Validate units on every output.
- Use bounded redshift grids/solvers for automated tasks.
- Do not assume built-in realization names are unchanged across major versions;
  check availability in the installed package.

## Native-Backed Validation Ideas

- Evaluate `Planck18.age(0)` and assert it is a positive Gyr quantity.
- Compute `Planck18.comoving_distance(1)` and assert Mpc-equivalent units.
- Clone a realization with a new name and verify parameters/metadata.

Files in this skill

  • SKILL.md2.7 KB
  • references/api-reference.md1.5 KB
  • references/troubleshooting.md1.2 KB
  • references/workflows.md1.5 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.