Skip to content
Back to skills

City2graph

ASecurity

"Use the city2graph 1.0.0 Python package to construct, validate,

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
businesspythonrustgobashnodebackend

Works with

  • cli

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill city2graph --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of City2graph?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for City2graph
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-city2graph/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-city2graph)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "city2graph"
description: "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."
metadata:
  disco-role: operating
disable-model-invocation: true
license: BSD 3-Clause
---

# 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](sub-skills/graph-conversion/SKILL.md).
- **Point/polygon spatial relations, proximity, contiguity, reachability,
  isochrones, tessellation, clipping, dual graphs, or topology cleanup:** read
  [spatial-topology](sub-skills/spatial-topology/SKILL.md).
- **Building footprints plus movement segments, tessellation barriers,
  place/movement composition, or multi-distance morphology:** read
  [urban-morphology](sub-skills/urban-morphology/SKILL.md).
- **OD matrices, local GTFS/GBFS feeds, dated stop legs, or transit summary
  graphs:** read
  [mobility-and-transport](sub-skills/mobility-and-transport/SKILL.md).
- **Overture area/place resolution, controlled layer acquisition, clipping,
  connector splitting, or passable segment preprocessing:** read
  [data-ingestion](sub-skills/data-ingestion/SKILL.md).

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

1. Inspect the input representation and decide whether it is homogeneous or
   typed. Do not merge node types whose ID namespaces are intentionally
   separate.
2. 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.
3. 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.
4. 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.
5. 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.
6. Preserve metadata and provenance: record package version, source data/feed
   paths, CRS, ID columns, filters, warning conditions, and parameters. Keep
   `graph_metadata` on PyG objects and graph metadata on NetworkX objects when
   round-tripping.
7. Treat `as_nx` compatibility 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:

```bash
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:

```bash
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](references/troubleshooting.md). Package
snapshot and routing metadata are in
[references/repo-provenance.md](references/repo-provenance.md) and
[references/repo-routing-metadata.json](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 original
repository checkout, its notebooks, its test fixtures, or a live external
service at runtime.

Files in this skill

  • SKILL.md5.3 KB
  • references/repo-provenance.md1.7 KB
  • references/repo-routing-metadata.json399 B
  • references/troubleshooting.md6.4 KB
  • sub-skills/data-ingestion/SKILL.md17.4 KB
  • sub-skills/data-ingestion/references/overture-workflows.md9.9 KB
  • sub-skills/data-ingestion/references/troubleshooting.md12.8 KB
  • sub-skills/graph-conversion/SKILL.md15.7 KB
  • sub-skills/graph-conversion/references/api-reference.md9.3 KB
  • sub-skills/graph-conversion/references/heterogeneous-and-pyg.md8.9 KB
  • sub-skills/graph-conversion/references/troubleshooting.md11.9 KB
  • sub-skills/mobility-and-transport/SKILL.md6 KB
  • sub-skills/mobility-and-transport/references/od-workflows.md7.8 KB
  • sub-skills/mobility-and-transport/references/transit-workflows.md8.7 KB
  • sub-skills/mobility-and-transport/references/troubleshooting.md8.5 KB
  • sub-skills/spatial-topology/SKILL.md5.7 KB
  • sub-skills/spatial-topology/references/api-reference.md11.7 KB
  • sub-skills/spatial-topology/references/distance-crs-and-geometry.md10.7 KB
  • sub-skills/spatial-topology/references/troubleshooting.md11.9 KB
  • sub-skills/urban-morphology/SKILL.md14.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.