A Claude Code plugin for coloured gemstone expertise and crystal visualization.
Part of the Gemmology Project.
- 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
pip install gemmology-pluginThis 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
For editor integration with CDL syntax highlighting and completion:
pip install gemmology-plugin[lsp]# Generate crystal visualization
gemmology crystal-svg --preset diamond -o diamond.svg
# List available presets
gemmology list-presets
# Get mineral information
gemmology info rubyfrom 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']})When used as a Claude Code plugin, this package provides:
/crystal-svg- Generate crystal structure visualizations/identify-gem- Interactive gemstone identification workflow
Expert agents for domain-specific tasks:
crystallography-expert- Crystal systems, symmetry, Miller indicesgemmology-expert- Gemstone properties, FGA datacdl-expert- CDL syntax and parsing
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
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
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) |
git clone https://github.com/gemmology-dev/gemmology-plugin
cd gemmology-plugin
pip install -e ".[dev]"
pytest tests/ -vMIT License - see LICENSE for details.