A comprehensive Claude skill for building location-aware Graph RAG systems using GeoSPARQL, RDF, and Virtuoso Universal Server.
This skill transforms your geospatial Graph RAG GitHub repository into an actionable, reusable skill that Claude can use to help with:
- Converting GeoJSON to RDF with GeoSPARQL annotations
- Setting up Virtuoso with spatial extensions
- Constructing complex spatial queries
- Building location-aware RAG applications
- Analyzing retail/logistics intelligence data
geospatial-graph-rag.skill (21KB)
├── SKILL.md # Main skill documentation
├── scripts/ # Executable utilities
│ ├── convert_geojson_to_rdf.py # GeoJSON → RDF converter
│ ├── load_to_virtuoso.py # Virtuoso data loader
│ └── spatial_query_helper.py # Common spatial query tool
├── references/ # Detailed documentation
│ ├── architecture-layers.md # 10-layer architecture guide
│ ├── geosparql-queries.md # Query pattern library
│ └── virtuoso-setup.md # Setup & configuration guide
└── assets/ # Example data
└── example-stores.geojson # Sample retail locations
- Quick start guide with example pipeline
- Architecture overview (10-layer system)
- Common workflows (ingestion, querying, RAG integration)
- Tool integration guidance
- Performance optimization tips
- Troubleshooting guide
All scripts are executable and ready to use:
convert_geojson_to_rdf.py
- Converts GeoJSON files to RDF/Turtle format
- Adds GeoSPARQL annotations automatically
- Supports all geometry types (Point, LineString, Polygon, Multi*)
- Generates proper WKT literals
load_to_virtuoso.py
- Loads RDF data into Virtuoso named graphs
- Handles authentication
- Can clear graphs before loading
- Verifies loads by counting triples
spatial_query_helper.py
- Pre-built common spatial queries
- No SPARQL knowledge required
- Commands: within-distance, nearest, bbox, within-polygon, count-types
- Outputs in table or JSON format
architecture-layers.md (9KB)
- Complete 10-layer architecture breakdown
- Layer 1-3: Data foundation (storage, versioning, markup)
- Layer 4-7: Semantic layer (JSON-LD, ontologies, URIs)
- Layer 8-10: Query & generation (Virtuoso, publication, RAG)
- Implementation examples for each layer
- Common challenges and solutions
geosparql-queries.md (9KB)
- 20+ query patterns with examples
- Distance queries (within, nearest)
- Spatial relationships (contains, intersects, touches)
- Buffer zones and bounding boxes
- Complex analysis (service areas, competitive analysis)
- Performance optimization patterns
- Virtuoso-specific functions reference
virtuoso-setup.md (10KB)
- Docker and native installation
- Configuration for geospatial extensions
- Data loading strategies
- Spatial indexing setup
- SPARQL endpoint configuration
- Performance tuning
- Monitoring and troubleshooting
- Python integration examples
example-stores.geojson
- Sample retail locations in Abuja, Nigeria
- Point features (3 stores)
- Polygon feature (municipal boundary)
- Ready for testing conversions
- Download
geospatial-graph-rag.skill - Upload to Claude (drag & drop in chat)
- Claude will automatically recognize and use it when needed
The skill activates when you ask Claude about:
- "Convert this GeoJSON to RDF"
- "Setup Virtuoso with spatial extensions"
- "Find stores near this location"
- "Build a geospatial Graph RAG system"
- "Analyze spatial relationships in my data"
Quick Data Pipeline:
# Claude can guide you through:
python scripts/convert_geojson_to_rdf.py your_data.geojson output.ttl
python scripts/load_to_virtuoso.py output.ttl --graph http://your-graph-uri
python scripts/spatial_query_helper.py nearest --point "7.49,9.08" --limit 10Building a System: Claude will reference the architecture guide to help you:
- Design your 10-layer stack
- Choose appropriate tools (MinIO, Virtuoso, etc.)
- Implement data ingestion pipelines
- Create spatial queries
- Integrate with RAG applications
Scripts require:
- Python 3.7+
- rdflib
- SPARQLWrapper
Install with: pip install rdflib SPARQLWrapper
- GeoSPARQL 1.0 (OGC standard)
- WKT (Well-Known Text)
- WGS84 coordinate system
- RDF/RDFS/OWL
- JSON-LD
- Virtuoso Universal Server 7.x
- QGIS-compatible data formats
- Nigerian geospatial datasets (Abuja region)
This skill follows Claude skill best practices:
- Progressive Disclosure: Metadata → SKILL.md → References as needed
- Concise Core: SKILL.md under 500 lines, details in references
- Executable Scripts: Deterministic operations as Python scripts
- Clear Triggers: Description specifies exact use cases
- Practical Examples: Real-world patterns from retail intelligence
- Retail Intelligence: Store location analysis, service area mapping
- Logistics: Route optimization, delivery zone analysis
- Real Estate: Property proximity analysis, market comparisons
- Urban Planning: Infrastructure mapping, zoning analysis
- Environmental: Sensor networks, coverage analysis
This skill was created from your geospatial Graph RAG repository: https://github.com/Ajared/geospatialGraphRAG
The skill distills the 10-layer architecture, tool selections, and implementation patterns into a reusable format that Claude can apply to new projects.
- Test the Skill: Upload to Claude and try example queries
- Customize Scripts: Modify for your specific data formats
- Extend References: Add your own query patterns
- Share: Distribute to team members working on spatial projects
Created using Claude's skill-creator framework following best practices for:
- Workflow-based organization
- Progressive disclosure of complexity
- Executable, tested scripts
- Comprehensive reference documentation
- Real-world use case focus
Total size: 21KB (efficient context usage) Total files: 8 (organized structure) Documentation: ~28KB across references
Ready to build location-aware AI applications! 🗺️