-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSKILL_STRUCTURE.txt
More file actions
184 lines (177 loc) · 13.4 KB
/
SKILL_STRUCTURE.txt
File metadata and controls
184 lines (177 loc) · 13.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
╔═══════════════════════════════════════════════════════════════════════════╗
║ GEOSPATIAL GRAPH RAG SKILL ║
║ Structure Overview ║
╚═══════════════════════════════════════════════════════════════════════════╝
📦 geospatial-graph-rag.skill (21KB compressed)
│
├── 📄 SKILL.md (8.5KB)
│ ├── Frontmatter (triggers skill activation)
│ ├── Quick Start (example pipeline)
│ ├── Architecture Overview (10-layer summary)
│ ├── Common Workflows
│ │ ├── Data Ingestion Pipeline
│ │ ├── Spatial Query Construction
│ │ └── RAG Integration Pattern
│ ├── Tool Integration (when to use each component)
│ ├── Bundled Resources (scripts, references, assets)
│ ├── Performance Optimization
│ ├── Common Use Cases
│ ├── Troubleshooting
│ └── Standards Compliance
│
├── 📂 scripts/ (3 files, ~600 lines Python)
│ │
│ ├── 🐍 convert_geojson_to_rdf.py (~200 lines)
│ │ ├── Converts GeoJSON → RDF/Turtle
│ │ ├── Supports all geometry types
│ │ ├── Generates GeoSPARQL annotations
│ │ ├── WKT literal creation
│ │ └── CLI: python convert_geojson_to_rdf.py input.geojson output.ttl
│ │
│ ├── 🐍 load_to_virtuoso.py (~180 lines)
│ │ ├── Loads RDF into Virtuoso
│ │ ├── Authentication support
│ │ ├── Graph management (clear/verify)
│ │ └── CLI: python load_to_virtuoso.py data.ttl --graph <uri>
│ │
│ └── 🐍 spatial_query_helper.py (~280 lines)
│ ├── Pre-built spatial queries
│ ├── Commands: within-distance, nearest, bbox, within-polygon
│ ├── Output: table or JSON
│ └── CLI: python spatial_query_helper.py nearest --point "lon,lat"
│
├── 📂 references/ (3 files, ~28KB documentation)
│ │
│ ├── 📖 architecture-layers.md (9KB)
│ │ ├── Layer 1-3: Data Foundation
│ │ │ ├── Object Storage (MinIO)
│ │ │ ├── Change Management (Git + DVC)
│ │ │ └── Readable Format (Markdown)
│ │ ├── Layer 4-7: Semantic Layer
│ │ │ ├── Semantic Markup (JSON-LD + GeoSPARQL)
│ │ │ ├── Collaborative Editing (Kafka)
│ │ │ ├── Ontology (OWL + SKOS)
│ │ │ └── Persistent URIs
│ │ ├── Layer 8-10: Query & Generation
│ │ │ ├── Graph Database (Virtuoso)
│ │ │ ├── Publication (SPARQL endpoint)
│ │ │ └── RAG Integration
│ │ └── Common Challenges & Solutions
│ │
│ ├── 📖 geosparql-queries.md (9KB)
│ │ ├── Basic Spatial Queries (point, polygon)
│ │ ├── Distance Queries (within, nearest)
│ │ ├── Spatial Relationships (contains, intersects, touches)
│ │ ├── Buffer Queries
│ │ ├── Bounding Box Queries
│ │ ├── Complex Spatial Analysis
│ │ │ ├── Service Area Coverage
│ │ │ ├── Competitive Analysis
│ │ │ └── Spatial Joins
│ │ ├── Performance Optimization
│ │ ├── Aggregation Queries
│ │ └── Virtuoso-Specific Functions
│ │
│ └── 📖 virtuoso-setup.md (10KB)
│ ├── Installation (Docker + Native)
│ ├── Configuration (geospatial extensions)
│ ├── Data Loading Strategies
│ ├── Spatial Indexing
│ ├── SPARQL Endpoint Setup
│ ├── Backup & Maintenance
│ ├── Performance Tuning
│ ├── Monitoring
│ ├── Python Integration Examples
│ └── Troubleshooting Guide
│
└── 📂 assets/ (1 file, 2KB)
└── 🗺️ example-stores.geojson
├── 3 retail store points (Abuja)
├── 1 administrative boundary polygon
└── Ready for testing conversions
╔═══════════════════════════════════════════════════════════════════════════╗
║ KEY CAPABILITIES ║
╠═══════════════════════════════════════════════════════════════════════════╣
║ ║
║ ✓ Convert GeoJSON/Shapefiles to RDF with GeoSPARQL ║
║ ✓ Setup Virtuoso with spatial extensions ║
║ ✓ Construct complex spatial queries (SPARQL) ║
║ ✓ Build location-aware RAG applications ║
║ ✓ Analyze retail/logistics intelligence ║
║ ✓ Spatial reasoning (distance, containment, intersection) ║
║ ✓ Performance optimization for spatial queries ║
║ ✓ Standards-compliant (GeoSPARQL 1.0, OGC, WKT, WGS84) ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
╔═══════════════════════════════════════════════════════════════════════════╗
║ TRIGGER PHRASES ║
╠═══════════════════════════════════════════════════════════════════════════╣
║ ║
║ "Convert this GeoJSON to RDF" ║
║ "Setup Virtuoso with spatial extensions" ║
║ "Find stores near [location]" ║
║ "Analyze spatial relationships in my data" ║
║ "Build a geospatial Graph RAG system" ║
║ "Query location data with GeoSPARQL" ║
║ "Integrate spatial data with RAG" ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
╔═══════════════════════════════════════════════════════════════════════════╗
║ USE CASES ║
╠═══════════════════════════════════════════════════════════════════════════╣
║ ║
║ 🏪 Retail Intelligence ║
║ • Store location mapping ║
║ • Service area analysis ║
║ • Competitive landscape ║
║ • Underserved region identification ║
║ ║
║ 🚚 Logistics Optimization ║
║ • Route planning with geographic constraints ║
║ • Driver service area mapping ║
║ • Delivery zone analysis ║
║ ║
║ 🏘️ Real Estate Analysis ║
║ • Property proximity analysis ║
║ • Amenity access assessment ║
║ • Regional market comparisons ║
║ ║
║ 🏗️ Urban Planning ║
║ • Infrastructure mapping ║
║ • Zoning analysis ║
║ • Demographic spatial distribution ║
║ ║
║ 🌍 Environmental Monitoring ║
║ • Sensor network mapping ║
║ • Coverage area analysis ║
║ • Spatial event correlation ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
╔═══════════════════════════════════════════════════════════════════════════╗
║ TECHNICAL STANDARDS ║
╠═══════════════════════════════════════════════════════════════════════════╣
║ ║
║ GeoSPARQL 1.0 │ OGC standard for spatial RDF queries ║
║ WKT │ Well-Known Text geometry representation ║
║ WGS84 │ World Geodetic System (EPSG:4326) ║
║ RDF/RDFS/OWL │ Semantic web standards ║
║ JSON-LD │ Linked data JSON format ║
║ SHACL │ RDF validation ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
╔═══════════════════════════════════════════════════════════════════════════╗
║ QUICK START ║
╠═══════════════════════════════════════════════════════════════════════════╣
║ ║
║ 1. Upload geospatial-graph-rag.skill to Claude ║
║ 2. Ask: "Help me convert GeoJSON to RDF" ║
║ 3. Claude loads the skill automatically ║
║ 4. Follow guided workflow for your specific task ║
║ ║
║ Dependencies: pip install rdflib SPARQLWrapper ║
║ ║
╚═══════════════════════════════════════════════════════════════════════════╝
Total Files: 8
Total Size: 21KB (compressed), ~60KB (uncompressed)
Lines of Code: ~600 Python, ~1,200 documentation
Quality: ✅ Validated, ✅ Packaged, ✅ Production-ready