/aaif-events:aaif-create-chapterfrom AAIF Community Events Toolkit
Creates a new AAIF city chapter by cloning the TemplateCity folder in Google Drive and rebranding all assets. Replaces city name tokens (San Francisco/SF) while preserving event-specific template content.
Ships in AAIF Community Events Toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Paths in this skill are relative to this skill directory. Resolve <skill-root>
from the loaded SKILL.md; it is a placeholder, not an environment variable.
Tooling rule —
gws+ Python only. Every read, edit, and write of a Drive file goes through thegwsCLI, driven from Python. Prefer native Google formats: editapplication/vnd.google-apps.*files with the Docs/Sheets/ Slides API. Drop to byte-level OOXML surgery on the.docx/.pptx/.xlsxzip parts (embedded fonts and untouched parts survive) only when the file genuinely is a stored Office file. Never use LibreOffice /soffice— not to edit, not to convert, and not to render a "just checking it locally" preview: it substitutes local system fonts for the brand fonts and drops OOXML it doesn't understand, so its output and its renders both misrepresent the real file. Same forunoconvand any desktop office suite. To see a file, render it through the API instead — a slide viaaaif_events.slides_export.render_slide_png, a doc viagws drive files copyto a Google Doc →gws drive files exportto PDF → trash the copy. Never round-trip a native Doc through.docx— it strips native features like Tabs.
Spin up a new AAIF city "chapter" by cloning the TemplateCity folder in the
Chapters Google Drive and rebranding every Office file from San Francisco to
the new city. Each chapter folder is the standard template: Event Tracker.docx,
Attendee CRM.xlsx, and the Event Template/ + Banners (...)/ subfolders of .pptx
design assets. (The old SKILLS.md.docx of paste-into-Claude prompts is retired —
those prompts now live as the aaif-* content skills in this repo.)
Prereq: the gws CLI must be installed and authenticated (aaif-check-setup
confirms it). All Drive calls go through it.
The rebrand swaps two tokens and leaves everything else alone. Event-specific
content — dates ("JUNE 24"), speakers ("Maya Chen"), venue, agenda, the SoMa /
"SOUTH OF MARKET" neighbourhood placeholder — is template content that
organizers fill per-event later using the aaif-* content skills in this repo. Do
not touch it.
| Token in template | Becomes | Notes |
|---|---|---|
San Francisco / SAN FRANCISCO | new city, case-matched | contiguous in the clean template |
SF abbreviation (AAIF · SF, SF CHAPTER, About the AAIF SF Chapter, AAIF SF — Attendee CRM, doc metadata) | full city name | UPPER in all-caps contexts, Title case in prose |
aaif-sanfrancisco / AAIF-SANFRANCISCO (Luma slug, incl. hyperlink targets) | aaif-<slug> / AAIF-<SLUG> | see Luma slug rules below |
File/folder names carrying any of the above (e.g. San Francisco CRM.xlsx) | renamed with the same transform | not just file contents; unit-tested |
Beyond text, the script also repositions the green "you-are-here" dot and its
<CITY> · TONIGHT label on slide 5 ("THE NETWORK") of Event Template/Slides.pptx
to the new city's real place on the world map. Previously only the label text was
rebranded and the dot stayed parked at San Francisco — this closes that gap. The
city's coordinates come from --lat/--lon if given, otherwise from geocoding the
city name (Nominatim, keyless). If neither resolves (offline, or a fictional name),
the dot is left at San Francisco with a clear warning — chapter creation never
fails over the dot. See Map dot coordinates below.
New York → newyork,
Mexico City → mexicocity, Montréal → montreal.aaif-colorado, not
aaif-denver. Always confirm the live page; pass --slug to override.https://luma.com/aaif-<slug> and
https://lu.ma/aaif-<slug>. The design files display the brand form
LU.MA / AAIF-<SLUG>; keep that — only the slug changes.The slide-5 network-map dot is placed from the city's latitude/longitude:
--city name via Nominatim (keyless, no
key/setup). The dry run prints the resolved Coords: line so you can sanity-check
it before creating anything.--lat <deg> --lon <deg> (both required together) to skip
geocoding — useful when a city name is ambiguous or geocodes to the wrong place.--lat/--lon).The projection is calibrated to the current image18.png world map: it is a
Gall Stereographic projection, fitted against Natural Earth coastlines to
sub-pixel accuracy (mean residual 0.64 px), so no per-city overrides exist any
more — every city is geocoded or given --lat/--lon. If the template's map
image ever changes it must be refitted: references/engine-internals.md. To
repair dots on decks that already exist, references/deck-backfills.md.
gws CLI installed and authenticated (aaif-check-setup confirms it).
All Drive calls go through it.create_chapter.py imports lib/aaif_events.Run these in order. Nothing is created without --write.
bash python3 <skill-root>/scripts/create_chapter.py --city "New York"
The slug must match ^[a-z0-9-]+$; anything else aborts before the
luma.com URL is built. (--dry-run is accepted as a no-op alias.)
- Aborts with "already exists" → stop. The chapter is already there.
(To fill in a partially-built one, go to step 4.)
- Luma NOT LIVE → tell the user the page needs creating at
luma.com/aaif-<slug>, or that the slug differs — re-run with --slug.
- Check the printed Coords: line. Wrong city? Re-run with --lat/--lon.<City> folder under Chapters,
then downloads, rebrands and re-uploads each .pptx/.docx/.xlsx in
place, and moves the slide-5 map dot.
bash python3 <skill-root>/scripts/create_chapter.py --city "New York" --write aaif-sync-chapters writes its feed row — that engine
also enforces the 100-chapter cap, which create_chapter only warns about.--resumeA run that dies midway (a gws 403, template drift, network loss) leaves a
half-created folder, and a plain re-run aborts on the name collision. Don't
trash the folder.
create_chapter.py --city "New York" --write --resume — enters the
existing folder and clones/rebrands only what is missing. Resuming a
fully-cloned chapter is a no-op. This is also the backfill path for a
chapter missing part of the template (Luxembourg's 6 design assets were
never cloned). Existing children are matched by their rebranded or
original template name, so a survivor still under its original name is
renamed in place (logged ~ old -> new) and treated as present, never
re-cloned as a duplicate.!! residual in existing file lines. The run exits 2
with "N existing file(s) still carry source tokens". Files already in Drive
are never modified on faith.--write --resume --repair-existing.*CRM.xlsx or *Tracker.docx is fixed
by hand in Drive. Those hold member data and are never rewritten, even
under --repair-existing.A present file whose content is corrupt but token-clean is still skipped, not repaired — the residual check reads tokens, not validity.
A residual in a freshly cloned file is a different failure (exit 1): the
template or the rebrand engine is broken. Fix that — don't resume.
!! residual flags.Event Template/Slides.pptx has the green dot
on the right city. The Slides.pptx line shows +map dot when it moved.
To check against a render:
bash PYTHONPATH=<skill-root>/../../lib python3 -c " from aaif_events.slides_export import render_slide_png render_slide_png('<Slides.pptx file id>', '$(mktemp -d)/slide5.png', slide_index=4) " Rendered Web Banner.png (or Web Banner.png already current. on a --resume). If it warned instead, the banner still says
the template city: run the command it names. If it said "not rendered:
fresh files still carry source tokens", fix the template first (above).bash python3 <skill-root>/scripts/test_create_chapter.py --lat/--lon. There is
no per-city override table any more, so the four former override cities
(Seoul, Sydney, Melbourne, Shanghai) hit the geocoder like everyone else.--lat/--lon.upload_agents.py's job — see
references/design-system-sweep.md.Web Banner.png is rendered, not cloned. The city is drawn into the
image, so no text rebrand reaches it, and until 2026-11 every chapter cloned
from TemplateCity kept its "San Francisco" banner. render_web_banner.py
renders it from the fourth slide of the chapter's own
Banners (…)/Square Logo.pptx through Google's renderer.
create_chapter calls it once no freshly cloned file carries source
tokens. Exit 2 if the banner failed, the same code as dirty existing files
under --resume; a dirty existing Square Logo.pptx is not rendered at all
until --repair-existing fixes it. rename_chapter calls it only after
the rename verifies (exit 1 if it failed).--chapter, and never
adds a banner to a folder that has none. --chapter X --create does, which
is what create_chapter prints when its render failed before the file
existed.2 report-only with banners to render, 1 any failure, 0
otherwise (folders with no banner are listed, not failed).python3 <skill-root>/scripts/render_web_banner.py # report
python3 <skill-root>/scripts/render_web_banner.py --write
python3 <skill-root>/scripts/render_web_banner.py --chapter <City> --create --write
create_chapter writes no Chapters List row, so its 100-chapter cap check
is an early warning, not a guarantee: three runs at 99 live chapters each read
99, each pass, and the next sync refuses all three rows together.San Francisco contiguous (no run or
paragraph splits) and the slug normalized to aaif-sanfrancisco.create_chapter.GREEN is --spec-3
(14B8B0); ooxml_style maps the legacy 14964A onto it and MARKER_FILLS
still recognises the old value so an unswept deck stays findable. Keep the
three in step.references/rename-chapter.md.| Read this | When |
|---|---|
references/rename-chapter.md | Renaming an existing chapter, or repairing a half-finished rename. |
references/deck-backfills.md | Sweeping the existing estate: map dots after a refit, the host footer after a design change, the projects roster when AAIF takes on a project. |
references/design-system-sweep.md | Auditing or fixing estate styling, contrast, background plates, or agent art. |
references/engine-internals.md | Before editing the rebrand engine or the projection, or when the template's map image changes and needs a refit. |
references/deck-backfills.md (opens in a new tab)references/design-system-sweep.md (opens in a new tab)references/engine-internals.md (opens in a new tab)references/rename-chapter.md (opens in a new tab)scripts/backfill_host_footer.py (opens in a new tab)scripts/backfill_map_dots.py (opens in a new tab)scripts/backfill_projects.py (opens in a new tab)scripts/create_chapter.py (opens in a new tab)scripts/deck_estate.py (opens in a new tab)scripts/rename_chapter.py (opens in a new tab)scripts/render_web_banner.py (opens in a new tab)scripts/restyle_design_system.py (opens in a new tab)scripts/test_backfill_host_footer.py (opens in a new tab)scripts/test_backfill_map_dots.py (opens in a new tab)scripts/test_backfill_projects.py (opens in a new tab)scripts/test_create_chapter.py (opens in a new tab)scripts/test_deck_estate.py (opens in a new tab)scripts/test_rename_chapter.py (opens in a new tab)scripts/test_render_web_banner.py (opens in a new tab)scripts/test_restyle_design_system.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
24 skills in this plugin
/aaif-announcement-postWrite the LinkedIn launch/announcement post for an AAIF event when RSVPs open. Use when asked to draft the announcement, launch post, or "RSVPs are open" post for an AAIF event./aaif-attendee-reminderWrite the pre-event reminder to people who RSVP'd to an AAIF event (sent ~1 week out and the morning of). Use when asked to draft the attendee reminder / "see you tomorrow" note for an AAIF event./aaif-audit-slackAudit the community Slack workspace and report it as one HTML page — whether every chapter has its public and organizer channels and the right people in them, which subject-matter rooms have gone quiet or overlap, and what the headline member count is actually made of. Use when asked about Slack coverage for chapters, whether organizers are in their channels, who is in an -organizers channel, workspace health, channel clutter, inactive channels or accounts, or the newcomer experience./aaif-backupTake a versioned local backup of critical AAIF ops data — the Community Intake Ops sheet by default, or any Drive file / local file you name. Snapshots are immutable and timestamped so you keep a full history. Use when asked to back up / snapshot the intake data (or another file) before a risky edit./aaif-carousel-copyWrite copy for a 6-slide LinkedIn carousel announcing an AAIF event. Use when asked to draft carousel slides/copy for an AAIF event (built from the LinkedIn Carousel template)./aaif-check-setupCheck that this computer is ready to run the AAIF toolkit — Python, the full plugin install, the gws Google Workspace tool and its Google sign-in, edit access to the Community Intake sheet, the Slack token, the Luma key, and Chrome for PDF reports — and explain in plain language how to fix anything missing. Read-only. Use when asked to check my setup, test whether the toolkit works, after installing it on a new computer, or when another AAIF skill fails because a tool, sign-in, token or key is missing.npx claudepluginhub aaif/community-events --plugin aaif-eventsOther plugins' skills for the same job