Agent skill

Civ6lib

by benchflow-ai in benchflow-ai/skillsbench

Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

Apache-2.0Auto-check passed

Install Civ6lib

skills CLI
$ npx skills add benchflow-ai/skillsbench --skill civ6lib -a claude-code

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

GitHub CLI
$ gh skill install benchflow-ai/skillsbench civ6lib --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/benchflow-ai/skillsbench.git skills-src && mkdir -p .claude/skills && cp -r skills-src/tasks/civ6-adjacency-optimizer/environment/skills/civ6lib .claude/skills/civ6lib && 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
civ6lib
GitHub stars
1.8k
Token cost
~1.7k tokens
SKILL.md length
684 words
Files
4 (incl. scripts)
Skills in repo
178
Repo updated
First seen
Licence
Apache-2.0

At a glance

Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench.

  • Works in 7 steps: Is tile within 3 of city center? → Is tile NOT a mountain/natural wonder? → Is tile NOT a strategic/luxury resource? → …
  • Working with district placement validation
  • SKILL.md covers Modules, Usage, City Placement Rules and District Placement Rules, plus 6 more sections
  • Runs Python scripts from its folder

What it does

Civ6lib is an agent skill from benchflow-ai/skillsbench. Civilization 6 district mechanics library. Use when working with district placement validation, adjacency bonus calculations, or understanding Civ6 game rules.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `scripts/adjacency_rules.py`, `scripts/hex_utils.py` and `scripts/placement_rules.py`).

The repository describes itself as: SkillsBench evaluates how well skills work and how effective agents are at using them. The licence is Apache-2.0.

When your agent uses it

  • Working with district placement validation
  • Adjacency bonus calculations
  • Understanding Civ6 game rules

Example prompts

  • “/civ6lib”

Requirements

  • Python 3

Workflow steps

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

  1. Is tile within 3 of city center?
  2. Is tile NOT a mountain/natural wonder?
  3. Is tile NOT a strategic/luxury resource?
  4. Is tile unoccupied?
  5. Does district meet special requirements?
  6. Does city have district slots available?
  7. Is this district unique and not already built?

What it can do on your machine

Read from SKILL.md and the folder at commit 9a1f4dd. 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

    Ships 3 files in scripts/ (Python), which the agent can run.

    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

Civ6lib loads about 1.7k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 684 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~42
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); the scripts in this folder are not scanned.

SKILL.md

The full file from benchflow-ai/skillsbench at commit 9a1f4dd, republished under its Apache-2.0 licence (© benchflow-ai). 684 words, ~1,729 tokens.

Download SKILL.mdSave it as .claude/skills/civ6lib/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
civ6lib
description
Civilization 6 district mechanics library. Use when working with district placement validation, adjacency bonus calculations, or understanding Civ6 game rules.

Understanding Civ6 District Mechanics

Complete reference for Civilization 6 district placement and adjacency bonus systems (Gathering Storm).

Modules

  • placement_rules.py - District placement validation rules
  • adjacency_rules.py - Adjacency bonus calculation engine

For hex grid utilities (neighbors, distance, etc.), use the hex-grid-spatial skill or import from src.hex_utils.

Usage

python
from civ6lib import (
    # Placement
    DistrictType, Tile, PlacementRules, get_placement_rules,
    validate_district_count, validate_district_uniqueness,
    # Adjacency
    AdjacencyCalculator, get_adjacency_calculator,
)

# Validate a placement
rules = get_placement_rules(tiles, city_center=(21, 13), population=7)
result = rules.validate_placement(DistrictType.CAMPUS, 21, 14, {})
if result.valid:
    print("Valid placement!")

# Calculate adjacency bonus
calculator = get_adjacency_calculator(tiles)
total, per_district = calculator.calculate_total_adjacency(placements)

Part 1: Placement Rules

City Placement Rules

Minimum Distance Between Cities
ConditionMin DistanceTiles Between
Same landmass4 tiles3 tiles
Different landmasses3 tiles2 tiles
Invalid Settlement Tiles
  • Water (Coast, Ocean, Lake)
  • Mountains
  • Natural Wonders
Note on City Center Features

