mcpbeat Sign in

Urban Calculator Skill for Claude

>- Python computational tools for urban design metric calculations including density, FAR, walkability scoring, parking requirements, green space analysis, and block optimization. Use when the user asks to calculate density, compute FAR, score walkability, determine parking requirements, analyze green space provision, optimize block dimensions, run urban metrics, or perform any quantitative urban design calculation. Also use when precise numbers are needed for any urban design metric rather than rules of thumb.

27k tokens
context cost
the whole folder, loaded on every use
8
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
123
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/Abhinavbwj/Urban-Design-Skills-Claude --skill urban-calculator

What comes with it

102 170 bytes besides the instruction
references/formulas.md
scripts/block_optimizer.py
scripts/density_calculator.py
scripts/far_calculator.py
scripts/green_space_analyzer.py
scripts/parking_calculator.py
scripts/walkability_scorer.py

What it tells the agent to use

found in the instruction text
Bash runs shell commands — read the instruction before connecting

The instruction itself

12 sections, as written by the author

Urban Calculator

A suite of Python computational tools for precise urban design metric calculations. Each script is self-contained, accepts inputs via command-line arguments, and outputs both human-readable text and structured JSON.

Available Calculators

| Script | Purpose | Key Inputs | Key Outputs |

|--------|---------|------------|-------------|

| density_calculator.py | Population and dwelling density | Site area, FAR, unit sizes, efficiency | DU/ha, persons/ha, population |

| far_calculator.py | FAR and GFA optimization | Site area, coverage, floors, uses | FAR, GFA per use, total GFA |

| walkability_scorer.py | Walk Score estimation | Amenity distances, network connectivity | Score 0-100, category |

| parking_calculator.py | Parking requirements | Uses, areas, ratios, reductions | Total spaces, area needed |

| green_space_analyzer.py | Green space adequacy | Population, park areas, distances | Per capita m2, service coverage |

| block_optimizer.py | Block dimension optimization | Target FAR, height, coverage, daylight | Optimal block dimensions |

Usage Instructions

All scripts are located in the scripts/ subdirectory relative to this skill. Run them with Python 3 via the command line. Every script supports a --json flag to output structured JSON instead of formatted text.

Density Calculator

Calculate population and dwelling density for a development site:

python scripts/density_calculator.py --site-area 20000 --far 2.5 --avg-unit-size 85 --efficiency 0.75 --household-size 2.5 --residential-pct 0.7 --streets-pct 0.30

Minimal example (uses defaults for optional parameters):

python scripts/density_calculator.py --site-area 15000 --far 3.0

JSON output:

python scripts/density_calculator.py --site-area 20000 --far 2.5 --json

FAR Calculator

Calculate Floor Area Ratio and Gross Floor Area by use:

python scripts/far_calculator.py --site-area 10000 --coverage 0.6 --floors 4,6,8 --use-split "res:60,com:25,civic:10,open:5"

With bonus FAR for affordable housing:

python scripts/far_calculator.py --site-area 10000 --coverage 0.6 --floors 6 --bonus-far 0.5

With explicit floor areas per zone:

python scripts/far_calculator.py --site-area 10000 --floor-areas "2000,3000,1500" --floors "4,6,8"

Walkability Scorer

Estimate a Walk Score based on amenity distances and intersection density:

python scripts/walkability_scorer.py --grocery 200 --restaurants 150 --shopping 400 --coffee 100 --parks 300 --schools 500 --intersection-density 150

Minimal example (unspecified amenities default to 9999m = not present):

python scripts/walkability_scorer.py --grocery 300 --parks 200

Parking Calculator

Determine parking requirements with transit and TDM reductions:

python scripts/parking_calculator.py --residential-units 200 --office-area 5000 --retail-area 2000 --transit-reduction 0.2 --shared-reduction 0.1 --space-type structured

Surface parking example:

python scripts/parking_calculator.py --residential-units 50 --space-type surface

Green Space Analyzer

Analyze green space provision against international standards:

python scripts/green_space_analyzer.py --population 5000 --parks "Central Park:8000:neighborhood,Pocket Plaza:400:pocket,River Walk:2000:linear" --standard who

JSON output with UN-Habitat standard:

python scripts/green_space_analyzer.py --population 12000 --parks "Main Park:15000:district,Local Green:1200:neighborhood" --standard un-habitat --json

Block Optimizer

Find optimal block dimensions for a target FAR:

python scripts/block_optimizer.py --target-far 2.5 --max-height 6 --building-depth 14 --min-courtyard 21 --daylight-angle 25

Higher density example:

python scripts/block_optimizer.py --target-far 4.0 --max-height 10 --max-coverage 0.7 --building-depth 16

Formula Reference

All formulas, worked examples, unit conversions, and standard assumptions are documented in references/formulas.md. Key formulas used across the calculators:

  • FAR = Total GFA / Site Area
  • Net Density (DU/ha) = Dwelling Units / Net Site Area (ha)
  • Gross Density (DU/ha) = Dwelling Units / Gross Site Area including streets (ha)
  • Population Density = Net Density x Household Size
  • Walk Score = Weighted sum of distance-decay scores per amenity category, normalized to 0-100
  • Parking Spaces = Sum of (use area x ratio) x (1 - transit reduction) x (1 - shared reduction) x (1 - TDM reduction)
  • Green Space Per Capita = Total Green Space Area / Population

See references/formulas.md for the complete reference with worked examples.

Integration

