city2graph
БесплатноБез исполняемых скриптовНе проверенUse the city2graph 1.0.0 Python package to construct, validate, transform, and troubleshoot geospatial, spatial-topology, morphology, mobility…
от lza6★ 19 звёзд на GitHubОб этом скилле
city2graph operating router
Use this skill for the public city2graph package when a task turns geospatial
features or local mobility/transit data into graph tables, graph libraries, or
PyTorch Geometric objects. The package is GeoDataFrame-first: preserve stable
IDs in indexes, preserve CRS, and inspect typed output dictionaries before
converting representations.
Route by the user's starting point
- Graph representation, metadata, NetworkX/rustworkx/PyG, heterogeneous relations, or metapaths: read graph-conversion.
- Point/polygon spatial relations, proximity, contiguity, reachability, isochrones, tessellation, clipping, dual graphs, or topology cleanup: read spatial-topology.
- Building footprints plus movement segments, tessellation barriers, place/movement composition, or multi-distance morphology: read urban-morphology.
- OD matrices, local GTFS/GBFS feeds, dated stop legs, or transit summary graphs: read mobility-and-transport.
- Overture area/place resolution, controlled layer acquisition, clipping, connector splitting, or passable segment preprocessing: read data-ingestion.
For compound tasks, start with the ingestion or graph-construction route that
matches the input, then hand the resulting GeoDataFrame tables to
urban-morphology, spatial-topology, or graph-conversion as appropriate.
The sibling skills are the detailed operating graph; this file stays a router.
Shared operating contract
- Inspect the input representation and decide whether it is homogeneous or typed. Do not merge node types whose ID namespaces are intentionally separate.
- Establish a CRS before metric operations. Use WGS84 for Overture download bounds, but use a suitable projected CRS for lengths, distances, buffers, tessellation, network budgets, and morphology.
- Keep GeoDataFrame indexes as the canonical node/edge ID contract: node IDs come from node indexes, and edge endpoints are the first two levels of an edge MultiIndex. Verify endpoint membership and CRS consistency before conversion.
- Make direction, reciprocal-edge, multigraph-key, self-loop, threshold, geometry, and optional-dependency choices explicit. Do not infer them from a downstream graph class after the fact.
- Prefer local fixtures and in-memory data for reproducible checks. Live Overture/Nominatim/GTFS/GBFS access, remote releases, and large downloads are runtime prerequisites rather than required offline verification.
- Preserve metadata and provenance: record package version, source data/feed
paths, CRS, ID columns, filters, warning conditions, and parameters. Keep
graph_metadataon PyG objects and graph metadata on NetworkX objects when round-tripping. - Treat
as_nxcompatibility arguments as deprecated where the package says so; prefer returning GeoDataFrames and then calling the shared conversion utilities.
Installation and capability gates
Install the public package in a fresh environment with the smallest capability set that matches the task:
python -m pip install city2graph
# Add CPU PyTorch Geometric support only when tensor conversion is needed:
python -m pip install 'city2graph[cpu]'
A minimal core import check is:
python -c "import city2graph; print(city2graph.__version__)"
For the PyG route, also import torch and torch_geometric, then run a tiny
CPU conversion before selecting any other device. Probe optional dependencies
before use rather than claiming that every installation supports every backend.
The CPU PyG route is covered by the companion verification artifacts; CUDA,
ROCm, and MPS are optional and must not be inferred from a CPU import.
Cross-cutting installation, CRS, schema, optional-dependency, data-source, and representation failures are summarized in references/troubleshooting.md. Package snapshot and routing metadata are in references/repo-provenance.md and references/repo-routing-metadata.json.
Handoff checklist
Before handing a result to analysis or a downstream graph library, confirm:
- the selected sub-skill owns the workflow and its references were read;
- every non-empty layer has the intended CRS and compatible geometry types;
- node and edge IDs/index names are stable and endpoints resolve;
- output relation keys, directionality, edge counts, weights, and geometry semantics match the request;
- optional dependencies and device selection were probed explicitly;
- warnings, empty/fallback results, external-service assumptions, and any unverified backend are recorded rather than hidden.
This generated skill is self-contained and does not require the origina
Установить city2graph в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл city2graph?
Use the city2graph 1.0.0 Python package to construct, validate, transform, and troubleshoot geospatial, spatial-topology, morphology, mobility, transportation, heterogeneous, and GNN-ready graphs.
Как установить скилл city2graph?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл city2graph запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic