Astropy Astronomy logo

Astropy Astronomy

Community
beita6969
astropy-astronomy

Astronomical computations via Astropy. Use when: user asks about celestial coordinates, FITS files, or cosmological calculations. NOT for: telescope control or real-time observation planning.

Overview

Publisherbeita6969
RepositoryScienceClaw
Skill nameastropy-astronomy
Stars
950
Forks
106
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by beita6969 on GitHub. Read the source before you install it.

Installation

Install the Astropy Astronomy AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/beita6969/ScienceClaw/tree/main/skills/astropy-astronomy
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/beita6969/ScienceClaw.git /tmp/ScienceClaw
mkdir -p .claude/skills
cp -r /tmp/ScienceClaw/skills/astropy-astronomy .claude/skills/astropy-astronomy
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Astropy Astronomy in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Astropy Astronomy on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Astropy Astronomy is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Astropy Astronomy

Astronomical computations using Astropy.

When to Use

  • Celestial coordinate transforms (ICRS, Galactic, AltAz)
  • Unit conversions for astronomical quantities
  • Reading, writing, or inspecting FITS files
  • Cosmological calculations (distances, ages, lookback times)
  • Time system conversions (UTC, TAI, TDB, MJD, JD)

When NOT to Use

  • Telescope control or instrument automation
  • Real-time observation planning or scheduling
  • Image reduction or photometry pipelines (use photutils)
  • N-body simulations

Coordinate Transforms

python
from astropy.coordinates import SkyCoord, EarthLocation, AltAz
from astropy.time import Time
import astropy.units as u

coord = SkyCoord(ra=10.684*u.deg, dec=41.269*u.deg, frame='icrs')  # M31
coord_str = SkyCoord('00h42m44.3s', '+41d16m09s', frame='icrs')

# ICRS to Galactic
galactic = coord.galactic
print(f"l={galactic.l:.4f}, b={galactic.b:.4f}")

# Angular separation
c1 = SkyCoord(ra=10.684*u.deg, dec=41.269*u.deg)
c2 = SkyCoord(ra=11.0*u.deg, dec=41.5*u.deg)
sep = c1.separation(c2)

# AltAz (horizontal) coordinates
location = EarthLocation(lat=34.05*u.deg, lon=-118.25*u.deg, height=100*u.m)
time = Time('2026-03-15 03:00:00', scale='utc')
altaz = coord.transform_to(AltAz(obstime=time, location=location))
print(f"Alt={altaz.alt:.2f}, Az={altaz.az:.2f}")

Unit Conversions

python
import astropy.units as u

d = 10 * u.pc
print(d.to(u.lyr))         # parsecs to light-years
wav = 21 * u.cm
freq = wav.to(u.GHz, equivalencies=u.spectral())
wavelength = (13.6 * u.eV).to(u.nm, equivalencies=u.spectral())

FITS File Handling

python
from astropy.io import fits

with fits.open('image.fits') as hdul:
    hdul.info()
    header = hdul[0].header
    data = hdul[0].data

hdu = fits.PrimaryHDU(data_array)
hdu.header['OBJECT'] = 'M31'
hdu.writeto('output.fits', overwrite=True)

Cosmological Calculations

python
from astropy.cosmology import Planck18 as cosmo

z = 1.0
d_L = cosmo.luminosity_distance(z)       # luminosity distance
d_A = cosmo.angular_diameter_distance(z) # angular diameter distance
age = cosmo.age(z)                       # age of universe at z
lookback = cosmo.lookback_time(z)        # lookback time
H_z = cosmo.H(z)                        # Hubble parameter at z

Time Conversions

python
from astropy.time import Time
import astropy.units as u

t = Time('2026-03-15 12:00:00', scale='utc')
print(t.jd, t.mjd, t.unix)   # JD, MJD, Unix
print(t.tai, t.tdb)           # TAI, TDB scales
now = Time.now()

Quick One-liner

bash
python3 -c "
from astropy.coordinates import SkyCoord; import astropy.units as u
c = SkyCoord(ra=83.633*u.deg, dec=22.014*u.deg)
print(f'Galactic: l={c.galactic.l:.3f}, b={c.galactic.b:.3f}')
"

Best Practices

  1. Always attach units to quantities using astropy.units.
  2. Specify time scale explicitly (utc, tai, tdb).
  3. Use Planck18 as default cosmology unless otherwise specified.
  4. Close FITS files or use context managers to prevent resource leaks.
  5. Use SkyCoord for all coordinate work rather than manual trig.

Frequently asked questions

What does the Astropy Astronomy AI skill do?

Astronomical computations via Astropy. Use when: user asks about celestial coordinates, FITS files, or cosmological calculations. NOT for: telescope control or real-time observation planning.

Why use Astropy Astronomy on TypingMind?

Because you install it once and use it with any model. Astropy Astronomy is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Astropy Astronomy in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/beita6969/ScienceClaw/tree/main/skills/astropy-astronomy. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Astropy Astronomy?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Astropy Astronomy?

As many as you like. As long as a model supports skills, you can use Astropy Astronomy with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Astropy Astronomy AI skill free?

Yes. It is published on GitHub by beita6969 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