Skip to content

AI Skills Documentation#241

Open
Logan-Huang wants to merge 3 commits into
astrodbtoolkit:mainfrom
Logan-Huang:claude_documentation
Open

AI Skills Documentation#241
Logan-Huang wants to merge 3 commits into
astrodbtoolkit:mainfrom
Logan-Huang:claude_documentation

Conversation

@Logan-Huang
Copy link
Copy Markdown

Created new subsection under "Creating a New Database" with instructions on how to use the Claude skills and then a workflow example from using it on The Local Group Galaxy data.

May have to produce an updated workflow documentation with the steps for Claude such as /plan, etc...
Given example of local galaxy cluster database
Removed redundancy and added some notes from personal experience
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.97%. Comparing base (5270563) to head (dbd59f3).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #241      +/-   ##
==========================================
- Coverage   72.38%   68.97%   -3.41%     
==========================================
  Files          19       19              
  Lines        1673     1673              
  Branches      211      211              
==========================================
- Hits         1211     1154      -57     
- Misses        380      441      +61     
+ Partials       82       78       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@kelle kelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also add Claude as a co-author.

Comment on lines +18 to +19
These skills only apply to the local repository you're running the agent from.
For skills to be available globally, copy them into ``%USERPROFILE%/.claude/skills/`` or the equivalent for your agent.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
These skills only apply to the local repository you're running the agent from.
For skills to be available globally, copy them into ``%USERPROFILE%/.claude/skills/`` or the equivalent for your agent.

The skills are designed to run in sequence, each feeding the next, but any of them can
also be run on its own.

#. **astrodb-parse-data-table** — Reads a data table (FITS, CSV, ECSV, HDF5, VOTable,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add links to the skills

Comment on lines +68 to +82
Example: Building From The Local Group Galaxy Database
-----------------------------------------------
The following condensed walkthrough shows the skills used end to end in a real
Claude Code session that built a database from McConnachie's *Nearby Galaxies*
catalog (``NearbyGalaxies_Jan2021_PUBLIC.fits`` — 144 Local Group dwarf galaxies).

**Setting up the session.** A few Claude Code slash commands configured the run
before any work began:

.. code-block:: text

/effort ultracode # maximum reasoning effort + dynamic workflow orchestration
/model # Opus 4.8 (1M context)
/advisor # route review checkpoints to a second Opus 4.8 reviewer
/plan # enter plan mode to scope the whole build before any changes
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Example: Building From The Local Group Galaxy Database
-----------------------------------------------
The following condensed walkthrough shows the skills used end to end in a real
Claude Code session that built a database from McConnachie's *Nearby Galaxies*
catalog (``NearbyGalaxies_Jan2021_PUBLIC.fits`` — 144 Local Group dwarf galaxies).
**Setting up the session.** A few Claude Code slash commands configured the run
before any work began:
.. code-block:: text
/effort ultracode # maximum reasoning effort + dynamic workflow orchestration
/model # Opus 4.8 (1M context)
/advisor # route review checkpoints to a second Opus 4.8 reviewer
/plan # enter plan mode to scope the whole build before any changes
Example and Prompt Advice
-----------------------------------------------
We recommend using plan mode.


The ``/plan`` prompt was *"Review your astro-db skills and create a plan to
have a fully working database after going through @NearbyGalaxies_Jan2021_PUBLIC.fits"*.
Plan mode let the agent inspect the FITS file and propose a complete build plan for
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Plan mode let the agent inspect the FITS file and propose a complete build plan for
Plan mode tells the agent to inspect the FITS file and propose a complete build plan using all of the available skills for

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could alternatively run each skill one-by-one.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add that the output of this prompt is a populated SQLite database based on the data in the input file.

/advisor # route review checkpoints to a second Opus 4.8 reviewer
/plan # enter plan mode to scope the whole build before any changes

The ``/plan`` prompt was *"Review your astro-db skills and create a plan to
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make the prompt stand out more.

Comment on lines +90 to +103
**Running the pipeline.** With the plan approved, the skills ran in sequence, each
feeding the next:

#. **astrodb-parse-data-table** — parsed all 50 columns (names, units, descriptions).
#. **astrodb-match-schema** — mapped 50 / 50 columns (0 unmatched) onto ``Sources``,
``RadialVelocities``, ``ProperMotions``, ``Photometry``, ``Morphology``, and
``ModeledParameters``.
#. **astrodb-generate-schema** / **astrodb-validate-schema-mapping** — produced the
Felis ``schema.yaml`` (``felis validate`` passing) and confirmed 0 nullable
violations and 0 type mismatches against the real data.
#. **astrodb-create-db** — created ``LocalGroupDB.sqlite`` and a matching test suite.
#. **astrodb-ingest-source** — ingested all 144 galaxies as sources, plus their
measurements (129 radial velocities, 65 proper motions, 142 V-band magnitudes,
137 morphologies, 889 modeled parameters).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Running the pipeline.** With the plan approved, the skills ran in sequence, each
feeding the next:
#. **astrodb-parse-data-table** — parsed all 50 columns (names, units, descriptions).
#. **astrodb-match-schema** — mapped 50 / 50 columns (0 unmatched) onto ``Sources``,
``RadialVelocities``, ``ProperMotions``, ``Photometry``, ``Morphology``, and
``ModeledParameters``.
#. **astrodb-generate-schema** / **astrodb-validate-schema-mapping** — produced the
Felis ``schema.yaml`` (``felis validate`` passing) and confirmed 0 nullable
violations and 0 type mismatches against the real data.
#. **astrodb-create-db** — created ``LocalGroupDB.sqlite`` and a matching test suite.
#. **astrodb-ingest-source** — ingested all 144 galaxies as sources, plus their
measurements (129 radial velocities, 65 proper motions, 142 V-band magnitudes,
137 morphologies, 889 modeled parameters).

Add that intermediary files for your inspection are put in the tmp/ folder.

Comment on lines +105 to +109
.. note::

It's also recommended that you give your agent a reference to the `AstroDB template <https://github.com/astrodbtoolkit/astrodb-template-db>`_
repository, which contains example ``schema.yaml`` files and test suites for all the template tables.
This can help the agent understand how to structure the new database and its tests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should fix this -- this should be in the SKILL and not the user's responsibility.

repository, which contains example ``schema.yaml`` files and test suites for all the template tables.
This can help the agent understand how to structure the new database and its tests.

**Catalogs will have problems.** Claude is great at cleaning up data that doesn't
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this statement to the first paragraph which motivates these SKILLS.

Comment on lines +115 to +117
**Review checkpoints with the advisor.** Because ``/advisor`` was enabled, a second
Opus 4.8 model reviewed the work at key points. This review isn't required but can
be very helpful for catching issues.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a Claude advice section with specific notes about using Claude.
also add that it's useful, but will use more resources/tokens.

Comment on lines +119 to +122
**Result.** A populated ``LocalGroupDB.sqlite`` with all 144 sources and their
measurements, 16 / 16 pytest tests passing, and a clean reload from the saved JSON.
A second ``/plan`` was used later in the same session to resolve the catalog's
numbered footnote references against its bibliography file.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**Result.** A populated ``LocalGroupDB.sqlite`` with all 144 sources and their
measurements, 16 / 16 pytest tests passing, and a clean reload from the saved JSON.
A second ``/plan`` was used later in the same session to resolve the catalog's
numbered footnote references against its bibliography file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants