Evo Civ6 Adjacency logo

Evo Civ6 Adjacency

Community
Zhang-Henry
evo-civ6-adjacency

Optimize Civ6 district placement for maximum adjacency bonuses. Use when given a .Civ6Map file and scenario parameters (num_cities, population, civilization). Reads map as SQLite, computes hex grid neighbors, validates placement rules, calculates adjacency bonuses per district type, and uses greedy optimization to find best layout.

Overview

PublisherZhang-Henry
RepositoryCoEvoSkills
Skill nameevo-civ6-adjacency
Stars
83
Forks
9
Bundled files
8
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 8 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Zhang-Henry on GitHub. Read the source before you install it.

Installation

Install the Evo Civ6 Adjacency AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/civ6-adjacency-optimizer/evo-civ6-adjacency
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Zhang-Henry/CoEvoSkills.git /tmp/CoEvoSkills
mkdir -p .claude/skills
cp -r /tmp/CoEvoSkills/artifacts/skills/civ6-adjacency-optimizer/evo-civ6-adjacency .claude/skills/evo-civ6-adjacency
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Evo Civ6 Adjacency in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Evo Civ6 Adjacency on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Evo Civ6 Adjacency is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Civ6 District Adjacency Bonus Optimizer

Overview

Solves Civilization 6 district placement optimization problems. Given a map file and scenario parameters, finds optimal city center and district placements to maximize total adjacency bonuses.

Quick Start

python
import sys
sys.path.insert(0, '/app/environment/skills/evo-civ6-adjacency/scripts')
from main import solve_scenario, validate_output

# Caller must supply runtime paths from the task instruction
scenario_path = '/data/scenario_3/scenario.json'  # adapt per task
output_path = '/output/scenario_3.json'            # adapt per task

solve_scenario(scenario_path, output_path)
validate_output(output_path, scenario_path)

Architecture

Scripts

  • hex_utils.py: Hex grid math (odd-r offset neighbors, cube distance)
  • map_reader.py: SQLite reader for .Civ6Map files, terrain/feature/river helpers, runtime resource classification (strategic/luxury/bonus derived from name patterns)
  • placement.py: District placement validation; build_district_categories() derives specialty/non-specialty/no-bonus sets from the public Gathering Storm ruleset
  • adjacency.py: Per-district adjacency bonus calculation with flooring rules
  • optimizer.py: Greedy optimizer that scores candidate placements; derives district priorities and search breadth from categories and map size at runtime
  • main.py: End-to-end entry point (requires scenario_path and output_path arguments)
  • validator.py: Solution validation

Key Design Decisions

  1. Odd-r offset coordinates: Even rows use different neighbor offsets than odd rows
  2. River detection: Must check both own flags AND complementary neighbor flags
  3. Feature destruction: Placing districts (except CC) destroys forests/jungles/marshes
  4. Minor bonus flooring: Each source type floored independently
  5. Non-specialty districts are powerful: Aqueduct/Dam/Neighborhood boost neighbors for free
  6. Runtime resource classification: Resources classified as strategic/luxury/bonus from name patterns at runtime rather than hardcoded lists
  7. Runtime-derived priorities: District search priorities derived from categories; search breadth scales with map size
  8. Greedy search: Iteratively adds best (district, position) pair; supports multiple neighborhoods via indexed keys

Adjacency Rules Summary

DistrictMajor BonusesMinor Bonuses
Campus+2 geothermal/reef, +1 mountain+1 per 2 jungles, +1 per 2 districts
Holy Site+1 mountain+1 per 2 forests, +1 per 2 districts
Commercial Hub+2 river (self-tile), +2 harbor+1 per 2 districts
Industrial Zone+2 aqueduct/dam/canal+1 per 2 districts
Harbor+2 city center+1 per 2 districts
Theater Square+2 entertainment complex+1 per 2 districts

Optimization Notes

The greedy optimizer may miss globally optimal solutions when early placements prevent better late placements. For best results, the caller should also try multiple district priority orderings via the spec_priority and nonspec_priority parameters of greedy_optimize().

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Evo Civ6 Adjacency AI skill do?

Optimize Civ6 district placement for maximum adjacency bonuses. Use when given a .Civ6Map file and scenario parameters (num_cities, population, civilization). Reads map as SQLite, computes hex grid neighbors, validates placement rules, calculates adjacency bonuses per district type, and uses greedy optimization to find best layout.

Why use Evo Civ6 Adjacency on TypingMind?

Because you install it once and use it with any model. Evo Civ6 Adjacency is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Evo Civ6 Adjacency in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Zhang-Henry/CoEvoSkills/tree/main/artifacts/skills/civ6-adjacency-optimizer/evo-civ6-adjacency. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Evo Civ6 Adjacency?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Evo Civ6 Adjacency?

As many as you like. As long as a model supports skills, you can use Evo Civ6 Adjacency with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Evo Civ6 Adjacency AI skill free?

Yes. It is published on GitHub by Zhang-Henry under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