Agent skill

Location System

by OpenLitterMap in OpenLitterMap/openlittermap-web

Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data.

GPL-3.0Auto-check passedDatabases

Install Location System

skills CLI
$ npx skills add OpenLitterMap/openlittermap-web --skill location-system -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install OpenLitterMap/openlittermap-web location-system --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/OpenLitterMap/openlittermap-web.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.ai/skills/location-system .claude/skills/location-system && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
location-system
GitHub stars
134
Token cost
~1.7k tokens
SKILL.md length
391 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
GPL-3.0

At a glance

Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data.

  • Works in 5 steps: Location tables store identity only. No… → Photo table uses FK columns only:… → Redis is a derived cache. All Redis… → …
  • Tasks that involve Geospatial analysis
  • SKILL.md covers Key Files, Invariants, Patterns and LocationController API (v1), plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Location System is an agent skill from OpenLitterMap/openlittermap-web. Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Databases, covering Geospatial analysis. It works with Redis and PHP. The repository describes itself as: https://opengeospatialdata.springeropen.com/articles/10.1186/s40965-018-0050-y. The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Geospatial analysis

Example prompts

  • “/location-system”

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Location tables store identity only. No total_* counters, no manual_verify, no aggregates. All stats come from Redis or the metrics table.
  2. Photo table uses FK columns only: country_id, state_id, city_id. Deprecated string columns (country, county, city, display_name, location…
  3. Redis is a derived cache. All Redis location data is rebuildable from the metrics table.
  4. HyperLogLog for contributor counts. PFCOUNT gives ~0.81% error, O(1) space, append-only (cannot decrement).
  5. Country uses shortcode as route key, not id. Routes: /countries/{shortcode}.

What it can do on your machine

Read from SKILL.md and the folder at commit ac688aa. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are php, sql and json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Location System loads about 1.7k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 391 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from OpenLitterMap/openlittermap-web at commit ac688aa, republished under its GPL-3.0 licence (© OpenLitterMap). 391 words, ~1,733 tokens.

Download SKILL.mdSave it as .claude/skills/location-system/SKILL.md (or your agent's skills folder).
name
location-system
description
Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data.

Location System

Location tables store identity only (name, shortcode, FKs). All aggregates live in the metrics table and Redis. The Location base model computes all stats from Redis on access via $appends.

Key Files

  • app/Models/Location/Location.php — Abstract base model with Redis-backed computed attributes
  • app/Models/Location/Country.php — Route key: shortcode (ISO 3166-1 alpha-2)
  • app/Models/Location/State.php — Belongs to Country
  • app/Models/Location/City.php — Belongs to Country + State
  • app/Actions/Locations/ResolveLocationAction.php — Lat/lon -> Country/State/City via geocoding
  • app/Actions/Locations/ReverseGeocodeLocationAction.php — LocationIQ API wrapper
  • app/Actions/Locations/LocationResult.php — DTO returned by ResolveLocationAction
  • app/Enums/LocationType.php — Global(0), Country(1), State(2), City(3)
  • app/Enums/Timescale.php — AllTime(0), Daily(1), Weekly(2), Monthly(3), Yearly(4)

Invariants

  1. Location tables store identity only. No total_* counters, no manual_verify, no aggregates. All stats come from Redis or the metrics table.
  2. Photo table uses FK columns only: country_id, state_id, city_id. Deprecated string columns (country, county, city, display_name, location, road) are dropped.
  3. Redis is a derived cache. All Redis location data is rebuildable from the metrics table.
  4. HyperLogLog for contributor counts. PFCOUNT gives ~0.81% error, O(1) space, append-only (cannot decrement).
  5. Country uses shortcode as route key, not id. Routes: /countries/{shortcode}.

Patterns

ResolveLocationAction
php
// app/Actions/Locations/ResolveLocationAction.php
public function run(float $lat, float $lon): LocationResult
{
    $address = $this->reverseGeocode->run($lat, $lon);

    $country = $this->resolveCountry($address);  // firstOrCreate by country_code
    $state   = $this->resolveState($country, $address);
    $city    = $this->resolveCity($country, $state, $address);

    return new LocationResult($country, $state, $city, $address, $displayName);
}

Lookup strategy for city: Searches keys in order: city, town, city_district, village, hamlet, locality, county.

LocationResult DTO
php
readonly class LocationResult
{
    public function __construct(
        public Country $country,
        public State   $state,
        public City    $city,
        public array   $addressArray,
        public string  $displayName,
    ) {}
}
LocationType enum
php
enum LocationType: int
{
    case Global  = 0;   // dbColumn: null,       scopePrefix: {g}
    case Country = 1;   // dbColumn: country_id, scopePrefix: {c:$id}
    case State   = 2;   // dbColumn: state_id,   scopePrefix: {s:$id}
    case City    = 3;   // dbColumn: city_id,     scopePrefix: {ci:$id}

    public function dbColumn(): ?string
    public function scopePrefix(int $id = 0): string
    public function modelClass(): ?string
    public function parentType(): ?self
}
Location model computed attributes (from Redis)
php
// All appended attributes on Country/State/City models:
$country->total_litter_redis      // HGET {c:$id}:stats litter
$country->total_photos_redis      // HGET {c:$id}:stats uploads
$country->total_contributors_redis // PFCOUNT {c:$id}:hll
$country->total_xp               // HGET {c:$id}:stats xp
$country->litter_data             // HGETALL {c:$id}:cat  (resolved to names)
$country->objects_data            // top 20 from {c:$id}:obj
$country->materials_data          // HGETALL {c:$id}:mat
$country->brands_data             // HGETALL {c:$id}:brands
$country->ppm                     // Cached time-series from metrics table (15min TTL)
$country->recent_activity         // Last 7 days daily counts (5min TTL)
Location hierarchy rankings
php
RedisKeys::globalCountryLitterRanking()           // {g}:rank:c:litter (ZSET)
RedisKeys::globalCountryPhotosRanking()           // {g}:rank:c:photos
RedisKeys::countryStateRanking($countryId, $metric)  // {c:$id}:rank:s:$metric
RedisKeys::stateCityRanking($stateId, $metric)       // {s:$id}:rank:ci:$metric
Database schema (identity only)
sql
countries (id, country, shortcode UNIQUE, created_by, timestamps)
states    (id, state, country_id, created_by, timestamps, UNIQUE(country_id, state))
cities    (id, city, country_id, state_id, created_by, timestamps, UNIQUE(country_id, state_id, city))

LocationController API (v1)

app/Http/Controllers/Location/LocationController.php serves the locations browsing UI.

Endpoints
  • GET /api/v1/locations — Global view: list of countries with stats
  • GET /api/v1/locations/{type}/{id} — Drill into country/state/city
Show full SKILL.md (165 more words)Show less
Response keys
json
{
    "stats": { "countries": 120, "photos": 50000, "tags": 150000, ... },
    "locations": [
        {
            "id": 1, "name": "Ireland", "shortcode": "IE",
            "total_tags": 5000, "total_images": 1200, "total_members": 45,
            "xp": 15000, "created_at": "...", "updated_at": "...",
            "pct_tags": 3.3, "pct_photos": 2.4, "avg_tags_per_person": 111.1
        }
    ],
    "location_type": "country",
    "breadcrumbs": [ ... ],
    "activity": { "today": { ... }, "this_month": { ... } }
}

Key naming: Response uses locations (not children) and location_type (not children_type). Children use total_tags, total_images, total_members (not tags, photos, contributors). The Pinia store useLocationsStore reads these exact keys.

Time filtering

Supports ?period=today|yesterday|this_month|last_month|this_year and ?year=2024 query params. Mutually exclusive — year clears period and vice versa.

Common Mistakes

  • Adding aggregate columns to location tables. Aggregates live in metrics table and Redis. Location tables are identity only.
  • Using deprecated photo string columns. country, county, city, display_name, location, road are dropped. Use country_id, state_id, city_id FKs.
  • Routing countries by ID instead of shortcode. Country model has getRouteKeyName(): 'shortcode'.
  • Treating Redis location stats as authoritative. They're derived caches. The metrics table is source of truth.
  • Decrementing HyperLogLog. PFCOUNT is append-only. You cannot remove a contributor from HLL.
  • Forgetting GeocodingException. ResolveLocationAction::run() throws GeocodingException when geocoding fails. Always handle this.
  • Using children or children_type in API responses. The correct keys are locations and location_type.
  • Filtering locations by manual_verify. This deprecated column is no longer used. Don't scope queries with it.

© OpenLitterMap, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .ai/skills/location-system of OpenLitterMap/openlittermap-web.

Open the folder on GitHubat commit ac688aa

Compare with similar skills

Location System next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Location System compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Location System this skillOpenLitterMap/openlittermap-web134—~1.7kAutomated safety check: PassGPL-3.0
Configuring Horizoncoollabsio/coolify63k4 repos~898Automated safety check: PassMIT
Laravel Sessions MiddlewareHoangNguyen0403/agent-skills-standard571—~830Automated safety check: NotesMIT
Runtime Behavior Proberedis/node-redis18k—~4.4kAutomated safety check: PassMIT
Implement Commandredis/node-redis18k—~5kAutomated safety check: PassMIT
Redis Insight Pluginredis/RedisInsight8.9k—~3.5kAutomated safety check: PassMIT

Similar skills

  • Configuring Horizon

    coollabsio/coolify

    A skill your agent uses whenever the user mentions Horizon by name in a Laravel context.

    63k GitHub starsUsed in 4 repos~898 tokens
    Backend & APIsAuto-check passed
  • Laravel Sessions Middleware

    HoangNguyen0403/agent-skills-standard

    Configure Redis session drivers, register security-header middleware, and prevent session fixation in Laravel.

    571 GitHub stars~830 tokensUpdated today
    Backend & APIsAuto-check: notes
  • Runtime Behavior Probe

    redis/node-redis

    Official

    Plan and execute runtime-behavior investigations with temporary TypeScript probe scripts, validation matrices, state controls, and findings-first reports.

    18k GitHub stars~4.4k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Implement Command

    redis/node-redis

    Official

    Add a new Redis command (or command variant) to node-redis end-to-end — the <NAME.ts Command file, its registration with JSDoc in the package commands/index.ts, and a co-located <NAME.spec.ts with…

    18k GitHub stars~5k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Redis Insight Plugin

    redis/RedisInsight

    Official

    A skill your agent uses when creating, modifying, debugging, deploying, or testing Redis Insight Workbench visualization plugins, plugin manifests, package.json visualizations, activationMethod…

    8.9k GitHub stars~3.5k tokensUpdated 3 days ago
    DatabasesAuto-check passed
  • Extend Commands API

    redis/lettuce

    Official

    Add or extend Redis commands in the Lettuce client API end-to-end — a new core command, a family of new commands, an extension to an existing command's options, or a module/area command…

    5.8k GitHub stars~7.7k tokensUpdated today
    DatabasesAuto-check: notes

More from OpenLitterMap/openlittermap-web

All 16 skills in this repo
  • Tailwindcss Development

    OpenLitterMap/openlittermap-web

    Styles applications using Tailwind CSS v3 utilities. An agent skill from OpenLitterMap/openlittermap-web.

    134 GitHub stars~713 tokensUpdated 23 days ago
    Auto-check passed
  • Olm Architecture

    OpenLitterMap/openlittermap-web

    OpenLitterMap v5 architecture reference. An agent skill from OpenLitterMap/openlittermap-web.

    134 GitHub stars~5.2k tokensUpdated 23 days ago
    Auto-check passed
  • Achievements System

    OpenLitterMap/openlittermap-web

    AchievementEngine, AchievementRepository, milestone checkers, AchievementsSeeder, userachievements pivot, AchievementsController API, and achievement evaluation flow.

    134 GitHub stars~1.4k tokensUpdated 23 days ago
    Auto-check passed
  • Admin System

    OpenLitterMap/openlittermap-web

    AdminController, photo approval, tag editing, deletion, MetricsService integration, admin middleware, verification queue, and admin XP.

    134 GitHub stars~3.9k tokensUpdated 23 days ago
    Auto-check passed
  • API Endpoints

    OpenLitterMap/openlittermap-web

    REST API endpoints, route structure, auth guards, request/response contracts, error patterns, and the full API surface for web SPA and mobile clients.

    134 GitHub stars~4k tokensUpdated 23 days ago
    Auto-check passed
  • Clustering System

    OpenLitterMap/openlittermap-web

    ClusteringService, tile keys, dirty tiles/teams, clustering commands, ClusterController GeoJSON API, PhotoObserver dirty marking, and map cluster rendering.

    134 GitHub stars~2k tokensUpdated 23 days ago
    Auto-check passed

Works with

Categories

Questions about Location System

What does Location System do?

Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data. Location System is an agent skill from OpenLitterMap/openlittermap-web. Countries, states, cities, ResolveLocationAction, Location base model, LocationType enum, geocoding, and location-level Redis data.

When should I use Location System?

Location System fits situations like: tasks that involve Geospatial analysis.

How do I install Location System in Claude Code?

Run `npx skills add OpenLitterMap/openlittermap-web --skill location-system -a claude-code`. Or copy the skill folder (.ai/skills/location-system in OpenLitterMap/openlittermap-web) into .claude/skills/location-system in your project. Claude Code loads it when a task matches its description.

How do I install Location System in Codex?

Run `npx skills add OpenLitterMap/openlittermap-web --skill location-system -a codex`. Or copy the skill folder (.ai/skills/location-system in OpenLitterMap/openlittermap-web) into .agents/skills/location-system in your project. Codex loads it when a task matches its description.

Can I use Location System in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add OpenLitterMap/openlittermap-web --skill location-system -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/location-system, .gemini/skills/location-system, .github/skills/location-system and .opencode/skills/location-system in your project.

What does Location System need to run?

SKILL.md names no scripts, command-line tools or credentials: Location System is instructions for the agent only.

Does Location System access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Location System safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Location System use?

Location System is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Location System use?

About 1.7k tokens (SKILL.md is roughly 6.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Location System?

Skills that share tags, products or a category with Location System: Configuring Horizon (coollabsio/coolify, 63k stars), Laravel Sessions Middleware (HoangNguyen0403/agent-skills-standard, 571 stars), Runtime Behavior Probe (redis/node-redis, 18k stars) and Implement Command (redis/node-redis, 18k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Location System?

OpenLitterMap (a GitHub organization) maintains it in OpenLitterMap/openlittermap-web, which has 134 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on September 14, 2026.

Source: OpenLitterMap/openlittermap-web on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.