flag-assets
Skill3 starsChanged 2 months agoMITView on GitHub
Add or troubleshoot country flag and org image assets (Assets/Textures/Flags/Countries and Orgs) sourced from Wikimedia Commons, including the download_flags.py/check_flags.py/svg_to_png.py scripts and CountryVisualConfig/OrgVisualConfig wiring. Load when adding a new country flag or org image.
In this repository45 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/issue-clarification-questions.mdcCursor rule
- .cursor/rules/reset-font-assets.mdcCursor rule
- .cursor/rules/src-dotnet-build-release.mdcCursor rule
- .cursor/rules/unity-plugins-before-work.mdcCursor rule
- codex-issueSkill
- commitSkill
- complete-prdSkill
- dependency-docsSkill
- dotnet-buildSkill
- dotnet-testSkill
- generate-imageSkill
- implementSkill
- meeting-joinSkill
- meeting-scheduleSkill
- meeting-startSkill
- plan-reviewSkill
- planSkill
- prSkill
- specifySkill
- unity-e2e-runSkill
- unity-pluginsSkill
- add-terminal-commandSkill
- dependency-docsSkill
- dotnet-benchmarkSkill
- dotnet-buildSkill
- dotnet-testSkill
- end-game-score-calibrationSkill
- github-issue-automationSkill
- image-generationSkill
- localizationSkill
- meeting-joinSkill
- meeting-scheduleSkill
- meeting-startSkill
- milestone-completeSkill
- province-config-generatorSkill
- unity-e2e-runSkill
- unity-pluginsSkill
- unity-prefabsSkill
- unity-scenesSkill
- update-branchSkill
- cursor-meeting-joinSkill
- cursor-meeting-startSkill
- unity-pluginsSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
All scripts live in scripts/utils/ and must be run from the project root so relative paths resolve correctly.
- Very specific: line 32
Add an entry to COUNTRY_FLAGS in scripts/utils/download_flags.py:
- Very specific: line 36
If the filename is uncertain, also add a fallback to COUNTRY_FLAGS_FALLBACK:
- Distinctive: line 41
If the filename is uncertain, verify it resolves before downloading:
- Distinctive: line 58
Import the PNG as a Sprite in Unity via MCP:
- Very specific: line 76
Commit: git add Assets/Textures/Flags/ and commit with the assets.
- Very specific: line 91
After downloading, follow the same Unity steps (6–8 above) but target Textures/Flags/Orgs/<orgId>.png and …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Flag and Org Image Assets
Flag PNGs live in Assets/Textures/Flags/Countries/<countryId>.png and org images in Assets/Textures/Flags/Orgs/<orgId>.png. All assets are sourced from Wikimedia Commons and downloaded as server-side PNG renders — no local SVG rendering required for download.
Scripts
All scripts live in scripts/utils/ and must be run from the project root so relative paths resolve correctly.
| Script | Purpose |
download_flags.py | Download all mapped flags/org images; skips existing files |
check_flags.py | Diagnose a Wikimedia filename — prints resolved URL and MIME type |
svg_to_png.py | Convert any SVG (file path or URL) to PNG locally |
Dependencies
.venv\Scripts\pip.exe install requests svglib reportlabsvg_to_png.py also supports cairosvg (better quality) if the Cairo C library is available, but falls back to svglib+reportlab automatically.
Adding a new country flag
- Find the era-accurate flag on Wikimedia Commons (
commons.wikimedia.org/wiki/File:…). Copy the full page title includingFile:. - Add an entry to
COUNTRY_FLAGSinscripts/utils/download_flags.py:
If the filename is uncertain, also add a fallback to"NewCountryId": "File:Flag_of_New_Country_(1850).svg",COUNTRY_FLAGS_FALLBACK:"NewCountryId": "File:Alternative_Flag_Name.svg", - If the filename is uncertain, verify it resolves before downloading:
A.venv\Scripts\python.exe scripts\utils\check_flags.py "File:Flag_of_New_Country_(1850).svg"NOT FOUNDresult means the filename is wrong — search Wikimedia Commons and try again. - Download (skips files that already exist):
Or force re-download of all files:.venv\Scripts\python.exe scripts\utils\download_flags.py.venv\Scripts\python.exe scripts\utils\download_flags.py --force - Confirm the script reports
Verified N/N files OK. - Import the PNG as a Sprite in Unity via MCP:
manage_texture(action="set_import_settings", path="Textures/Flags/Countries/<countryId>.png", as_sprite=true) - Get the asset GUID via MCP:
Note themanage_asset(action="get_info", path="Textures/Flags/Countries/<countryId>.png")guidfrom the result. - Find the index of the country in
CountryVisualConfig.asset(its position in theEntrieslist, 0-based) by reading the asset file, then assign the flag via MCP:manage_scriptable_object(action="modify", target={"path": "Assets/Configs/CountryVisualConfig.asset"}, patches=[{"path": "Entries.Array.data[<index>].flag", "value": {"guid": "<guid>"}}]) - Commit:
git add Assets/Textures/Flags/and commit with the assets.
Adding a new org image
Same process as a country flag, but add to ORG_FLAGS instead:
ORG_FLAGS = {
"Illuminati": "File:Eye_of_Providence.svg",
"NewOrg": "File:Some_Symbol.svg",
}The output goes to Assets/Textures/Flags/Orgs/<orgId>.png.
After downloading, follow the same Unity steps (6–8 above) but target Textures/Flags/Orgs/<orgId>.png and Assets/Configs/OrgVisualConfig.asset with property path Entries.Array.data[<index>].flag.
Troubleshooting
WARN: could not resolve URL — the Wikimedia filename does not exist. Run check_flags.py with the exact filename to confirm, then find the correct title on Commons.
WARN: response is not a PNG — the URL resolved but Wikimedia returned something other than a PNG (rare; usually a temporary server error). Re-run with --force.
WARN: unexpected Content-Type — the file may be a raster PNG on Commons that doesn't go through the SVG render pipeline. In that case, find the direct PNG URL and download it manually via svg_to_png.py or requests.
Converting a standalone SVG to PNG
.venv\Scripts\python.exe scripts\utils\svg_to_png.py path\to\file.svg output.png --width 256
.venv\Scripts\python.exe scripts\utils\svg_to_png.py https://example.com/flag.svg output.pngDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

