Gemmology Plugin
A Claude Code plugin for coloured gemstone expertise and crystal visualization.
Part of the Gemmology Project.
Features
- Crystal Visualization: Generate SVG, STL, and glTF visualizations of crystal structures
- Mineral Database: Access FGA-curriculum aligned gemstone data for 50+ minerals
- CDL Parser: Parse and validate Crystal Description Language notation
- Gem Identification: Interactive workflow for systematic gemstone identification
Installation
pip install gemmology-plugin
This installs the core plugin along with all component packages:
cdl-parser- Crystal Description Language parsermineral-database- Gemstone property databasecrystal-geometry- 3D crystal geometry enginecrystal-renderer- SVG/STL/glTF visualization
Optional: Language Server
For editor integration with CDL syntax highlighting and completion:
pip install gemmology-plugin[lsp]
Quick Start
Command Line
# Generate crystal visualization
gemmology crystal-svg --preset diamond -o diamond.svg
# List available presets
gemmology list-presets
# Get mineral information
gemmology info ruby
Python API
from gemmology_plugin import generate_crystal_svg, get_preset
# Generate from CDL notation
svg = generate_crystal_svg("cubic[m3m]:{111}@1.0 + {100}@1.3")
# Generate from preset
ruby = get_preset("ruby")
svg = generate_crystal_svg(ruby['cdl'], info_properties={'name': ruby['name']})
Claude Code Plugin
When used as a Claude Code plugin, this package provides:
Commands
/crystal-svg- Generate crystal structure visualizations/identify-gem- Interactive gemstone identification workflow
Agents
Expert agents for domain-specific tasks:
crystallography-expert- Crystal systems, symmetry, Miller indicesgemmology-expert- Gemstone properties, FGA datacdl-expert- CDL syntax and parsing
Skills
Reference skills covering FGA curriculum topics:
- Physical properties (hardness, SG, cleavage)
- Optical properties (RI, birefringence, dispersion)
- Inclusions and fingerprints
- Treatments and enhancements
- Synthetics and simulants
- Origin determination
Image-Based Questions
IMPORTANT: When answering questions that involve interpreting gemstone images or photographs:
- Always take a screenshot to view the actual image content
- Double and triple check your interpretation before answering
- Ask the user for confirmation if uncertain about visual features
- Be explicit about what you see - describe the visual features before selecting an answer
Visual identification of features like colour zoning, asterism, chatoyancy, stress cracks, and inclusions requires careful examination. Similar features can appear differently depending on:
- Lighting conditions in the photograph
- Image quality and resolution
- Orientation of the gemstone
- Whether the feature is surface or internal
When in doubt, describe what you observe and ask the user to confirm before committing to an answer.
CDL Syntax Overview
Crystal Description Language (CDL) provides precise control over crystal morphology:
system[point_group]:{form}@distance + {form}@distance
Examples:
cubic[m3m]:{111} # Octahedron
cubic[m3m]:{111}@1.0 + {100}@1.3 # Truncated octahedron
trigonal[-3m]:{10-10}@1.0 + {0001}@0.5 # Quartz prism
Component Packages
This plugin integrates:
| Package | Description |
|---|---|
| cdl-parser | CDL parsing and validation |
| mineral-database | Gemstone property database |
| crystal-geometry | 3D geometry generation |
| crystal-renderer | Visualization and export |
| cdl-lsp | Language server (optional) |
Development
git clone https://github.com/gemmology-dev/gemmology-plugin
cd gemmology-plugin
pip install -e ".[dev]"
pytest tests/ -v
License
MIT License - see LICENSE for details.
Links
Metadata
Release files for gemmology-plugin 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gemmology_plugin-1.1.0.tar.gz | 19.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gemmology_plugin-1.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.6 kB
Release files / gemmology_plugin-1.1.0.tar.gz
| Download URL | gemmology_plugin-1.1.0.tar.gz |
|---|---|
| Size | 19.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
da5853c1c0da57969f29ac35e545f4724b995f9ea4bc7a020a8136b4a42c6015
|
|
BLAKE2b-256 checksum How to use checksums |
231d98c4c79739d6dca10cb0355ee8a4f7add1daedd777717a8ce615b39db00a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.
Transparency logRelease files / gemmology_plugin-1.1.0-py3-none-any.whl
| Download URL | gemmology_plugin-1.1.0-py3-none-any.whl |
|---|---|
| Size | 9.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e25f3112df8764f68514f14ea52873ba013ddf59d5b021407b43d9c19e1201e
|
|
BLAKE2b-256 checksum How to use checksums |
351b39876b04c591f3e0048cc357fe43687e4b7b26f5da44bf5b4bd9d64c7c61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 14, 2026.
Transparency log