historical-timeline/SKILL.md
Generate interactive historical timelines as standalone HTML files using TimelineJS3. Supports BCE/CE dates, eras, media, groups, and rich text. Use when the user asks to create, build, or visualize a timeline of historical events, periods, dynasties, or biographical milestones.
npx skillsauth add kltng/humanities-skills historical-timelineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate interactive historical timelines as self-contained HTML files powered by TimelineJS3.
{"year": -551, "month": 9, "day": 28}
This renders as "551 BCE". No special syntax — just negative integers.
scale property matters for ancient datesFor timelines spanning thousands of years or BCE dates, set "scale": "human" (the default). Use "scale": "cosmological" only for astronomical/geological timescales.
The Python script generates a complete HTML file that loads TimelineJS3 from CDN. No server, no build step — just open in a browser. The JSON data is embedded inline.
start_dateThe title object is a special slide that appears first. It does not use start_date. Only events entries require dates.
display_date overrides rendered datesIf the default date rendering is wrong (e.g., you want "Spring 221 BCE" instead of "221 BCE"), set display_date on the date object or the slide:
{
"start_date": {"year": -221},
"display_date": "Spring 221 BCE",
"text": {"headline": "Qin Unification"}
}
Events with the same group string are clustered in adjacent rows on the timeline nav, making it easy to show parallel threads (e.g., "Politics", "Culture", "Military").
Eras are colored bands behind the timeline that label periods (e.g., "Han Dynasty", "Tang Dynasty"). They require both start_date and end_date.
Build a TimelineJS3 JSON object with events. The Python script provides a builder API:
from scripts.timeline_builder import TimelineBuilder
tl = TimelineBuilder(title="The Tang Dynasty", subtitle="618–907 CE")
# Add eras (colored background spans)
tl.add_era(-221, 220, "Imperial China Begins", end_month=12)
tl.add_era(618, 907, "Tang Dynasty", color="#2a9d8f")
# Add events
tl.add_event(
start_year=618, start_month=6, start_day=18,
headline="Li Yuan founds Tang",
body="<p>After the collapse of the Sui dynasty...</p>",
group="Politics",
)
tl.add_event(
start_year=701, end_year=762,
headline="Li Bai (李白)",
body="<p>One of the greatest Chinese poets.</p>",
group="Culture",
media_url="https://upload.wikimedia.org/wikipedia/commons/4/4e/Li_Bai.jpg",
media_caption="Li Bai, the Immortal Poet",
)
tl.add_event(
start_year=-551, start_month=9, start_day=28,
end_year=-479,
headline="Confucius (孔子)",
body="<p>Philosopher whose teachings shaped Chinese civilization.</p>",
display_date="551–479 BCE",
)
# Save as standalone HTML
tl.save_html("tang_dynasty.html")
# Or get raw JSON for custom use
import json
print(json.dumps(tl.to_dict(), indent=2, ensure_ascii=False))
open tang_dynasty.html # macOS
xdg-open tang_dynasty.html # Linux
start tang_dynasty.html # Windows
The timeline is fully interactive: click events, scroll through time, zoom in/out.
Pass options to save_html():
tl.save_html(
"timeline.html",
font="Georgia-Helvetica", # Built-in font pair
initial_zoom=2, # Starting zoom level
timenav_position="bottom", # Nav bar position
hash_bookmark=True, # URL updates with slide
start_at_end=True, # Start at last event
default_bg_color="#1a1a2e", # Dark background
language="zh-cn", # Chinese interface
)
{
"title": {
"text": {"headline": "Timeline Title", "text": "<p>Subtitle or description</p>"},
"media": {"url": "https://example.com/image.jpg", "caption": "Credit"}
},
"events": [
{
"start_date": {"year": 618, "month": 6, "day": 18},
"end_date": {"year": 907},
"text": {"headline": "Event Title", "text": "<p>Details in HTML</p>"},
"media": {"url": "...", "caption": "...", "credit": "..."},
"group": "Category",
"display_date": "Custom date text",
"background": {"color": "#2a9d8f"},
"unique_id": "event-001"
}
],
"eras": [
{
"start_date": {"year": 618},
"end_date": {"year": 907},
"text": {"headline": "Tang Dynasty"}
}
],
"scale": "human"
}
| Field | Required | Type | Notes |
|-------|----------|------|-------|
| year | Yes | int | Negative for BCE (e.g., -551) |
| month | No | int | 1–12 |
| day | No | int | 1–31 |
| hour | No | int | 0–23 |
| minute | No | int | 0–59 |
| second | No | int | 0–59 |
| display_date | No | string | Overrides default rendering |
TimelineJS3 auto-detects media type from URL:
default, Bitter-Raleway, Dancing-Ledger, Georgia-Helvetica, Lustria-Lato, Medula-Lato, Old-Standard, Playfair-Faunaone, PT, Roboto-Megrim, Ubuntu, UnicaOne-Vollkorn
cdn.knightlab.com — no rate limiting for the CDN itselfreferences/timelinejs_reference.md — Complete TimelineJS3 JSON format, options, and media type documentationscripts/timeline_builder.py — Python builder for generating timeline JSON and standalone HTML filesdevelopment
Query the China Biographical Database (CBDB) locally via SQLite for biographical data on 656K+ historical Chinese figures from the 7th century BCE through the 19th century CE. Use when searching for Chinese historical figures, scholars, officials, or literary figures — their biographical details, family/kinship networks, official postings, social associations, examination records, or addresses. Runs entirely locally after initial database download (~556 MB). Faster and more flexible than the API version.
development
Interact with a local Zotero 8 desktop application through its HTTP API at localhost:23119. Use this skill whenever the user wants to search, fetch, add, edit, or organize bibliographic items in their Zotero library, import citations (BibTeX, RIS, etc.), attach files, manage collections and tags, or retrieve full-text content from Zotero. Triggers on mentions of Zotero, citation management, reference libraries, bibliographic databases, or local library management. Also use when chaining with other catalog skills (Harvard, LOC, HathiTrust, etc.) to save found records into the user's Zotero library.
development
Search for items and properties on Wikidata and retrieve entity details, claims, and external identifiers. Supports both keyword search (Wikidata Action API) and semantic/hybrid search (Wikidata Vector Database), plus direct entity retrieval (Special:EntityData) and structured querying (WDQS SPARQL).
testing
Query and explore the TGAZ (Temporal Gazetteer) SQLite database of 82,000+ historical Chinese placenames spanning 763 BCE to 1911 CE. Use this skill whenever the user asks about historical Chinese places, administrative geography, dynastic jurisdictions, place name evolution, or wants to query tgaz.db. Also trigger when the user mentions CHGIS, TGAZ, historical gazetteer, Chinese historical GIS, or asks questions like "what was X called in dynasty Y", "what counties existed in year Z", "where was X located", or any spatial/temporal query about Chinese historical geography. This skill is relevant even for casual questions like "tell me about ancient Chang'an" or "Tang dynasty cities near the Yellow River".