astropy
Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.
Supply asset profile
Data, BI, and analytics
CSV, SQL, notebooks, dashboards, data pipelines, BI, ETL, and spreadsheet analysis.
Scenario
Data analysis
I need my agent to analyze CSV data, produce insights, and explain trends.
Agent fit
Claude Code + CLI + Codex
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add K-Dense-AI/scientific-agent-skills --skill astropy
Maintenance
fresh
2d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
34K
92/100 Quality · 81/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
Trust, audit, and install readiness at a glance
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Human review before install
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
34K GitHub stars
Repo activity
34K stars, 3.3K forks
Maintenance
2d since push
License
BSD-3-Clause license
Install
npx skills add K-Dense-AI/scientific-agent-skills --skill astropy
Install safety
standard package or runtime install path
Permission surface
shell or command execution, filesystem or document access
Agent outcomes
No agent outcome data yet
Docs
Strong README/SKILL.md context
Risk summary
Review before production
- Permission surface needs review: shell or command execution, filesystem or document access
- Dependency/runtime risk: command execution surface, external package install surface
- Permission surface: shell or command execution, filesystem or document access
Install readiness
Install path available
- Install path is available
- Repository evidence is available
- License is declared
- No Agent Proven outcome evidence yet
Agent-readable metadata
Machine-readable decision data for this skill.
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
- Workflow automation workflows
- Claude Code teams
- teams that value GitHub adoption signals
- Move data between tools
Suited agents
Install decision
- Command
- npx skills add K-Dense-AI/scientific-agent-skills --skill astropy
- Policy
- review
- Human review
- yes
Trust and risk
- Trust
- 73/100
- Audit
- 87/100
- Risk level
- Needs review
Outcome loop
- Endpoint
- /api/agent/outcome
- Event ID
- resolve
- Outcomes
- 5
Install command
npx skills add K-Dense-AI/scientific-agent-skills --skill astropyDo not use when
- teams that need a vendor-supported SLA
- high-compliance environments without internal security review
- No major risk signals from current metadata
- High-risk permission hints: Shell or command execution
- Dependency or permission surface needs review
Agent safety v2
55/100 · Review before install
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Shell or command execution
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Network access
Skill likely fetches remote pages, APIs, repositories, or external services.
medium
Filesystem access
Skill may read or write project files, documents, generated artifacts, or local workspace state.
medium
Database access
Skill may inspect schemas, query databases, or work with persistent stores.
- High-risk permission hints: Shell or command execution
- Dependency or permission surface needs review
Install targets
Install this skill in your agent workflow
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
OpenAgentSkill CLI
Resolve policy, run the source installer safely, and report a verified install receipt.
$ npx --yes https://github.com/Leon-Drq/openagentskill/releases/download/cli-v0.2.1/openagentskill-0.2.1.tgz install k-dense-ai-astropyAgent resolve plan
Let an agent verify fit before installing.
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20astropy%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20astropy%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/k-dense-ai-astropy/install
Agent should check
- Task fit and alternatives from Resolve API.
- Audit score, trust score, and safety policy warnings.
- Install target compatibility for Codex, Claude Code, Cursor, or CLI.
Copy prompt
Task: Use astropy in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20astropy%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/k-dense-ai-astropy/install
Install command: npx skills add K-Dense-AI/scientific-agent-skills --skill astropy
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Give an agent the install path, not another directory page.
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/k-dense-ai-astropy/install
LLM text format
/api/skills/k-dense-ai-astropy/install?format=text
Find alternatives
/api/skills/search?q=astropy&limit=3
Agent prompt
Use astropy for this task. Review https://www.openagentskill.com/api/skills/k-dense-ai-astropy/install, then install with: npx skills add K-Dense-AI/scientific-agent-skills --skill astropyRegistry metadata
Agent-readable profile for automatic skill selection.
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/k-dense-ai-astropy
LLM text
/api/registry/manifest/k-dense-ai-astropy?format=text
Install alias
/api/registry/install/k-dense-ai-astropy
Recommend
/api/registry/recommend?task=Use%20astropy%20in%20an%20agent%20workflow&limit=3
Agent fit
Workflow automation
Use-case tags
Platforms
Claude Code
Audit report
Needs review · 87/100
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Primary pick for Workflow automation
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Workflow automation
Trust label
Production-ready
Install path
Command ready
Use when
- Workflow automation workflows
- Claude Code teams
- teams that value GitHub adoption signals
Evidence
- 33,974 GitHub stars
- recent repository activity
- install command or GitHub repo available
- 92/100 quality profile
- 19 OpenAgentSkill engagement events
review first
- No major risk signals from current metadata
Implementation path
- 1Install it in a sandbox agent and run one Workflow automation task end to end.
- 2Compare output quality, latency, and failure behavior against at least one alternative.
- 3Promote it into production only after reviewing repository permissions, license, and maintenance signals.
Trust profile
Sandbox only
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS34K GitHub stars
Stars/forks activity
PASS34K stars, 3.3K forks; issue activity unavailable in current metadata
Recent maintenance
PASS2d since push
License clarity
PASSBSD-3-Clause license
Good signals
- AI review approved
- Install path is available
- Repository evidence is available
- Recently maintained repository
- Large GitHub adoption signal
- Install command has no obvious high-risk pattern
- Outcome loop is ready but needs first real agent run
Review before install
- Permission surface needs review: shell or command execution, filesystem or document access
- Dependency/runtime risk: command execution surface, external package install surface
- Permission surface: shell or command execution, filesystem or document access
- No real agent outcome reports yet
- Human review required before unattended installation
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
Excellent candidate for agent workflows
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Use this skill in these scenarios
Automate repeated work
Workflow automation
I need my agent to automate a repeated workflow across tools and files.
Analyze datasets
Data analysis
I need my agent to analyze CSV data, produce insights, and explain trends.
Build and ship code
Coding agents
I need a coding agent that can understand a repository, edit code, and review pull requests.
Workflow fit
Add it to a complete workflow
Inspect, patch, and verify code
Coding review agent
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Find, compare, and synthesize
Research report agent
A workflow for agents that gather sources, compare claims, summarize long material, and draft useful research briefs.
Turn skills into distribution
Content growth agent
A workflow for turning newly indexed skills into SEO briefs, social drafts, comparison pages, and reusable publishing workflows.
Alternative shortlist
Compare before you install
Similar skills that may fit this task.
D3
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
Echarts
Apache ECharts is a powerful, interactive charting and data visualization library for browser
Data Science For Beginners
10 Weeks, 20 Lessons, Data Science for All!
Sequelize
Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.
Overview
--- name: astropy description: Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy. license: BSD-3-Clause license compatibility: Requires Python 3.11+ with astropy installed (uv for package installation). Some features (object name resolution, site lookups, remote FITS reads, IERS updates) need network access. metadata: version: "1.2" skill-author: K-Dense Inc. ---
# Astropy
## Overview
Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis. Use astropy for coordinate transformations, unit and quantity calculations, FITS file operations, cosmological calculations, precise time handling, tabular data manipulation, and astronomical image processing.
## When to Use This Skill
Use astropy when tasks involve: - Converting between celestial coordinate systems (ICRS, Galactic, FK5, AltAz, etc.) - Working with physical units and quantities (converting Jy to mJy, parsecs to km, etc.) - Reading, writing, or manipulating FITS files (images or tables) - Cosmological calculations (luminosity distance, lookback time, Hubble parameter) - Precise time handling with different time scales (UTC, TAI, TT, TDB) and formats (JD, MJD, ISO) - Table operations (reading catalogs, cross-matching, filtering, joining) - WCS transformations between pixel and world coordinates - Astronomical constants and calculations
## Quick Start
```python import astropy.units as u from astropy.coordinates import SkyCoord from astropy.time import Time from astropy.io import fits from astropy.table import Table from astropy.cosmology import Planck18
# Units and quantities distance = 100 * u.pc distance_km = distance.to(u.km)
# Coordinates coord = SkyCoord(ra=10.5*u.degree, dec=41.2*u.degree, frame='icrs') coord_galactic = coord.galactic
# Time t = Time('2023-01-15 12:30:00') jd = t.jd # Julian Date
# FITS files data = fits.getdata('image.fits') header = fits.getheader('image.fits')
# Tables table = Table.read('catalog.fits')
# Cosmology d_L = Planck18.luminosity_distance(z=1.0) ```
## Core Capabilities
### 1. Units and Quantities (`astropy.units`)
Handle physical quantities with units, perform unit conversions, and ensure dimensional consistency in calculations.
**Key operations:** - Create quantities by multiplying values with units - Convert between units using `.to()` method - Perform arithmetic with automatic unit handling - Use equivalencies for domain-specific conversions (spectral, doppler, parallax) - Work with logarithmic units (magnitudes, decibels)
**See:** `references/units.md` for comprehensive documentation, unit systems, equivalencies, performance optimization, and unit arithmetic.
### 2. Coordinate Systems (`astropy.coordinates`)
Represent celestial positions and transform between different coordinate frames.
**Key operations:** - Create coordinates with `SkyCoord` in any frame (ICRS, Galactic, FK5, AltAz, etc.) - Transform between coordinate systems - Calculate angular separations and position angles - Match coordinates to catalogs - Include distance for 3D coordinate operations - Handle proper motions and radial velocities - Query named objects from online databases
**See:** `references/coordinates.md` for detailed coordinate frame descriptions, transformations, observer-dependent frames (AltAz), catalog matching, and performance tips.
### 3. Cosmological Calculations (`astropy.cosmology`)
Perform cosmological calculations using standard cosmological models.
**Key operations:** - Use built-in cosmologies (Planck18, WMAP9, etc.) - Create custom cosmological models - Calculate distances (luminosity, comoving, angular diameter) - Compute ages and lookback times - Determine Hubble parameter at any redshift - Calculate density parameters and volumes - Perform inverse calculations (find z for given distance)
**See:** `references/cosmology.md` for available models, distance calculations, time calculations, density parameters, and neutrino effects.
### 4. FITS File Handling (`astropy.io.fits`)
Read, write, and manipulate FITS (Flexible Image Transport System) files.
**Key operations:** - Open FITS files with context managers - Access HDUs (Header Data Units) by index or name - Read and modify headers (keywords, comments, history) - Work with image data (NumPy arrays) - Handle table data (binary and ASCII tables) - Create new FITS files (single or multi-extension) - Use memory mapping for large files - Access remote FITS files (S3, HTTP)
**See:** `references/fits.md` for comprehensive file operations, header manipulation, image and table handling, multi-extension files, and performance considerations.
### 5. Table Operations (`astropy.table`)
Work with tabular data with support for units, metadata, and various file formats.
**Key operations:** - Create tables from arrays, lists, or dictionaries - Read/write tables in multiple formats (FITS, CSV, HDF5, VOTable) - Access and modify columns and rows - Sort, filter, and index tables - Perform database-style operations (join, group, aggregate) - Stack and concatenate tables - Work with unit-aware columns (QTable) - Handle missing data with masking
**See:** `references/tables.md` for table creation, I/O operations, data manipulation, sorting, filtering, joins, grouping, and performance tips.
### 6. Time Handling (`astropy.time`)
Precise time representation and conversion between time scales and formats.
**Key operations:** - Create Time objects in various formats (ISO, JD, MJD, Unix, etc.) - Convert between time scales (UTC, TAI, TT, TDB, etc.) - Perform time arithmetic with TimeDelta - Calculate sidereal time for observers - Compute light travel time corrections (barycentric, heliocentric) - Work with time arrays efficiently - Handle masked (missing) times
**See:** `references/time.md` for time formats, time scales, conversions, arithmetic, observing features, and precision handling.
### 7. World Coordinate System (`astropy.wcs`)
Transform between pixel coordinates in images and world coordinates.
**Key operations:** - Read WCS from FITS headers - Convert pixel coordinates to world coordinates (and vice versa) - Calculate image footprints - Access WCS parameters (reference pixel, projection, scale) - Create custom WCS objects
**See:** `references/wcs_and_other_modules.md` for WCS operations and transformations.
## Additional Capabilities
The `references/wcs_and_other_modules.md` file also covers:
### NDData and CCDData Containers for n-dimensional datasets with metadata, uncertainty, masking, and WCS information.
### Modeling Framework for creating and fitting mathematical models to astronomical data.
### Visualization Tools for astronomical image display with appropriate stretching and scaling.
### Constants Physical and astronomical constants with proper units (speed of light, solar mass, Planck constant, etc.).
### Convolution Image processing kernels for smoothing and filtering.
### Statistics Robust statistical functions including sigma clipping and outlier rejection.
## Installation
```bash # Reproducible install against the current stable release uv pip install "astropy==7.2.0"
# Recommended optional dependencies for plotting and common workflows uv pip install "astropy[recommended]==7.2.0"
# Full optional dependency set for broad astronomy workflows uv pip install "astropy[all]==7.2.0" ```
Astropy 7.2.0 requires Python 3.11+ and depends on NumPy, PyERFA, PyYAML, and packaging. Use an isolated virtual environment; do not install Astropy with elevated privileges.
Note that the `[recommended]` and `[all]` extras pull in transitive dependencies (matplotlib, scipy, etc.) at unpinned versions. For reproducible production environments, pin the full dependency tree with a lockfile (`uv lock` in a project, or `uv pip compile` for requirements files) and review the resolved versions before deploying.
## Common Workflows
### Converting Coordinates Between Systems
```python from astropy.coordinates import SkyCoord import astropy.units as u
# Create coordinate c = SkyCoord(ra='05h23m34.5s', dec='-69d45m22s', frame='icrs')
# Transform to galactic c_gal = c.galactic print(f"l={c_gal.l.deg}, b={c_gal.b.deg}")
# Transform to alt-az (requires time and location) from astropy.time import Time from astropy.coordinates import EarthLocation, AltAz
observing_time = Time('2023-06-15 23:00:00') observing_location = EarthLocation(lat=40*u.deg, lon=-120*u.deg) aa_frame = AltAz(obstime=observing_time, location=observing_location) c_altaz = c.transform_to(aa_frame) print(f"Alt={c_altaz.alt.deg}, Az={c_altaz.az.deg}") ```
### Reading and Analyzing FITS Files
```python from astropy.io import fits import numpy as np
# Open FITS file with fits.open('observation.fits') as hdul: # Display structure hdul.info()
# Get image data and header data = hdul[1].data header = hdul[1].header
# Access header values exptime = header['EXPTIME'] filter_name = header['FILTER']
# Analyze data mean = np.mean(data) median = np.median(data) print(f"Mean: {mean}, Median: {median}") ```
### Cosmological Distance Calculations
```python from astropy.cosmology import Planck18 import astropy.units as u import numpy as np
# Calculate distances at z=1.5 z = 1.5 d_L = Planck18.luminosity_distance(z) d_A = Planck18.angular_diameter_distance(z)
print(f"Luminosity distance: {d_L}") print(f"Angular diameter distance: {d_A}")
# Age of universe at that redshift age = Planck18.age(z) print(f"Age at z={z}: {age.to(u.Gyr)}")
# Lookback time t_lookback = Planck18.lookback_time(z) print(f"Lookback time: {t_lookback.to(u.Gyr)}") ```
### Cross-Matching Catalogs
```python from astropy.table import Table from astropy.coordinates import SkyCoord, match_coordinates_sky import astropy.units as u
# Read catalogs cat1 = Table.read('catalog1.fits') cat2 = Table.read('catalog2.fits')
# Create coordinate objects coords1 = SkyCoord(ra=cat1['RA']*u.degree, dec=cat1['DEC']*u.degree) coords2 = SkyCoord(ra=cat2['RA']*u.degree, dec=cat2['DEC']*u.degree)
# Find matches idx, sep, _ = coords1.match_to_catalog_sky(coords2)
# Filter by separation threshold max_sep = 1 * u.arcsec matches = sep < max_sep
# Create matched catalogs cat1_matched = cat1[matches] cat2_matched = cat2[idx[matches]] print(f"Found {len(cat1_matched)} matches") ```
## Best Practices
1. **Always use units**: Attach units to quantities to avoid errors and ensure dimensional consistency 2. **Use context managers for FITS files**: Ensures proper file closing 3. **Prefer arrays over loops**: Process multiple coordinates/times as arrays for better performance 4. **Check coordinate frames**: Verify the frame before transformations 5. **Use appropriate cosmology**: Choose the right cosmological model for your analysis 6. **Handle missing data**: Use masked columns for tables with missing values 7. **Specify time scales**: Be explicit about time scales (UTC, TT, TDB) for precise timing 8. **Use QTable for unit-aware tables**: When table columns have units 9. **Check WCS validity**: Verify WCS before using transformations 10. **Cache frequently used values**: Expensive calculations (e.g., cosmological distances) can be cached 11. **Be explicit about network access**: `SkyCoord.from_name()`, `EarthLocation.of_site(refresh_cache=True)`, `EarthLocation.of_address()`, `download_file()`, remote FITS reads, and some IERS time/coordinate transforms can contact external services or update local caches. Avoid sending sensitive target names, addresses, URLs, or proprietary file locations to third-party services. When working with potentially sensitive targets or data locations, confirm with the user before making these network calls. 12. **Pin for reproducibility**: Use pinned versions such
Technical details
- Version
- 1.0.0
- License
- BSD-3-Clause license
- Last updated
- Aug 20, 2026
- Published
- Aug 20, 2026
Decision snapshot
Primary pick
33,974 GitHub stars
Audit
Install review
Install and adoption review
- Security
- 78/100
- Maintenance
- 100/100
- Install
- 92/100
Agent-proven evidence
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
- Success rate
- —
- Recent failure
- —
- Outcomes
- 0
- Output quality
- —
- Failed
- 0
- Not relevant
- 0
- Installs
- 0
- Risk blocked
- 0
- Setup needed
- 0
- Production
- 0
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Add to agent workflow
Free and open source. Review the report before installing into production agents.
Growth loop
Share kit
Scenario-led draft for astropy, ready for a manual X post.
A practical pick for market research: astropy: Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinate... 34.0K stars https://www.openagentskill.com/skills/k-dense-ai-astropy?ref=x
Optional reply with install command
Listing + install path for astropy: https://www.openagentskill.com/skills/k-dense-ai-astropy?ref=x Install: npx skills add K-Dense-AI/scientific-agent-skills --skill astropy
Listing source
Registry indexed
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
- Creator
- K-Dense-AI
- Indexed by
- OpenAgentSkill community index
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
Claim this skill listing
This Registry indexed listing is attributed to K-Dense-AI but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Add the evidence badges to your README
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/k-dense-ai-astropy)
[](https://www.openagentskill.com/skills/k-dense-ai-astropy)
[](https://www.openagentskill.com/skills/k-dense-ai-astropy/audit)
[](https://www.openagentskill.com/skills/k-dense-ai-astropy)Author
K-Dense-AI
@k-dense-ai
Tags
Platform fit
Health signals
- GitHub stars
- 34.0K
- Quality score
- 55/100
- Last GitHub push
- Aug 20, 2026
- Framework hints
- Unknown
- OpenAgentSkill views
- 17
- Install copies
- 0
- Outbound clicks
- 0
Community signal
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Trust & safety
Sandbox only
- GitHub adoption34K GitHub starsPASS
- Stars/forks activity34K stars, 3.3K forks; issue activity unavailable in current metadataPASS
- Recent maintenance2d since pushPASS
- License clarityBSD-3-Clause licensePASS
- README/SKILL.md completenessMetadata includes enough usage and workflow contextPASS
- Dependency/runtime riskcommand execution surface, external package install surfaceCHECK
Related skills
D3
Bring data to life with SVG, Canvas and HTML. :bar_chart::chart_with_upwards_trend::tada:
113.1K StarsEcharts
Apache ECharts is a powerful, interactive charting and data visualization library for browser
66.6K StarsData Science For Beginners
10 Weeks, 20 Lessons, Data Science for All!
35.6K StarsSequelize
Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.
30.4K Stars