diff --git a/.claude/skills/create-astrodb/SKILL.md b/.claude/skills/astrodb-create-db/SKILL.md similarity index 90% rename from .claude/skills/create-astrodb/SKILL.md rename to .claude/skills/astrodb-create-db/SKILL.md index eef0227..30a10cc 100644 --- a/.claude/skills/create-astrodb/SKILL.md +++ b/.claude/skills/astrodb-create-db/SKILL.md @@ -1,6 +1,6 @@ --- -name: create-astrodb -description: Create an empty SQLite AstroDB database from a Felis-validated schema.yaml, following the astrodb-template-db file structure. Use this skill whenever the user wants to create a database, initialize a SQLite database, build an AstroDB, or has just finished generating a Felis schema and wants to turn it into a working database. Always trigger after generate-felis-schema completes, or when the user says "create database", "make database", "initialize database", "create sqlite", "make sqlite", "build the database", "create astrodb", "initialize astrodb", or "set up the database". Do NOT skip this skill just because a schema.yaml already exists — this skill is exactly what handles that case. +name: astrodb-create-database +description: Create an empty SQLite AstroDB database from a Felis-validated schema.yaml, following the astrodb-template-db file structure. Use this skill whenever the user wants to create a database, initialize a SQLite database, build an AstroDB, or has just finished generating a Felis schema and wants to turn it into a working database. Always trigger after astrodb-generate-schema completes, or when the user says "create database", "make database", "initialize database", "create sqlite", "make sqlite", "build the database", "create astrodb", "initialize astrodb", or "set up the database". Do NOT skip this skill just because a schema.yaml already exists — this skill is exactly what handles that case. compatibility: python, astrodbkit, felis --- @@ -12,7 +12,7 @@ using `astrodbkit`. ## Prerequisites -This skill requires a schema.yaml that has **passed** `felis validate`. The generate-felis-schema +This skill requires a schema.yaml that has **passed** `felis validate`. The astrodb-generate-schema skill always runs this validation as its final step, so if the user just completed that workflow the schema is already validated. If there is any doubt, validate before proceeding. @@ -20,7 +20,7 @@ the schema is already validated. If there is any doubt, validate before proceedi Check (in order): 1. A path the user explicitly stated in the conversation -2. `tmp/-schema.yaml` — the default output of generate-felis-schema +2. `tmp/-schema.yaml` — the default output of astrodb-generate-schema 3. `schema.yaml` in the current working directory If you cannot find the file, ask the user for the path before continuing. @@ -36,7 +36,7 @@ felis validate ``` **If validation fails:** show the error to the user and stop — do not create the database from -a broken schema. Offer to go back to generate-felis-schema to fix the issue. +a broken schema. Offer to go back to astrodb-generate-schema to fix the issue. **If validation passes:** proceed. @@ -122,7 +122,7 @@ python /scripts/create_db.py --schema ... --db-path ... ``` **If the script fails**, read the traceback carefully: -- `felis.datamodel` errors → schema is not valid Felis; offer to re-run generate-felis-schema +- `felis.datamodel` errors → schema is not valid Felis; offer to re-run astrodb-generate-schema - `sqlite3` errors → check that the db path is writable - `ImportError` for astrodbkit → astrodbkit is not installed; run `uv add astrodbkit` diff --git a/.claude/skills/create-astrodb/evals/evals.json b/.claude/skills/astrodb-create-db/evals/evals.json similarity index 92% rename from .claude/skills/create-astrodb/evals/evals.json rename to .claude/skills/astrodb-create-db/evals/evals.json index ff12641..3565828 100644 --- a/.claude/skills/create-astrodb/evals/evals.json +++ b/.claude/skills/astrodb-create-db/evals/evals.json @@ -1,9 +1,9 @@ { - "skill_name": "create-astrodb", + "skill_name": "astrodb-create-db", "evals": [ { "id": 0, - "prompt": "I just ran the generate-felis-schema skill and it wrote my schema to /tmp/BrownDwarfSurvey-schema.yaml — felis validate passed. Now I want to set up the actual database. Please create it for me in /tmp/bdsurvey-project/.", + "prompt": "I just ran the astrodb-generate-schema skill and it wrote my schema to /tmp/BrownDwarfSurvey-schema.yaml — felis validate passed. Now I want to set up the actual database. Please create it for me in /tmp/bdsurvey-project/.", "expected_output": "The skill runs felis validate on the schema, creates /tmp/bdsurvey-project/ with data/reference/ and data/source/ subdirectories, copies schema.yaml, creates database.toml, runs create_db.py to produce BrownDwarfSurvey.sqlite, runs generate_tests.py to create a tests/ directory with adapted test files (including test_contents_spectraltypes.py for the non-template SpectralTypes table), runs pytest to confirm all tests pass, and reports all file paths.", "files": ["/tmp/BrownDwarfSurvey-schema.yaml"], "assertions": [ diff --git a/.claude/skills/create-astrodb/evals/test_schema_brown_dwarfs.yaml b/.claude/skills/astrodb-create-db/evals/test_schema_brown_dwarfs.yaml similarity index 100% rename from .claude/skills/create-astrodb/evals/test_schema_brown_dwarfs.yaml rename to .claude/skills/astrodb-create-db/evals/test_schema_brown_dwarfs.yaml diff --git a/.claude/skills/create-astrodb/evals/test_schema_photometry.yaml b/.claude/skills/astrodb-create-db/evals/test_schema_photometry.yaml similarity index 100% rename from .claude/skills/create-astrodb/evals/test_schema_photometry.yaml rename to .claude/skills/astrodb-create-db/evals/test_schema_photometry.yaml diff --git a/.claude/skills/create-astrodb/scripts/create_db.py b/.claude/skills/astrodb-create-db/scripts/create_db.py similarity index 100% rename from .claude/skills/create-astrodb/scripts/create_db.py rename to .claude/skills/astrodb-create-db/scripts/create_db.py diff --git a/.claude/skills/create-astrodb/scripts/generate_tests.py b/.claude/skills/astrodb-create-db/scripts/generate_tests.py similarity index 100% rename from .claude/skills/create-astrodb/scripts/generate_tests.py rename to .claude/skills/astrodb-create-db/scripts/generate_tests.py diff --git a/.claude/skills/generate-felis-schema/SKILL.md b/.claude/skills/astrodb-generate-schema/SKILL.md similarity index 87% rename from .claude/skills/generate-felis-schema/SKILL.md rename to .claude/skills/astrodb-generate-schema/SKILL.md index 1ceab75..e38ff1a 100644 --- a/.claude/skills/generate-felis-schema/SKILL.md +++ b/.claude/skills/astrodb-generate-schema/SKILL.md @@ -1,6 +1,6 @@ --- -name: generate-felis-schema -description: Generate a Felis YAML schema for a user-provided astronomical data file, using the output of the match-schema and validate-schema-mapping skills. Produces a standards-compliant schema.yaml covering each mapped table and column, with proper Felis syntax (@id references, datatypes, nullable flags, units, and foreign key constraints). Always use this skill when the user has completed a schema mapping (with or without validation) and wants to produce a Felis YAML, create a schema file for their data, generate schema.yaml, export their mapping as a schema, or document their database tables. Also trigger when the user says "generate schema", "create felis yaml", "make a schema file", or "turn this mapping into a schema". +name: astrodb-generate-schema +description: Generate a Felis YAML schema for a user-provided astronomical data file, using the output of the astrodb-match-schema and astrodb-validate-schema-mapping skills. Produces a standards-compliant schema.yaml covering each mapped table and column, with proper Felis syntax (@id references, datatypes, nullable flags, units, and foreign key constraints). Always use this skill when the user has completed a schema mapping (with or without validation) and wants to produce a Felis YAML, create a schema file for their data, generate schema.yaml, export their mapping as a schema, or document their database tables. Also trigger when the user says "generate schema", "create felis yaml", "make a schema file", or "turn this mapping into a schema". compatibility: python, pyyaml metadata: authors: ["Claude"] @@ -24,7 +24,7 @@ Read `references/felis-syntax.md` for the exact syntax rules and examples before You need at minimum: -1. **The mapping table** from `match-schema` — rows like: +1. **The mapping table** from `astrodb-match-schema` — rows like: `Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes` 2. **Schema name** — what to call the new schema (e.g. the dataset name or survey name). @@ -32,12 +32,12 @@ You need at minimum: Optionally also accept: -3. **The validation report** from `validate-schema-mapping` — identifies nullable violations +3. **The validation report** from `astrodb-validate-schema-mapping` — identifies nullable violations and type mismatches. If provided, use it to set `nullable` flags and resolve type conflicts. 4. **The data file path** — used to infer datatypes for any columns that need them. -If the user hasn't run `validate-schema-mapping` yet, note that the schema will be generated +If the user hasn't run `astrodb-validate-schema-mapping` yet, note that the schema will be generated without null/type checks, and suggest they validate before ingesting. ## Step 1: Identify unmatched and problematic columns diff --git a/.claude/skills/generate-felis-schema/evals/evals.json b/.claude/skills/astrodb-generate-schema/evals/evals.json similarity index 60% rename from .claude/skills/generate-felis-schema/evals/evals.json rename to .claude/skills/astrodb-generate-schema/evals/evals.json index aa5f67a..e23115d 100644 --- a/.claude/skills/generate-felis-schema/evals/evals.json +++ b/.claude/skills/astrodb-generate-schema/evals/evals.json @@ -1,9 +1,9 @@ { - "skill_name": "generate-felis-schema", + "skill_name": "astrodb-generate-schema", "evals": [ { "id": 1, - "prompt": "I've just run match-schema on my nearby brown dwarf astrometry catalog and everything matched cleanly. Here's the mapping:\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source_id | Primary source identifier | — | str | Sources | source | High | Name pattern maps to primary identifier |\n| ra | Right ascension (J2000) | deg | float64 | Sources | ra_deg | High | Name + units match |\n| dec | Declination (J2000) | deg | float64 | Sources | dec_deg | High | Name + units match |\n| plx | Parallax | mas | float64 | Parallaxes | parallax_mas | High | Name + units match |\n| e_plx | Parallax uncertainty | mas | float64 | Parallaxes | parallax_error | High | Error prefix variant |\n| pmRA | Proper motion in RA | mas/yr | float64 | ProperMotions | pm_ra | High | Name + units match |\n| e_pmRA | Uncertainty in pmRA | mas/yr | float64 | ProperMotions | pm_ra_error | High | Error prefix |\n| pmDE | Proper motion in Dec | mas/yr | float64 | ProperMotions | pm_dec | High | Name + units match |\n| e_pmDE | Uncertainty in pmDE | mas/yr | float64 | ProperMotions | pm_dec_error | High | Error prefix |\n| ref | Publication reference | — | str | Publications | reference | High | Name + description match |\n\nThe validation report came back clean — no nullable violations, no type mismatches. Can you generate the Felis YAML schema for this? Call it 'BrownDwarfAstrometry'.", + "prompt": "I've just run astrodb-match-schema on my nearby brown dwarf astrometry catalog and everything matched cleanly. Here's the mapping:\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source_id | Primary source identifier | — | str | Sources | source | High | Name pattern maps to primary identifier |\n| ra | Right ascension (J2000) | deg | float64 | Sources | ra_deg | High | Name + units match |\n| dec | Declination (J2000) | deg | float64 | Sources | dec_deg | High | Name + units match |\n| plx | Parallax | mas | float64 | Parallaxes | parallax_mas | High | Name + units match |\n| e_plx | Parallax uncertainty | mas | float64 | Parallaxes | parallax_error | High | Error prefix variant |\n| pmRA | Proper motion in RA | mas/yr | float64 | ProperMotions | pm_ra | High | Name + units match |\n| e_pmRA | Uncertainty in pmRA | mas/yr | float64 | ProperMotions | pm_ra_error | High | Error prefix |\n| pmDE | Proper motion in Dec | mas/yr | float64 | ProperMotions | pm_dec | High | Name + units match |\n| e_pmDE | Uncertainty in pmDE | mas/yr | float64 | ProperMotions | pm_dec_error | High | Error prefix |\n| ref | Publication reference | — | str | Publications | reference | High | Name + description match |\n\nThe validation report came back clean — no nullable violations, no type mismatches. Can you generate the Felis YAML schema for this? Call it 'BrownDwarfAstrometry'.", "expected_output": "A valid Felis YAML schema file saved to /tmp/BrownDwarfAstrometry-schema.yaml. The schema should: (1) have name: BrownDwarfAstrometry at the top level; (2) include tables for Sources, Parallaxes, ProperMotions, and Publications; (3) use correct Felis syntax including @id references in the format #TableName.columnName; (4) set nullable: false for primary key columns (source, reference); (5) include fits:tunit for columns with units (deg, mas, mas/yr); (6) include foreign key constraints linking source and reference fields to their parent tables; (7) run felis validate on the generated file and report that it passed; (8) NOT reproduce the full YAML inline in the chat — just reference the file path.", "files": [], "assertions": [ @@ -43,7 +43,7 @@ }, { "id": 2, - "prompt": "Here's the match-schema output for my radial velocity survey of M dwarfs. Most columns matched, but a few didn't:\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| designation | 2MASS designation | — | str | Sources | source | High | Primary identifier |\n| rv | Heliocentric radial velocity | km/s | float64 | RadialVelocities | rv_kms | High | Name + units match |\n| e_rv | RV uncertainty | km/s | float64 | RadialVelocities | rv_error | High | Error prefix |\n| sn_ratio | Signal-to-noise ratio of the spectrum | — | float32 | — | — | — | Unmatched: no SN ratio field in schema |\n| obs_date | Date of observation (MJD) | d | float64 | — | — | — | Unmatched: observation date not in schema |\n| instrument | Instrument used | — | str | — | — | — | Unmatched: no direct instrument field on RadialVelocities |\n| ref | Publication reference | — | str | Publications | reference | High | Standard reference field |\n\nFor the unmatched columns: add sn_ratio and obs_date as new fields in the RadialVelocities table, and skip the instrument column entirely. Please generate the Felis YAML schema for this — name it 'MDwarfRV'.", + "prompt": "Here's the astrodb-match-schema output for my radial velocity survey of M dwarfs. Most columns matched, but a few didn't:\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| designation | 2MASS designation | — | str | Sources | source | High | Primary identifier |\n| rv | Heliocentric radial velocity | km/s | float64 | RadialVelocities | rv_kms | High | Name + units match |\n| e_rv | RV uncertainty | km/s | float64 | RadialVelocities | rv_error | High | Error prefix |\n| sn_ratio | Signal-to-noise ratio of the spectrum | — | float32 | — | — | — | Unmatched: no SN ratio field in schema |\n| obs_date | Date of observation (MJD) | d | float64 | — | — | — | Unmatched: observation date not in schema |\n| instrument | Instrument used | — | str | — | — | — | Unmatched: no direct instrument field on RadialVelocities |\n| ref | Publication reference | — | str | Publications | reference | High | Standard reference field |\n\nFor the unmatched columns: add sn_ratio and obs_date as new fields in the RadialVelocities table, and skip the instrument column entirely. Please generate the Felis YAML schema for this — name it 'MDwarfRV'.", "expected_output": "A valid Felis YAML schema file saved to /tmp/MDwarfRV-schema.yaml. The schema should: (1) include the RadialVelocities table with all matched columns (rv_kms, rv_error, source, reference) PLUS the two new user-requested fields (sn_ratio as float or double, obs_date as double with fits:tunit: d); (2) NOT include the instrument column; (3) include the Sources and Publications tables with appropriate columns; (4) use correct @id syntax throughout; (5) include foreign key constraints for source and reference; (6) summarize which columns were added vs skipped in the chat; (7) run felis validate and report it passed; (8) NOT reproduce the full YAML inline in the chat.", "files": [], "assertions": [ @@ -83,7 +83,7 @@ }, { "id": 3, - "prompt": "I ran both match-schema and validate-schema-mapping on my photometry catalog. Here's what I've got:\n\n**Mapping:**\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source | Source name | — | str | Sources | source | High | Primary identifier |\n| Jmag | J-band magnitude | mag | float32 | Photometry | magnitude | High | Band = 2MASS.J |\n| eJmag | J-band uncertainty | mag | float32 | Photometry | magnitude_error | High | Error on Jmag |\n| band | Filter identifier | — | str | Photometry | band | High | Maps to PhotometryFilters.band |\n| ref | Reference | — | str | Publications | reference | High | Standard reference |\n\n**Validation report:**\n## Schema Mapping Validation Report\n\n### Nullable Violations (1 issue)\n| Data Column | Maps To | Null Count | Total Rows | % Null |\n|---|---|---|---|---|\n| eJmag | Photometry.magnitude_error | 23 | 500 | 4.6% |\n\n### Type Mismatches (0 issues)\n\n### Summary\n- 1 nullable violation: eJmag has nulls but magnitude_error is non-nullable in the template schema\n- 0 type mismatches\n- 4 columns passed cleanly\n\nFor the nullable violation: please mark magnitude_error as nullable in the new schema (some objects don't have error estimates). Generate the Felis YAML — name it 'Photometry2MASSJ'.", + "prompt": "I ran both astrodb-match-schema and astrodb-validate-schema-mapping on my photometry catalog. Here's what I've got:\n\n**Mapping:**\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source | Source name | — | str | Sources | source | High | Primary identifier |\n| Jmag | J-band magnitude | mag | float32 | Photometry | magnitude | High | Band = 2MASS.J |\n| eJmag | J-band uncertainty | mag | float32 | Photometry | magnitude_error | High | Error on Jmag |\n| band | Filter identifier | — | str | Photometry | band | High | Maps to PhotometryFilters.band |\n| ref | Reference | — | str | Publications | reference | High | Standard reference |\n\n**Validation report:**\n## Schema Mapping Validation Report\n\n### Nullable Violations (1 issue)\n| Data Column | Maps To | Null Count | Total Rows | % Null |\n|---|---|---|---|---|\n| eJmag | Photometry.magnitude_error | 23 | 500 | 4.6% |\n\n### Type Mismatches (0 issues)\n\n### Summary\n- 1 nullable violation: eJmag has nulls but magnitude_error is non-nullable in the template schema\n- 0 type mismatches\n- 4 columns passed cleanly\n\nFor the nullable violation: please mark magnitude_error as nullable in the new schema (some objects don't have error estimates). Generate the Felis YAML — name it 'Photometry2MASSJ'.", "expected_output": "A valid Felis YAML schema file saved to /tmp/Photometry2MASSJ-schema.yaml. The schema should: (1) include Sources, Photometry, PhotometryFilters, and Publications tables (all referenced by FK constraints must be defined); (2) critically, the magnitude_error column in Photometry must have nullable: true (or omit nullable entirely) — NOT nullable: false; (3) use float or double for magnitude and magnitude_error columns; (4) include foreign key constraints; (5) note in the chat that magnitude_error was made nullable per user request; (6) run felis validate and report it passed; (7) NOT reproduce the full YAML inline in the chat.", "files": [], "assertions": [ diff --git a/.claude/skills/generate-felis-schema/references/felis-syntax.md b/.claude/skills/astrodb-generate-schema/references/felis-syntax.md similarity index 100% rename from .claude/skills/generate-felis-schema/references/felis-syntax.md rename to .claude/skills/astrodb-generate-schema/references/felis-syntax.md diff --git a/.claude/skills/match-schema/SKILL.md b/.claude/skills/astrodb-match-schema/SKILL.md similarity index 77% rename from .claude/skills/match-schema/SKILL.md rename to .claude/skills/astrodb-match-schema/SKILL.md index 7cf2fb8..37c50c0 100644 --- a/.claude/skills/match-schema/SKILL.md +++ b/.claude/skills/astrodb-match-schema/SKILL.md @@ -1,6 +1,6 @@ --- -name: match-schema -description: Match columns from an astronomical data table to fields in the AstroDB template database schema. Use this skill whenever the user wants to ingest, import, or load a data table (FITS, CSV, ECSV, etc.) into an AstroDB database, wants to know which database table or field a column belongs to, asks about schema mapping, column mapping, or data ingestion, or has output from the parse-data-table skill and wants to figure out where each column goes. This skill should also trigger when the user shares a table of columns (with names, descriptions, units, types) and asks about AstroDB, SIMPLE, or any astrodb-toolkit database. Always use this skill proactively after parse-data-table runs if the user seems to be working toward database ingestion. +name: astrodb-match-schema +description: Match columns from an astronomical data table to fields in the AstroDB template database schema. Use this skill whenever the user wants to ingest, import, or load a data table (FITS, CSV, ECSV, etc.) into an AstroDB database, wants to know which database table or field a column belongs to, asks about schema mapping, column mapping, or data ingestion, or has output from the astrodb-parse-data-table skill and wants to figure out where each column goes. This skill should also trigger when the user shares a table of columns (with names, descriptions, units, types) and asks about AstroDB, SIMPLE, or any astrodb-toolkit database. Always use this skill proactively after astrodb-parse-data-table runs if the user seems to be working toward database ingestion. compatibility: python, astropy metadata: authors: ["Claude"] @@ -16,11 +16,11 @@ exactly which table and field each column belongs to before ingesting data. Accept input in either form: -1. **A markdown table** (e.g., output from the `parse-data-table` skill) with columns: Column, +1. **A markdown table** (e.g., output from the `astrodb-parse-data-table` skill) with columns: Column, Description, Units, Type -2. **A data file path** — run the `parse-data-table` skill on it first, then proceed with its output +2. **A data file path** — run the `astrodb-parse-data-table` skill on it first, then proceed with its output -If given a file path, invoke `parse-data-table` first and wait for its output before continuing. +If given a file path, invoke `astrodb-parse-data-table` first and wait for its output before continuing. ## The AstroDB Template Schema @@ -29,7 +29,7 @@ It covers all Lookup Tables, Main Tables, and Data Tables with every field name. ## Astropy Unit Normalization -When input comes from the `parse-data-table` skill, units may be in astropy's canonical spaced +When input comes from the `astrodb-parse-data-table` skill, units may be in astropy's canonical spaced format. Treat these as equivalent to their compact forms when matching: | Astropy format | Equivalent to | @@ -58,7 +58,7 @@ Profile Service IDs before populating `PhotometryFilters.band`. ## Output -Output the results as a markdown table, adding columns onto the output from `parse-data-table` for the matched AstroDB Table, AstroDB Field, Confidence level, and Notes on the match. +Output the results as a markdown table, adding columns onto the output from `astrodb-parse-data-table` for the matched AstroDB Table, AstroDB Field, Confidence level, and Notes on the match. Also write the results to an HTML file using the `Write` tool. Follow the full visual spec in `references/html-output.md` — read it now before writing the file. diff --git a/.claude/skills/match-schema/evals/evals.json b/.claude/skills/astrodb-match-schema/evals/evals.json similarity index 55% rename from .claude/skills/match-schema/evals/evals.json rename to .claude/skills/astrodb-match-schema/evals/evals.json index 0dfb729..40f965d 100644 --- a/.claude/skills/match-schema/evals/evals.json +++ b/.claude/skills/astrodb-match-schema/evals/evals.json @@ -1,9 +1,9 @@ { - "skill_name": "match-schema", + "skill_name": "astrodb-match-schema", "evals": [ { "id": 1, - "prompt": "I ran parse-data-table on my catalog and got this output. Can you tell me which AstroDB table and field each column belongs to?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| source_id | Primary source identifier | — | str |\n| alt_name | Alternative catalog name | — | str |\n| ra | Right ascension (J2000) | deg | float64 |\n| dec | Declination (J2000) | deg | float64 |\n| plx | Parallax | mas | float64 |\n| e_plx | Parallax uncertainty | mas | float64 |\n| pmRA | Proper motion in RA*cos(dec) | mas/yr | float64 |\n| e_pmRA | Uncertainty in pmRA | mas/yr | float64 |\n| pmDE | Proper motion in declination | mas/yr | float64 |\n| e_pmDE | Uncertainty in pmDE | mas/yr | float64 |\n| RV | Heliocentric radial velocity | km/s | float64 |\n| e_RV | RV uncertainty | km/s | float64 |\n| SpT | Spectral type | — | str |\n| assoc | Moving group or association membership | — | str |\n| ref | Reference bibcode | — | str |", + "prompt": "I ran astrodb-parse-data-table on my catalog and got this output. Can you tell me which AstroDB table and field each column belongs to?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| source_id | Primary source identifier | — | str |\n| alt_name | Alternative catalog name | — | str |\n| ra | Right ascension (J2000) | deg | float64 |\n| dec | Declination (J2000) | deg | float64 |\n| plx | Parallax | mas | float64 |\n| e_plx | Parallax uncertainty | mas | float64 |\n| pmRA | Proper motion in RA*cos(dec) | mas/yr | float64 |\n| e_pmRA | Uncertainty in pmRA | mas/yr | float64 |\n| pmDE | Proper motion in declination | mas/yr | float64 |\n| e_pmDE | Uncertainty in pmDE | mas/yr | float64 |\n| RV | Heliocentric radial velocity | km/s | float64 |\n| e_RV | RV uncertainty | km/s | float64 |\n| SpT | Spectral type | — | str |\n| assoc | Moving group or association membership | — | str |\n| ref | Reference bibcode | — | str |", "expected_output": "A markdown table mapping each column to the correct AstroDB table and field with confidence levels and ingestion notes.", "files": [], "assertions": [ @@ -55,7 +55,7 @@ }, { "id": 2, - "prompt": "Here's the column table from parse-data-table for a multi-band photometry catalog. Please map these to the right AstroDB fields:\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| name | Object designation (2MASS or WISE) | — | str |\n| Jmag | 2MASS J-band magnitude | mag | float64 |\n| eJmag | J-band magnitude uncertainty | mag | float64 |\n| Hmag | 2MASS H-band magnitude | mag | float64 |\n| eHmag | H-band uncertainty | mag | float64 |\n| Kmag | 2MASS Ks-band magnitude | mag | float64 |\n| eKmag | Ks-band uncertainty | mag | float64 |\n| W1mag | WISE W1 magnitude | mag | float64 |\n| eW1mag | W1 uncertainty | mag | float64 |\n| W2mag | WISE W2 magnitude | mag | float64 |\n| eW2mag | W2 uncertainty | mag | float64 |\n| Teff | Effective temperature from SED fit | K | float64 |\n| e_Teff | Teff uncertainty | K | float64 |\n| logL | Log luminosity from SED fit | Lsun | float64 |\n| e_logL | logL uncertainty | Lsun | float64 |", + "prompt": "Here's the column table from astrodb-parse-data-table for a multi-band photometry catalog. Please map these to the right AstroDB fields:\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| name | Object designation (2MASS or WISE) | — | str |\n| Jmag | 2MASS J-band magnitude | mag | float64 |\n| eJmag | J-band magnitude uncertainty | mag | float64 |\n| Hmag | 2MASS H-band magnitude | mag | float64 |\n| eHmag | H-band uncertainty | mag | float64 |\n| Kmag | 2MASS Ks-band magnitude | mag | float64 |\n| eKmag | Ks-band uncertainty | mag | float64 |\n| W1mag | WISE W1 magnitude | mag | float64 |\n| eW1mag | W1 uncertainty | mag | float64 |\n| W2mag | WISE W2 magnitude | mag | float64 |\n| eW2mag | W2 uncertainty | mag | float64 |\n| Teff | Effective temperature from SED fit | K | float64 |\n| e_Teff | Teff uncertainty | K | float64 |\n| logL | Log luminosity from SED fit | Lsun | float64 |\n| e_logL | logL uncertainty | Lsun | float64 |", "expected_output": "Band magnitude columns map to Photometry.magnitude, errors to Photometry.magnitude_error, with multi-row ingestion note. Teff and logL map to ModeledParameters.", "files": [], "assertions": [ @@ -91,7 +91,7 @@ }, { "id": 3, - "prompt": "I have a catalog of nearby brown dwarfs with columns from parse-data-table below. I want to ingest this into my AstroDB database. What table/field does each column map to?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| designation | Source name | — | str |\n| RA_ICRS | Right ascension ICRS | deg | float64 |\n| DE_ICRS | Declination ICRS | deg | float64 |\n| dist_pc | Distance | pc | float64 |\n| e_dist | Distance uncertainty | pc | float64 |\n| vsini | Projected rotational velocity | km/s | float64 |\n| e_vsini | vsini uncertainty | km/s | float64 |\n| Prot | Rotation period | d | float64 |\n| e_Prot | Period uncertainty | d | float64 |\n| sep_arcsec | Projected separation from companion | arcsec | float64 |\n| companion_name | Name of companion object | — | str |\n| Gmag | Gaia G magnitude | mag | float64 |\n| BPmag | Gaia BP magnitude | mag | float64 |\n| RPmag | Gaia RP magnitude | mag | float64 |\n| notes | Free-form notes | — | str |", + "prompt": "I have a catalog of nearby brown dwarfs with columns from astrodb-parse-data-table below. I want to ingest this into my AstroDB database. What table/field does each column map to?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| designation | Source name | — | str |\n| RA_ICRS | Right ascension ICRS | deg | float64 |\n| DE_ICRS | Declination ICRS | deg | float64 |\n| dist_pc | Distance | pc | float64 |\n| e_dist | Distance uncertainty | pc | float64 |\n| vsini | Projected rotational velocity | km/s | float64 |\n| e_vsini | vsini uncertainty | km/s | float64 |\n| Prot | Rotation period | d | float64 |\n| e_Prot | Period uncertainty | d | float64 |\n| sep_arcsec | Projected separation from companion | arcsec | float64 |\n| companion_name | Name of companion object | — | str |\n| Gmag | Gaia G magnitude | mag | float64 |\n| BPmag | Gaia BP magnitude | mag | float64 |\n| RPmag | Gaia RP magnitude | mag | float64 |\n| notes | Free-form notes | — | str |", "expected_output": "Handles tricky unit conversions (dist→parallax, days→hours), companion columns, Gaia photometry, and notes field.", "files": [], "assertions": [ @@ -131,7 +131,7 @@ }, { "id": 4, - "prompt": "I ran parse-data-table on NearbyGalaxies_Jan2021_PUBLIC.fits and want to load it into AstroDB. Here's the column summary — can you map each column to the right AstroDB table and field?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| GalaxyName | Galaxy name | — | str (16-char) |\n| RA | Right Ascension (hours minutes seconds) | — | str (10-char) |\n| Dec | Declination (degrees arcminutes arcseconds) | — | str (11-char) |\n| EB-V | Reddening E(B-V) | mag | float32 |\n| dmod | Distance modulus (m-M)0 | mag | float32 |\n| dmod+ | Upper uncertainty on dmod | mag | float32 |\n| dmod- | Lower uncertainty on dmod | mag | float32 |\n| vh | Heliocentric radial velocity | km / s | float32 |\n| vh+ | Upper uncertainty on vh | km / s | float32 |\n| vh- | Lower uncertainty on vh | km / s | float32 |\n| Vmag | Apparent V magnitude (Vega mags) | mag | float32 |\n| Vmag+ | Upper uncertainty on Vmag | mag | float32 |\n| Vmag- | Lower uncertainty on Vmag | mag | float32 |\n| PA | Position angle | deg | float32 |\n| PA+ | Upper uncertainty on PA | deg | float32 |\n| PA- | Lower uncertainty on PA | deg | float32 |\n| e=1-b/a | Projected ellipticity, e=1-b/a | dimensionless_unscaled | float32 |\n| e+ | Upper uncertainty on e=1-b/a | dimensionless_unscaled | float32 |\n| e- | Lower uncertainty on e=1-b/a | dimensionless_unscaled | float32 |\n| muVo | Central V surface brightness | mag / arcsec2 | float32 |\n| muVo+ | Upper uncertainty on muVo | mag / arcsec2 | float32 |\n| muVo- | Lower uncertainty on muVo | mag / arcsec2 | float32 |\n| rh | Half-light radius measured on major axis | arcmin | float32 |\n| rh+ | Upper uncertainty on rh | arcmin | float32 |\n| rh- | Lower uncertainty on rh | arcmin | float32 |\n| sigma_s | Stellar radial velocity dispersion | km / s | float32 |\n| sigma_s+ | Upper uncertainty on sigma_s | km / s | float32 |\n| sigma_s- | Lower uncertainty on sigma_s | km / s | float32 |\n| vrot_s | Stellar peak/max rotation velocity | km / s | float32 |\n| vrot_s+ | Upper uncertainty on vrot_s | km / s | float32 |\n| vrot_s- | Lower uncertainty on vrot_s | km / s | float32 |\n| MHI | HI mass | solMass | float32 |\n| sigma_g | HI radial velocity dispersion | km / s | float32 |\n| sigma_g+ | Upper uncertainty on sigma_g | km / s | float32 |\n| sigma_g- | Lower uncertainty on sigma_g | km / s | float32 |\n| vrot_g | HI peak/max rotation velocity | km / s | float32 |\n| vrot_g+ | Upper uncertainty on vrot_g | km / s | float32 |\n| vrot_g- | Lower uncertainty on vrot_g | km / s | float32 |\n| [Fe/H] | Stellar mean metallicity | dex | float32 |\n| feh+ | Upper uncertainty on [Fe/H] | dex | float32 |\n| feh- | Lower uncertainty on [Fe/H] | dex | float32 |\n| F | Flag | — | int16 |\n| pmra | Proper motion in right ascension | mas / yr | float32 |\n| epmra+ | Upper uncertainty on pmra | mas / yr | float32 |\n| epmra- | Lower uncertainty on pmra | mas / yr | float32 |\n| pmdec | Proper motion in declination | mas / yr | float32 |\n| epmdec+ | Upper uncertainty on pmdec | mas / yr | float32 |\n| epmdec- | Lower uncertainty on pmdec | mas / yr | float32 |\n| References | Literature references | — | str (53-char) |", + "prompt": "I ran astrodb-parse-data-table on NearbyGalaxies_Jan2021_PUBLIC.fits and want to load it into AstroDB. Here's the column summary — can you map each column to the right AstroDB table and field?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| GalaxyName | Galaxy name | — | str (16-char) |\n| RA | Right Ascension (hours minutes seconds) | — | str (10-char) |\n| Dec | Declination (degrees arcminutes arcseconds) | — | str (11-char) |\n| EB-V | Reddening E(B-V) | mag | float32 |\n| dmod | Distance modulus (m-M)0 | mag | float32 |\n| dmod+ | Upper uncertainty on dmod | mag | float32 |\n| dmod- | Lower uncertainty on dmod | mag | float32 |\n| vh | Heliocentric radial velocity | km / s | float32 |\n| vh+ | Upper uncertainty on vh | km / s | float32 |\n| vh- | Lower uncertainty on vh | km / s | float32 |\n| Vmag | Apparent V magnitude (Vega mags) | mag | float32 |\n| Vmag+ | Upper uncertainty on Vmag | mag | float32 |\n| Vmag- | Lower uncertainty on Vmag | mag | float32 |\n| PA | Position angle | deg | float32 |\n| PA+ | Upper uncertainty on PA | deg | float32 |\n| PA- | Lower uncertainty on PA | deg | float32 |\n| e=1-b/a | Projected ellipticity, e=1-b/a | dimensionless_unscaled | float32 |\n| e+ | Upper uncertainty on e=1-b/a | dimensionless_unscaled | float32 |\n| e- | Lower uncertainty on e=1-b/a | dimensionless_unscaled | float32 |\n| muVo | Central V surface brightness | mag / arcsec2 | float32 |\n| muVo+ | Upper uncertainty on muVo | mag / arcsec2 | float32 |\n| muVo- | Lower uncertainty on muVo | mag / arcsec2 | float32 |\n| rh | Half-light radius measured on major axis | arcmin | float32 |\n| rh+ | Upper uncertainty on rh | arcmin | float32 |\n| rh- | Lower uncertainty on rh | arcmin | float32 |\n| sigma_s | Stellar radial velocity dispersion | km / s | float32 |\n| sigma_s+ | Upper uncertainty on sigma_s | km / s | float32 |\n| sigma_s- | Lower uncertainty on sigma_s | km / s | float32 |\n| vrot_s | Stellar peak/max rotation velocity | km / s | float32 |\n| vrot_s+ | Upper uncertainty on vrot_s | km / s | float32 |\n| vrot_s- | Lower uncertainty on vrot_s | km / s | float32 |\n| MHI | HI mass | solMass | float32 |\n| sigma_g | HI radial velocity dispersion | km / s | float32 |\n| sigma_g+ | Upper uncertainty on sigma_g | km / s | float32 |\n| sigma_g- | Lower uncertainty on sigma_g | km / s | float32 |\n| vrot_g | HI peak/max rotation velocity | km / s | float32 |\n| vrot_g+ | Upper uncertainty on vrot_g | km / s | float32 |\n| vrot_g- | Lower uncertainty on vrot_g | km / s | float32 |\n| [Fe/H] | Stellar mean metallicity | dex | float32 |\n| feh+ | Upper uncertainty on [Fe/H] | dex | float32 |\n| feh- | Lower uncertainty on [Fe/H] | dex | float32 |\n| F | Flag | — | int16 |\n| pmra | Proper motion in right ascension | mas / yr | float32 |\n| epmra+ | Upper uncertainty on pmra | mas / yr | float32 |\n| epmra- | Lower uncertainty on pmra | mas / yr | float32 |\n| pmdec | Proper motion in declination | mas / yr | float32 |\n| epmdec+ | Upper uncertainty on pmdec | mas / yr | float32 |\n| epmdec- | Lower uncertainty on pmdec | mas / yr | float32 |\n| References | Literature references | — | str (53-char) |", "expected_output": "Galaxy catalog mapped with astropy-format units. vh (km / s) → RadialVelocities.rv_kms, pmra/pmdec (mas / yr) → ProperMotions, e=1-b/a (dimensionless_unscaled) → Morphology.ellipticity, rh (arcmin) → Morphology.half_light_radius_arcmin, MHI (solMass) → ModeledParameters. F flag column marked Unmatched with user prompt. RA/Dec sexagesimal conversion noted.", "files": [], "assertions": [ @@ -183,7 +183,7 @@ }, { "id": 5, - "prompt": "I ran parse-data-table on arecibo_radar_observed_objects_list.csv and got this column summary. Can you map each column to the right AstroDB table and field?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| Number | Identifier number of the observed object | — | str |\n| Name | Common name of the observed object | — | str |\n| Designation | Provisional or permanent designation (e.g., asteroid number) | — | str |\n| Category | Category/type of object (e.g., Planet, Moon, MBA, Comet) | — | str |\n| Components | Number of components in the system | dimensionless_unscaled | float64 |\n| Absolute Magnitute | Absolute magnitude of the object (note: column name contains typo — should be \"Magnitude\") | mag | float64 |\n| Quality Code for Best Images | Quality code for best radar images (numeric scale) | — | float64 |\n| NASA Link | URL link to the NASA page for the object | — | str |", + "prompt": "I ran astrodb-parse-data-table on arecibo_radar_observed_objects_list.csv and got this column summary. Can you map each column to the right AstroDB table and field?\n\n| Column | Description | Units | Type |\n|--------|-------------|-------|------|\n| Number | Identifier number of the observed object | — | str |\n| Name | Common name of the observed object | — | str |\n| Designation | Provisional or permanent designation (e.g., asteroid number) | — | str |\n| Category | Category/type of object (e.g., Planet, Moon, MBA, Comet) | — | str |\n| Components | Number of components in the system | dimensionless_unscaled | float64 |\n| Absolute Magnitute | Absolute magnitude of the object (note: column name contains typo — should be \"Magnitude\") | mag | float64 |\n| Quality Code for Best Images | Quality code for best radar images (numeric scale) | — | float64 |\n| NASA Link | URL link to the NASA page for the object | — | str |", "expected_output": "Solar system catalog: identifiers map to Sources/Names, Absolute Magnitute marked Unmatched (absolute not apparent mag), NASA Link marked Unmatched (generic URL), Quality Code marked Unmatched (quality flag). User is asked what to do with all three Unmatched columns.", "files": [], "assertions": [ diff --git a/.claude/skills/match-schema/references/column-patterns.md b/.claude/skills/astrodb-match-schema/references/column-patterns.md similarity index 100% rename from .claude/skills/match-schema/references/column-patterns.md rename to .claude/skills/astrodb-match-schema/references/column-patterns.md diff --git a/.claude/skills/match-schema/references/html-output.md b/.claude/skills/astrodb-match-schema/references/html-output.md similarity index 99% rename from .claude/skills/match-schema/references/html-output.md rename to .claude/skills/astrodb-match-schema/references/html-output.md index 6fceaaf..29e9a84 100644 --- a/.claude/skills/match-schema/references/html-output.md +++ b/.claude/skills/astrodb-match-schema/references/html-output.md @@ -1,4 +1,4 @@ -# HTML Output Spec for match-schema +# HTML Output Spec for astrodb-match-schema This file defines the visual design for the `tmp/schema-match-result.html` output file. diff --git a/.claude/skills/match-schema/references/photometry-filters.md b/.claude/skills/astrodb-match-schema/references/photometry-filters.md similarity index 100% rename from .claude/skills/match-schema/references/photometry-filters.md rename to .claude/skills/astrodb-match-schema/references/photometry-filters.md diff --git a/.claude/skills/match-schema/references/schema.md b/.claude/skills/astrodb-match-schema/references/schema.md similarity index 100% rename from .claude/skills/match-schema/references/schema.md rename to .claude/skills/astrodb-match-schema/references/schema.md diff --git a/.claude/skills/parse-data-table/SKILL.md b/.claude/skills/astrodb-parse-data-table/SKILL.md similarity index 98% rename from .claude/skills/parse-data-table/SKILL.md rename to .claude/skills/astrodb-parse-data-table/SKILL.md index a039e95..c1a862a 100644 --- a/.claude/skills/parse-data-table/SKILL.md +++ b/.claude/skills/astrodb-parse-data-table/SKILL.md @@ -1,5 +1,5 @@ --- -name: parse-data-table +name: astrodb-parse-data-table description: Parse a data table file and extract column information (name, description, units, type). Supports FITS, CSV, ECSV, HDF5, VOTable, Parquet, Excel, and more. Generates a markdown table summarizing the columns. compatibility: python, astropy, pandas metadata: @@ -83,7 +83,7 @@ except Exception: for col in df.columns: print(col, df[col].dtype) -# Write sidecar so downstream skills (e.g. match-schema, validate-schema-mapping) +# Write sidecar so downstream skills (e.g. astrodb-match-schema, astrodb-validate-schema-mapping) # can reuse the same reader without re-discovering the format. # Output file paths are added to the sidecar in Step 5. with open("tmp/astrodb-parse-result.json", "w") as f: diff --git a/.claude/skills/parse-data-table/evals/data/NearbyGalaxies_Jan2021_PUBLIC (1).fits b/.claude/skills/astrodb-parse-data-table/evals/data/NearbyGalaxies_Jan2021_PUBLIC (1).fits similarity index 100% rename from .claude/skills/parse-data-table/evals/data/NearbyGalaxies_Jan2021_PUBLIC (1).fits rename to .claude/skills/astrodb-parse-data-table/evals/data/NearbyGalaxies_Jan2021_PUBLIC (1).fits diff --git a/.claude/skills/parse-data-table/evals/data/arecibo_radar_observed_objects_list.csv b/.claude/skills/astrodb-parse-data-table/evals/data/arecibo_radar_observed_objects_list.csv similarity index 100% rename from .claude/skills/parse-data-table/evals/data/arecibo_radar_observed_objects_list.csv rename to .claude/skills/astrodb-parse-data-table/evals/data/arecibo_radar_observed_objects_list.csv diff --git a/.claude/skills/parse-data-table/evals/evals.json b/.claude/skills/astrodb-parse-data-table/evals/evals.json similarity index 100% rename from .claude/skills/parse-data-table/evals/evals.json rename to .claude/skills/astrodb-parse-data-table/evals/evals.json diff --git a/.claude/skills/parse-data-table/references/file-formats.md b/.claude/skills/astrodb-parse-data-table/references/file-formats.md similarity index 100% rename from .claude/skills/parse-data-table/references/file-formats.md rename to .claude/skills/astrodb-parse-data-table/references/file-formats.md diff --git a/.claude/skills/parse-data-table/references/format-specific-metadata.md b/.claude/skills/astrodb-parse-data-table/references/format-specific-metadata.md similarity index 100% rename from .claude/skills/parse-data-table/references/format-specific-metadata.md rename to .claude/skills/astrodb-parse-data-table/references/format-specific-metadata.md diff --git a/.claude/skills/parse-data-table/references/units-inference.md b/.claude/skills/astrodb-parse-data-table/references/units-inference.md similarity index 100% rename from .claude/skills/parse-data-table/references/units-inference.md rename to .claude/skills/astrodb-parse-data-table/references/units-inference.md diff --git a/.claude/skills/validate-schema-mapping/SKILL.md b/.claude/skills/astrodb-validate-schema-mapping/SKILL.md similarity index 84% rename from .claude/skills/validate-schema-mapping/SKILL.md rename to .claude/skills/astrodb-validate-schema-mapping/SKILL.md index 68f28db..68a5437 100644 --- a/.claude/skills/validate-schema-mapping/SKILL.md +++ b/.claude/skills/astrodb-validate-schema-mapping/SKILL.md @@ -1,6 +1,6 @@ --- -name: validate-schema-mapping -description: Validate an AstroDB schema mapping by checking that data columns are compatible with the schema fields they've been mapped to. Use this skill whenever the user has completed a schema mapping (e.g., from the match-schema skill) and wants to check whether the actual data is safe to ingest — specifically (1) are there null values in data columns that map to non-nullable schema fields, and (2) do data column types match the expected types in schema.yaml? Always use this skill proactively after match-schema produces a mapping, before the user proceeds to write ingestion code. Trigger on phrases like "validate","check my mapping", "will this ingest cleanly", "are there any type mismatches", "null check", "nullable violations", or "verify schema compatibility". +name: astrodb-validate-schema-mapping +description: Validate an AstroDB schema mapping by checking that data columns are compatible with the schema fields they've been mapped to. Use this skill whenever the user has completed a schema mapping (e.g., from the astrodb-match-schema skill) and wants to check whether the actual data is safe to ingest — specifically (1) are there null values in data columns that map to non-nullable schema fields, and (2) do data column types match the expected types in schema.yaml? Always use this skill proactively after astrodb-match-schema produces a mapping, before the user proceeds to write ingestion code. Trigger on phrases like "validate","check my mapping", "will this ingest cleanly", "are there any type mismatches", "null check", "nullable violations", or "verify schema compatibility". compatibility: python, astropy, pyyaml metadata: authors: ["Claude"] @@ -23,7 +23,7 @@ Two classes of problems can block a clean ingest: You need three things: -1. **The mapping table** — the markdown table from match-schema, with columns: +1. **The mapping table** — the markdown table from astrodb-match-schema, with columns: `Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes` (or a similar structure — adapt if column names differ slightly) @@ -63,7 +63,7 @@ For each row in the mapping table where DB Table and DB Field are filled in (ski rows and rows mapped to "—" or "N/A"): Write a short Python script to: -- Load the data file. First check for the sidecar written by parse-data-table: +- Load the data file. First check for the sidecar written by astrodb-parse-data-table: ```python import json, os sidecar = "tmp/astrodb-parse-result.json" @@ -75,7 +75,7 @@ Write a short Python script to: else: reader, fmt, pandas_meth = "astropy", None, None ``` - Then load with the same reader that parse-data-table already verified: + Then load with the same reader that astrodb-parse-data-table already verified: ```python from astropy.table import Table import pandas as pd diff --git a/.claude/skills/validate-schema-mapping/evals/data/clean_rv_catalog.ecsv b/.claude/skills/astrodb-validate-schema-mapping/evals/data/clean_rv_catalog.ecsv similarity index 100% rename from .claude/skills/validate-schema-mapping/evals/data/clean_rv_catalog.ecsv rename to .claude/skills/astrodb-validate-schema-mapping/evals/data/clean_rv_catalog.ecsv diff --git a/.claude/skills/validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv b/.claude/skills/astrodb-validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv similarity index 100% rename from .claude/skills/validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv rename to .claude/skills/astrodb-validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv diff --git a/.claude/skills/validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv b/.claude/skills/astrodb-validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv similarity index 100% rename from .claude/skills/validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv rename to .claude/skills/astrodb-validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv diff --git a/.claude/skills/validate-schema-mapping/evals/evals.json b/.claude/skills/astrodb-validate-schema-mapping/evals/evals.json similarity index 63% rename from .claude/skills/validate-schema-mapping/evals/evals.json rename to .claude/skills/astrodb-validate-schema-mapping/evals/evals.json index 006b2f2..dc88000 100644 --- a/.claude/skills/validate-schema-mapping/evals/evals.json +++ b/.claude/skills/astrodb-validate-schema-mapping/evals/evals.json @@ -1,12 +1,12 @@ { - "skill_name": "validate-schema-mapping", + "skill_name": "astrodb-validate-schema-mapping", "evals": [ { "id": 1, - "prompt": "I just ran match-schema on my parallax catalog and here's the mapping I got. Can you validate this against the actual data file to make sure it's safe to ingest?\n\nData file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv\n\nSchema file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source_id | Primary identifier | — | str | Sources | source | High | Primary key |\n| ra | Right ascension | deg | float64 | Sources | ra_deg | High | |\n| dec | Declination | deg | float64 | Sources | dec_deg | High | |\n| plx | Parallax | mas | float64 | Parallaxes | parallax_mas | High | |\n| e_plx | Parallax uncertainty | mas | float64 | Parallaxes | parallax_error | High | |\n| ref | Reference bibcode | — | str | Publications | reference | High | |", + "prompt": "I just ran astrodb-match-schema on my parallax catalog and here's the mapping I got. Can you validate this against the actual data file to make sure it's safe to ingest?\n\nData file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv\n\nSchema file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source_id | Primary identifier | — | str | Sources | source | High | Primary key |\n| ra | Right ascension | deg | float64 | Sources | ra_deg | High | |\n| dec | Declination | deg | float64 | Sources | dec_deg | High | |\n| plx | Parallax | mas | float64 | Parallaxes | parallax_mas | High | |\n| e_plx | Parallax uncertainty | mas | float64 | Parallaxes | parallax_error | High | |\n| ref | Reference bibcode | — | str | Publications | reference | High | |", "expected_output": "A validation report identifying that the 'plx' column (mapped to Parallaxes.parallax_mas) has 3 null values out of 8 rows. The schema should show that parallax_mas is nullable (or warn about null values). Report should also confirm clean types for all columns and produce a summary.", "files": [ - "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv", + "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/parallax_catalog_with_nulls.ecsv", "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml" ], "assertions": [ @@ -38,10 +38,10 @@ }, { "id": 2, - "prompt": "Here's my schema mapping for a photometry catalog. Please check it against the data — I'm especially worried about the magnitude column since some entries might not be numbers.\n\nData file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv\n\nSchema: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| name | Source designation | — | str | Sources | source | High | Primary key |\n| band | Filter name | — | str | PhotometryFilters | band | High | Needs SVO ID |\n| mag | Magnitude | mag | str | Photometry | magnitude | High | |\n| mag_err | Magnitude uncertainty | mag | float64 | Photometry | magnitude_error | High | |\n| telescope | Telescope name | — | str | Telescopes | telescope | High | |\n| ref | Reference | — | str | Publications | reference | High | |", + "prompt": "Here's my schema mapping for a photometry catalog. Please check it against the data — I'm especially worried about the magnitude column since some entries might not be numbers.\n\nData file: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv\n\nSchema: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| name | Source designation | — | str | Sources | source | High | Primary key |\n| band | Filter name | — | str | PhotometryFilters | band | High | Needs SVO ID |\n| mag | Magnitude | mag | str | Photometry | magnitude | High | |\n| mag_err | Magnitude uncertainty | mag | float64 | Photometry | magnitude_error | High | |\n| telescope | Telescope name | — | str | Telescopes | telescope | High | |\n| ref | Reference | — | str | Publications | reference | High | |", "expected_output": "A validation report flagging that 'mag' column is type string but Photometry.magnitude expects a double/float — this is a type mismatch. The report should also note that values like 'sat' and 'nd' in the mag column are the cause. No nullable violations expected.", "files": [ - "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv", + "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/photometry_type_mismatch.ecsv", "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml" ], "assertions": [ @@ -69,10 +69,10 @@ }, { "id": 3, - "prompt": "I mapped my radial velocity catalog to AstroDB and want to double-check everything looks good before I write the ingestion script. Here's the mapping:\n\nData: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/clean_rv_catalog.ecsv\n\nSchema: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source | Source identifier | — | str | Sources | source | High | Foreign key to Sources |\n| rv_kms | Radial velocity | km/s | float64 | RadialVelocities | rv_kms | High | |\n| rv_error | RV uncertainty | km/s | float64 | RadialVelocities | rv_error | High | |\n| reference | Reference bibcode | — | str | Publications | reference | High | |", + "prompt": "I mapped my radial velocity catalog to AstroDB and want to double-check everything looks good before I write the ingestion script. Here's the mapping:\n\nData: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/clean_rv_catalog.ecsv\n\nSchema: /Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml\n\n| Input Column | Description | Units | Type | DB Table | DB Field | Confidence | Notes |\n|---|---|---|---|---|---|---|---|\n| source | Source identifier | — | str | Sources | source | High | Foreign key to Sources |\n| rv_kms | Radial velocity | km/s | float64 | RadialVelocities | rv_kms | High | |\n| rv_error | RV uncertainty | km/s | float64 | RadialVelocities | rv_error | High | |\n| reference | Reference bibcode | — | str | Publications | reference | High | |", "expected_output": "A clean validation report with no issues — all columns have correct types and no null values. Report should confirm all 4 mappings passed and give the user a green light to proceed with ingestion.", "files": [ - "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/validate-schema-mapping/evals/data/clean_rv_catalog.ecsv", + "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrodb-bot/.claude/skills/astrodb-validate-schema-mapping/evals/data/clean_rv_catalog.ecsv", "/Users/kelle/Hunter College Dropbox/Kelle Cruz/SIMPLE/astrotemplate-db/schema.yaml" ], "assertions": [ diff --git a/.claude/skills/validate-schema-mapping/references/validation-report.md b/.claude/skills/astrodb-validate-schema-mapping/references/validation-report.md similarity index 100% rename from .claude/skills/validate-schema-mapping/references/validation-report.md rename to .claude/skills/astrodb-validate-schema-mapping/references/validation-report.md diff --git a/README.md b/README.md index 7158f5f..92c36ff 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ To install this in another agent, you can rename/copy the `.claude` directory to ## Skills -- [`parse-data-table`](.claude/skills/parse-data-table/SKILL.md) — summarizes table columns, descriptions, units, and types. -- [`match-schema`](.claude/skills/match-schema/SKILL.md) — maps parsed columns to [AstroDB Template](https://github.com/astrodbtoolkit/astrodb-template-db) tables and fields -- [`validate-schema-mapping`](.claude/skills/validate-schema-mapping/SKILL.md) — identifies problems with nulls and inconsistent data types -- [`generate-felis-schema`](.claude/skills/generate-felis-schema/SKILL.md) — creates a Felis-format schema.yaml file using outputs of previous skills -- [`create-astrodb`](.claude/skills/create-astrodb/SKILL.md) — Create an empty SQLite AstroDB database from a Felis-validated schema.yaml, following the astrodb-template-db file structure. +- [`astrodb-parse-data-table`](.claude/skills/astrodb-parse-data-table/SKILL.md) — summarizes table columns, descriptions, units, and types. +- [`astrodb-match-schema`](.claude/skills/astrodb-match-schema/SKILL.md) — maps parsed columns to [AstroDB Template](https://github.com/astrodbtoolkit/astrodb-template-db) tables and fields +- [`astrodb-validate-schema-mapping`](.claude/skills/astrodb-validate-schema-mapping/SKILL.md) — identifies problems with nulls and inconsistent data types +- [`astrodb-generate-schema`](.claude/skills/astrodb-generate-schema/SKILL.md) — creates a Felis-format schema.yaml file using outputs of previous skills +- [`astrodb-create-db`](.claude/skills/astrodb-create-db/SKILL.md) — Create an empty SQLite AstroDB database from a Felis-validated schema.yaml, following the astrodb-template-db file structure. ## Requirements