Other skills in the Urban Design Skills can invoke these calculators to get precise numbers. The recommended integration pattern is:

  • From a design skill: After generating a site layout, call density_calculator.py and far_calculator.py with the computed areas to validate metrics.
  • From a masterplan skill: Use block_optimizer.py to determine block dimensions before laying out the street grid.
  • From an analysis skill: Run walkability_scorer.py and green_space_analyzer.py to evaluate design proposals against standards.
  • Chaining calculators: Use the --json flag to pipe outputs between scripts programmatically.

Example chain (compute density then check green space):

# Step 1: Calculate density to get population
python scripts/density_calculator.py --site-area 50000 --far 2.5 --json > density_output.json

# Step 2: Use the population estimate to check green space adequacy
python scripts/green_space_analyzer.py --population 3500 --parks "Park A:5000:neighborhood,Park B:800:pocket" --json

Output Formats

All scripts support two output modes:

  • Human-readable text (default): Formatted tables and summaries suitable for reports and presentations. Includes section headers, aligned columns, and contextual notes.
  • JSON (with --json flag): Structured data suitable for programmatic consumption, piping between scripts, and integration with other tools. All numeric values are provided as numbers (not strings), and all units are documented in the JSON keys.

Example JSON output structure (density calculator):

{
  "inputs": {
    "site_area_m2": 20000,
    "far": 2.5,
    "avg_unit_size_m2": 85,
    "efficiency": 0.75,
    "household_size": 2.5,
    "residential_pct": 0.7,
    "streets_pct": 0.30
  },
  "results": {
    "total_gfa_m2": 50000,
    "residential_gfa_m2": 35000,
    "net_internal_area_m2": 26250,
    "dwelling_units": 308,
    "population": 771,
    "net_density_du_per_ha": 154.0,
    "gross_density_du_per_ha": 107.8,
    "population_density_persons_per_ha": 385.0
  }
}

Other skills for the same job

different authors, same section of the catalogue
D3 Viz
by chrisvoncsefalvay
×3

Creating interactive data visualisations using d3.js. This skill should be used when creating custom charts, graphs, network diagrams, geographic visualisations, or any complex SVG-based data visualisation that requires fine-grained control over visual elements, transitions, or interactions. Use this for bespoke visualisations beyond standard charting libraries, whether in React, Vue, Svelte, vanilla JavaScript, or any other environment.

20k tokens
Astropy
by christophacham
×3

Comprehensive Python library for astronomy and astrophysics. This skill should be used when working with astronomical data including celestial coordinates, physical units, FITS files, cosmological calculations, time systems, tables, world coordinate systems (WCS), and astronomical data analysis. Use when tasks involve coordinate transformations, unit conversions, FITS file manipulation, cosmological distance calculations, time scale conversions, or astronomical data processing.

16k tokens
Instrument Data To Allotrope
by anthropics
vendor ×2

Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV. Use this skill when scientists need to standardize instrument data for LIMS systems, data lakes, or downstream analysis. Supports auto-detection of instrument types. Outputs include full ASM JSON, flattened CSV for easy import, and exportable Python code for data engineers. Common triggers include converting instrument files, standardizing lab data, preparing data for upload to LIMS/ELN systems, or generating parser code for production pipelines.

33k tokens scripts
Qutip
by ComeOnOliver
×2

Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems with dissipation, (5) quantum measurements and entanglement, (6) visualization (Bloch sphere, Wigner functions), (7) steady states and correlation functions, or (8) advanced methods (Floquet theory, HEOM, stochastic solvers). Handles both closed and open quantum systems across various domains including quantum optics, quantum computing, and condensed matter physics.

27k tokens
Copilot Usage Metrics
by github
vendor ×1

Retrieve and display GitHub Copilot usage metrics for organizations and enterprises using the GitHub CLI and REST API.

1k tokens scripts
Mentoring Juniors
by github
vendor ×1

Socratic mentoring for junior developers and AI newcomers. Guides through questions, never answers. Triggers: "help me understand", "explain this code", "I''m stuck", "Im stuck", "I''m confused", "Im confused", "I don''t understand", "I dont understand", "can you teach me", "teach me", "mentor me", "guide me", "what does this error mean", "why doesn''t this work", "why does not this work", "I''m a beginner", "Im a beginner", "I''m learning", "Im learning", "I''m new to this", "Im new to this", "walk me through", "how does this work", "what''s wrong with my code", "what''s wrong", "can you break this down", "ELI5", "step by step", "where do I start", "what am I missing", "newbie here", "junior dev", "first time using", "how do I", "what is", "is this right", "not sure", "need help", "struggling", "show me", "help me debug", "best practice", "too complex", "overwhelmed", "lost", "debug this", "/socratic", "/hint", "/concept", "/pseudocode". Progressive clue systems, teaching techniques, and success metrics.

4k tokens
Astropy
by K-Dense-AI
×1

Core Python library for astronomy and astrophysics workflows that need Astropy APIs, including units/quantities, coordinates, FITS I/O, tables, time systems, WCS, and cosmology. Use when implementing or debugging astronomical data analysis code with Astropy.

18k tokens
Polars
by K-Dense-AI
×1

High-performance DataFrame library for Python ETL, analytics, and pandas migration. Use for expression-based data manipulation with lazy query optimization, parallel execution, streaming out-of-core processing, Arrow interoperability, and optional GPU execution.

20k tokens

How to use it

Copy the folder

Take abhinavbwj/urban-calculator from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.