Settling a City Center on a tile with Geothermal Fissure or Luxury/Strategic Resources preserves them (they remain and provide adjacency bonuses to nearby districts). Districts cannot be placed on these tiles.

District Placement Rules

Universal Rules (All Districts)
RuleDescription
DistanceWithin 3 tiles of City Center
MountainsCannot place
Natural WondersCannot place
Strategic ResourcesCannot place (Iron, Horses, Niter, Coal, Oil, Aluminum, Uranium)
Luxury ResourcesCannot place
Existing DistrictCannot place on occupied tile
Bonus ResourcesCAN place (resource destroyed)
Woods/Rainforest/MarshCAN place (feature destroyed)
District-Specific Rules
DistrictSpecial Requirement
HarborMust be on Coast/Lake, adjacent to land
Water ParkMust be on Coast/Lake, adjacent to land
AerodromeMust be on flat land
SpaceportMust be on flat land
EncampmentNOT adjacent to City Center
PreserveNOT adjacent to City Center
AqueductAdjacent to City Center AND fresh water (Mountain, River, Lake, Oasis)
DamOn Floodplains, river crosses 2+ edges

District Limits

Population Formula
max_specialty_districts = 1 + floor((population - 1) / 3)
PopulationMax Districts
1-31
4-62
7-93
10-124
Non-Specialty Districts (Don't Count)

These can be built regardless of population limit:

  • Aqueduct / Bath
  • Neighborhood / Mbanza
  • Canal
  • Dam
  • Spaceport
Uniqueness Rules
RuleDistricts
ONE per cityCampus, Holy Site, Theater Square, Commercial Hub, Harbor, Industrial Zone, Entertainment Complex, Water Park, Encampment, Aerodrome, Preserve
Multiple per cityNeighborhood
ONE per civilizationGovernment Plaza, Diplomatic Quarter

Part 2: Adjacency Bonus Rules

Critical Rule: Minor Bonus Calculation

Each +0.5 type is floored SEPARATELY, then summed!

WRONG:
  IZ with 1 Mine + 1 Lumber Mill + 1 District
  = floor(3/2) = 1  ❌

CORRECT:
  Mine: floor(1/2) = 0
  Lumber Mill: floor(1/2) = 0
  District: floor(1/2) = 0
  TOTAL = 0  ✓

Adjacency Rules by District

Campus (+Science)
BonusSource
+2 eachGeothermal Fissure, Reef
+1 eachMountain
+0.5 eachRainforest (floor separately)
+0.5 eachDistrict (floor separately)
Holy Site (+Faith)
BonusSource
+2 eachNatural Wonder
+1 eachMountain
+0.5 eachWoods (floor separately)
+0.5 eachDistrict (floor separately)
Theater Square (+Culture)
BonusSource
+2 eachWonder (built wonder)
+2 eachEntertainment Complex, Water Park
+0.5 eachDistrict (floor separately)
Commercial Hub (+Gold)
BonusSource
+2If tile is ON a river (binary!)
+2 eachAdjacent Harbor
+0.5 eachDistrict (floor separately)
Show full SKILL.md (267 more words)Show less
Harbor (+Gold)
BonusSource
+2 eachAdjacent City Center
+1 eachCoastal Resource (Fish, Crabs, Whales, Pearls)
+0.5 eachDistrict (floor separately)
Industrial Zone (+Production)
BonusSource
+2 eachAqueduct, Dam, Canal
+1 eachQuarry, Strategic Resource
+0.5 eachMine (floor separately)
+0.5 eachLumber Mill (floor separately)
+0.5 eachDistrict (floor separately)
Districts with NO adjacency bonuses
  • Entertainment Complex
  • Water Park
  • Encampment
  • Aerodrome
  • Spaceport
  • Government Plaza
  • Preserve

Government Plaza Adjacency Bonus

Government Plaza gives +1 adjacency bonus to adjacent specialty districts.

Districts that benefit when adjacent to Government Plaza:

  • Campus (+1)
  • Holy Site (+1)
  • Theater Square (+1)
  • Commercial Hub (+1)
  • Harbor (+1)
  • Industrial Zone (+1)

Note: Government Plaza also counts toward the +0.5 per district minor bonus.

Districts That Count for "+0.5 per District"

Counts: Campus, Holy Site, Theater Square, Commercial Hub, Harbor, Industrial Zone, Entertainment Complex, Water Park, Encampment, Aerodrome, Spaceport, Government Plaza, Diplomatic Quarter, Preserve, City Center, Aqueduct, Dam, Canal, Neighborhood

Destruction Effects

Placing ANY district destroys:

  • Woods (FEATURE_FOREST)
  • Rainforest (FEATURE_JUNGLE)
  • Marsh (FEATURE_MARSH)
  • Bonus Resources

This affects OTHER districts' adjacency!


Key Classes

DistrictType (Enum)

All district types: CAMPUS, HOLY_SITE, THEATER_SQUARE, COMMERCIAL_HUB, HARBOR, INDUSTRIAL_ZONE, etc.

Tile (Dataclass)

Represents a map tile with terrain, features, resources, rivers.

PlacementRules

Validates district placements against all game rules.

AdjacencyCalculator

Calculates adjacency bonuses based on surrounding tiles and districts.


Quick Validation Checklist

  1. Is tile within 3 of city center?
  2. Is tile NOT a mountain/natural wonder?
  3. Is tile NOT a strategic/luxury resource?
  4. Is tile unoccupied?
  5. Does district meet special requirements?
  6. Does city have district slots available?
  7. Is this district unique and not already built?

© benchflow-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in tasks/civ6-adjacency-optimizer/environment/skills/civ6lib of benchflow-ai/skillsbench.

  • SKILL.md
  • scripts/adjacency_rules.py
  • scripts/hex_utils.py
  • scripts/placement_rules.py

Open the folder on GitHubat commit 9a1f4dd

Compare with similar skills

Civ6lib 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.

Civ6lib compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Civ6lib this skillbenchflow-ai/skillsbench1.8k—~1.7kAutomated safety check: PassApache-2.0
Esign Field Placementaffaan-m/ECC275k—~2.6kAutomated safety check: PassMIT
Mechanical Refactor Verifysgl-project/sglang37k2 repos~1.4kAutomated safety check: PassApache-2.0
Analyzing Persistence Mechanisms In Linuxmukul975/Anthropic-Cybersecurity-Skills34k—~801Automated safety check: NotesApache-2.0
Hunting For Persistence Mechanisms In Windowsmukul975/Anthropic-Cybersecurity-Skills34k—~1.2kAutomated safety check: PassApache-2.0
Ljg Mechanismlijigang/ljg-skills7.5k—~498Automated safety check: PassMIT

Similar skills

  • Deterministic method for placing signature, date, and text fields in a web e-signature composer through a browser automation session, using a fixed signature page, numeric Location panel coordinates…

    275k GitHub stars~2.6k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Mechanical Refactor Verify

    sgl-project/sglang

    Make mechanical refactoring (file splits, function moves, module extractions, renames) machine-checkable instead of eyeballed.

    37k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • Analyzing Persistence Mechanisms In Linux

    mukul975/Anthropic-Cybersecurity-Skills

    Scan Linux systems for persistence mechanisms including crontab/systemd entries, LDPRELOAD injection, shell profile modifications (.bashrc, .profile), and SSH authorizedkeys backdoors, then…

    34k GitHub stars~801 tokensUpdated 1 mo ago
    DevOps & CloudAuto-check: notes
  • Hunting For Persistence Mechanisms In Windows

    mukul975/Anthropic-Cybersecurity-Skills

    Systematically hunts for adversary persistence mechanisms across Windows endpoints, covering registry Run/RunOnce keys, services, startup folders, scheduled tasks, and WMI event subscriptions.

    34k GitHub stars~1.2k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Ljg Mechanism

    lijigang/ljg-skills

    针对用户提供的现象,用「看反常—追过程—分解释—带条件迁移」生成机制猜想,并联网核对现象、检验关键因果与竞争解释,交付证据最能支撑的机制及其边界。USE WHEN 用户调用 ljg-mechanism、说「找机制」「机制研究」「用四步框架走一遍」「联网验证这个解释」,或希望研究一个现象怎样发生。NOT FOR 纯概念定义、普通摘要、已有唯一解的操作题或只画地图。

    7.5k GitHub stars~498 tokensUpdated yesterday
    Auto-check passed
  • Detecting T1548 Abuse Elevation Control Mechanism

    mukul975/Anthropic-Cybersecurity-Skills

    Detect abuse of elevation control mechanisms (T1548), including Windows UAC bypass via auto-elevating binaries like fodhelper.exe and Linux sudo/setuid/setgid exploitation, by monitoring registry…

    34k GitHub stars~1.5k tokensUpdated 1 mo ago
    SecurityAuto-check: notes

More from benchflow-ai/skillsbench

All 178 skills in this repo
  • Lean4 Memories

    benchflow-ai/skillsbench

    This skill should be used when working on Lean 4 formalization projects to maintain persistent memory of successful proof patterns, failed approaches, project conventions, and user preferences…

    1.8k GitHub stars~3.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Senior Data Engineer

    benchflow-ai/skillsbench

    World-class data engineering skill for building scalable data pipelines, ETL/ELT systems, real-time streaming, and data infrastructure.

    1.8k GitHub stars~5.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Ac Branch Pi Model

    benchflow-ai/skillsbench

    AC branch pi-model power flow equations (P/Q and |S|) with transformer tap ratio and phase shift, matching acopf-math-model.md and MATPOWER branch fields.

    1.8k GitHub stars~1.1k tokensUpdated 2 mo ago
    Auto-check passed
  • D3 Visualization

    benchflow-ai/skillsbench

    Build deterministic, verifiable data visualizations with D3.js (v6).

    1.8k GitHub stars~1.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Dc Power Flow

    benchflow-ai/skillsbench

    DC power flow analysis for power systems. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~717 tokensUpdated 2 mo ago
    Auto-check passed
  • Energy Calculator

    benchflow-ai/skillsbench

    Calculate per-second RMS energy from audio files. An agent skill from benchflow-ai/skillsbench.

    1.8k GitHub stars~437 tokensUpdated 2 mo ago
    Auto-check passed

Questions about Civ6lib

What does Civ6lib do?

Civilization 6 district mechanics library. An agent skill from benchflow-ai/skillsbench. Civ6lib is an agent skill from benchflow-ai/skillsbench. Civilization 6 district mechanics library.

When should I use Civ6lib?

Civ6lib fits situations like: working with district placement validation; adjacency bonus calculations; understanding Civ6 game rules.

How do I install Civ6lib in Claude Code?

Run `npx skills add benchflow-ai/skillsbench --skill civ6lib -a claude-code`. Or copy the skill folder (tasks/civ6-adjacency-optimizer/environment/skills/civ6lib in benchflow-ai/skillsbench) into .claude/skills/civ6lib in your project. Claude Code loads it when a task matches its description.

How do I install Civ6lib in Codex?

Run `npx skills add benchflow-ai/skillsbench --skill civ6lib -a codex`. Or copy the skill folder (tasks/civ6-adjacency-optimizer/environment/skills/civ6lib in benchflow-ai/skillsbench) into .agents/skills/civ6lib in your project. Codex loads it when a task matches its description.

Can I use Civ6lib 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 benchflow-ai/skillsbench --skill civ6lib -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/civ6lib, .gemini/skills/civ6lib, .github/skills/civ6lib and .opencode/skills/civ6lib in your project.

What does Civ6lib need to run?

Going by SKILL.md and its folder, Civ6lib needs Python for the scripts in its folder. Our summary lists: Python 3.

Does Civ6lib 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 Civ6lib 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Civ6lib use?

Civ6lib is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Civ6lib 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 Civ6lib?

Skills that share tags, products or a category with Civ6lib: Esign Field Placement (affaan-m/ECC, 275k stars), Mechanical Refactor Verify (sgl-project/sglang, 37k stars), Analyzing Persistence Mechanisms In Linux (mukul975/Anthropic-Cybersecurity-Skills, 34k stars) and Hunting For Persistence Mechanisms In Windows (mukul975/Anthropic-Cybersecurity-Skills, 34k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Civ6lib?

benchflow-ai (a GitHub organization) maintains it in benchflow-ai/skillsbench, which has 1,832 GitHub stars. The repository holds 178 skills in this directory. The repository was last updated on July 23, 2026.

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