There are no right or wrong scores.This helps me teach to the people in this room.
Self-check · rate each from 0 to 6
How well can you explain…
Total 0 / 42
0 · cannot3 · part of it6 · clearly
The difference between a chat assistant (ChatGPT, Claude) and a coding agent (Codex, Claude Code)
What the Model Context Protocol (MCP) is
How a large language model (LLM) produces an answer
Why an LLM can give a wrong answer that sounds confident
What "context" means, and why a long chat can lose track of earlier details
How tools, web search, or skills change what an LLM can do
What happens to your data when you upload it to one of these tools
Self-check · highest possible score: 42
Add up your score
Total 0 / 42
A0–10
B11–21
C22–32
D33–42
Raise your hand when I call your range.
Then: who uses AI every week, or every day?
Saturday, November 7 · Luce Hall 203
Today
9:00
Self-check
9:05
Claude Desktop, and a laptop check
9:22
Review: inside the model (Teaching Lab)
9:44
Agents and skills
10:06
Find, save, cite
10:35
Can you trust it?
10:50
Git and GitHub: your own webpage
11:30
Lunch
1:00
《明光宗實錄》: from scanned pages to a database
3:00
Office hour (optional)
No break this morning.Get up for coffee whenever you need it.
Before Part 1 · Claude Desktop · 1 of 3
Start a session in Code mode
YOUR TURN
Click </> at the top of the sidebar (Code)
Choose environment → Local: This computer
Bottom row: click the folder → choose Documents › Claude › Projects
LOCAL OR CLOUD?Local: your computer, your files. Cloud: Anthropic’s computers, on a GitHub repository. It keeps going when you close the app. Today: Local.
Before Part 1 · Claude Desktop · 2 of 3
Model, effort, permissions
YOUR TURN
Click the model name in the bottom row. Effort: higher is more thorough, but slower, and uses your limits faster.
Today: Opus 5.5 · Medium · Auto
Next to the model: the permission mode. Auto: Claude decides what is safe. Plan: it changes nothing.
The small circle at the end of the row: how much of your plan you have used.
Before Part 1 · Claude Desktop · 3 of 3
Inside a session
YOUR TURN
TOP RIGHT OF THE WINDOW
Icon
Pane
Mac
Use it to
>_
Terminal
⌘J
type commands yourself
globe
Browser
⇧⌘B
open web pages the agent can see
folder
Files
see and open the files in your folder
Windows: hover over an icon to see its shortcut. Files shows only after you choose a folder.
TRY IT NOWOpen all three. Leave the Terminal open: we use it next.
Before Part 1 · laptop check · Mac and Windows
Check Git and GitHub
YOUR TURN
Mac only: Apple menu → About This Mac. macOS 26.1? Update now.
In Claude Desktop’s Terminal pane, run:
TERMINAL · MAC AND WINDOWS
git --version
gh --version
gh auth status
✓ TWO VERSION NUMBERS, AND “LOGGED IN TO GITHUB.COM”You are ready. Help your neighbor.
■ “NOT LOGGED IN”Fine for now. We log in together at 10:50.
✕ GIT OR GH IS MISSINGMac: a window asks to install developer tools → click Install. If it fails, or Windows says “not recognized”: next slide.
Before Part 1 · laptop check · only if something is missing
Fix it: Mac Plan B, or Windows
YOUR TURN
MAC · NO XCODE, NO HOMEBREW NEEDED
1 · INSTALL PIXI
curl -fsSL https://pixi.sh/install.sh | bash
2 · QUIT CLAUDE (⌘Q), OPEN IT AGAIN, THEN
pixi global install git gh
Works on macOS 11 (Big Sur) or newer, Intel and Apple Silicon.
SKILL.md · DESCRIPTIONConvert between Chinese, Japanese, Korean, and Vietnamese lunisolar calendar dates and Gregorian/Julian dates. Use when the user needs to look up historical East Asian dates, convert era names (年號) like 康熙, 天保, 崇禎 to Western dates, compute sexagenary cycle (干支) day/month/year, or work with Julian Day Numbers.
It is plain English.
Summing up · The words we used
Prompt, tool, MCP, skill, plugin
Word
What it is
Example
Prompt
Your words in this chat
"Convert this date"
Tool
One action the agent can take
Look up one date
MCP
A standard way to connect tools (Model Context Protocol)
The Teaching Lab's calendar tool
Skill
Instructions + code + references, loaded only when needed
cjk-calendar
Plugin
A program that adds features to another app
CNE in Zotero
A skill teaches the agent a method, not only an action.
Summing up · Before you upload anything
Where does your text go?
Local
Cloud app
Application Programming Interface (API)
Examples today
the Teaching Lab model (LFM3), cjk-calendar, cbdb-local
claude.ai, ChatGPT, Claude Desktop
the Teaching Lab’s calendar tool, cbdb-api, CHGIS, library catalogs
It runs on
your laptop
the company’s computers
a third party’s server
What leaves your laptop
nothing
your prompts and files
each request your tool sends
Who sets the rules
you
your plan’s terms
the provider’s terms
Good for
private or unpublished sources
the strongest models
data you do not own: CBDB, CHGIS, catalogs
EASY TO MISSClaude Desktop’s “This computer” means the agent works on your files here. The model still runs in the cloud. What Claude reads is sent to Anthropic.
Ask two questions every time:Which computer runs this? What text leaves my laptop?
Summing up · Three ways to tell a computer what to do
Mouse, command, sentence
PastGUI · the mouse
You point and click. You can only do what the buttons allow.
File → Export → CSV
PastCLI · commands
You type exact commands, or write code. Powerful, but you must learn the language first.
sqlite3 cbdb.db "SELECT … WHERE c_name_chn='王華'"
NowNatural language
You say what you want. The agent writes and runs the commands.
Find every 王華 in CBDB who lived in the Ming.
When the interface is a sentence, everyone can build their own tools.Your expertise decides what to ask for, and how to check the result.
Summing up · Other people’s digital tools → your own
From using tools to building them
BeforeLearn other people’s tools
Learn each tool’s buttons and its query language
Work the way the tool was built
Wait for someone else to add what you need
→
NowBuild your own
Describe the tool you need, in a sentence
The agent writes the code. You check the result.
Keep it, change it, share it on GitHub
Today: use Zotero and CNE well (next) → your own webpage (before lunch) → your own pipeline for one juan (afternoon) → your own skill (office hour).
Part 3 · Find, save, cite
From a catalog to a correct citation
WATCH
One chain, four tools. The last step gives a citation with the original script, the romanization, and a translation.
Part 3 · Find, save, cite
Connect Claude to CNE
In Zotero: Settings → CNE → Agent access. Turn it on.
Click Copy connection.
Paste it into Claude with:
PASTE INTO CLAUDE · CODE TAB
This is the connection to the CNE plugin in my Zotero. Add the romanized title, the original-script title, and an English translation to the item I just saved. Show me the citation in Chicago 18th CNE before you save.
KEEP IT PRIVATEThe connection holds a private key (a token). Paste it only into your own Claude.
The agent proposes.You check, then it saves.
Part 3 · Find, save, cite · 20 minutes
Your turn
YOUR TURN
Use one book or article you cite often.
Find it in a catalog
Save it to Zotero
Get a Chicago 18th CNE citation
LOOK FOR
Is the romanization right?
Is the translated title right?
Would you put it in your dissertation as it is?
START HERE · CLAUDE CODE TAB
Search the Yale library catalog for the exact title [title], as a phrase. Show me the best match and its call number. Ask me before you save it to Zotero.
Part 4 · Can you trust it?
Same name, different people
YOUR TURN
PASTE INTO CLAUDE · CODE TAB
Use cbdb-api to find 王華, the father of 王守仁. How many people named 王華 did the search return? Which one is the father, and how do you know?
LOOK FOR
How many came back? CBDB has 15. Why the gap?
How did the agent choose one?
Would you have chosen the same one?
IN CBDB15 people named 王華. 8 of them lived in the Ming.
USE CBDB A LOT? USE CBDB-LOCALcbdb-local keeps the whole CBDB on your laptop: one download of about 560 MB. It finds all 15 people, and it is faster. /plugin install cbdb-local@humanities-skills
The agent can be wrongeven when the database is right.
Part 4 · Can you trust it?
Three questions for any AI result
1 · Where did it come from?A database, a tool, or the model's memory?
2 · Can I check it?Is there an ID, a source, or a page number?
3 · Who decided?The agent, or me?
We use these three questions all afternoon.
Part 5 · Git and GitHub
Why Git?
Before lunch, you put your own page on the web. This afternoon, Git keeps a copy of every step.
✓ ALL FOUR WORKEDAnd the email ends in @users.noreply.github.com? Help your neighbor.
■ SOMETHING FAILEDRaise your hand. We fix it now.
Name or email wrong? On github.com/settings/emails, tick Keep my email addresses private, and copy the address that ends in @users.noreply.github.com. Then run:
git config --global user.name "Your Name"
git config --global user.email "12345678+your-username@users.noreply.github.com"
# not logged in?gh auth login # GitHub.com → HTTPS → Login with a web browser
Part 5 · Git and GitHub · GitHub Pages
Put your own page on the web
YOUR TURN
PASTE INTO CLAUDE · CODE · PROJECTS FOLDER
Make a folder called my-page with one simple web page, index.html, about my research. First ask me for my name, my field, and two or three sentences about my work. No email address. No outside libraries. Open the page in the browser so I can check it. When I say it is good: make it a Git repository, commit, create a public GitHub repository called my-page, push, and turn on GitHub Pages for the main branch. Then tell me the web address.
⟳ FIRST: NEW SESSIONClick + New, folder Projects. Claude makes Projects › my-page: one folder, one repository.
YOUR ADDRESS
https://your-username.github.io/my-page/
PUBLICAnyone can see this page. Put nothing private or unpublished on it.
✓ DONE WHENThe page opens on your phone. It can take 1–2 minutes.
Part 5 · Git and GitHub · the loop you use all afternoon
Change it, publish again
YOUR TURN
PASTE INTO CLAUDE · SAME SESSION
Add a section called “A source I work with”, with its title in Chinese and in English. Show me what changed. Then commit with a short note and push.
Reload the page on your phone.
Open github.com/your-username/my-page → Commits. Every version is there.
Change → commit → push.This afternoon you do this after every step.
STILL STUCK AT 11:30?Come to me at lunch.
Before lunch · One habit for the afternoon
Divide and conquer
One big taskScan → TEI in one prompt
The agent does everything at once
A misread character in step 1 is still there in step 8
You see only the end, not where it went wrong
→
Small tasks, checkedEight steps, a check after each
Split the big task into small tasks
Check each result before the next step
Fix a mistake where it starts, then commit
This is human-in-the-loop: the agent does each step, and you check and decide before it goes on. We do exactly this after lunch: eight steps, one juan.
光宗實錄
AI Workshop for Sinitic Studies · Afternoon
From printed materials to a database
Agentic workflow in practice, with 《明光宗實錄》
1:00–3:00
Office hour 3:00–4:00
KL
Kwok-leong TangDigital China Initiative, Harvard University
Afternoon · the source
《明光宗實錄》, juan 2
Academia Sinica edition, 1962.
Copied by hand, not printed
No punctuation
Dates use the reign year, the month, and the sexagenary day (干支)
Juan 2 is still 萬曆四十八年七月 (1620-08-19 to 08-27). From 八月, the year is 泰昌元年.
By 3:00: a TEI file of this juan.Every entry dated. People and places linked. Checked by you.
明光宗實錄 卷二, p. 0023 (1962 ed.) · for workshop use only
Afternoon · before step 1
Start the project, make a first commit
YOUR TURN
⟳ FIRST: NEW SESSIONClick + New, folder Projects.
PASTE INTO CLAUDE · CODE · PROJECTS FOLDER
Create a folder called guangzong-shilu, and make it a Git repository. Download https://kwokleongtang.net/workshops/2026_11_yale/guangzong_juan2_source.zip and unzip it into guangzong-shilu/source. Add a .gitignore that keeps source/ and all PDF files out of Git. Add a README that says we will turn one juan of the 明光宗實錄 into a TEI file. Use main as the branch name. Make the first commit. Then create a private GitHub repository for it and push.
⟳ THEN: NEW SESSIONClick + New, folder Projects › guangzong-shilu. We stay in this session all afternoon.
✓ DONE WHENYou see your private repository on github.com, without source/ and the PDF.
Read pages 1–3 of source/juan2.pdf. Transcribe them exactly, line by line, with no punctuation. Mark any character you are unsure of with [?]. Save the result as ocr.txt.
Then compare ocr.txt with source/database.txt, a text from a database.
LOOK FOR
How many characters were wrong?
Similar shapes, variant forms, or the handwriting?
Did the model add or change anything without saying so?
COMMITgit commit after each step.
Afternoon · steps 1–2 · more about OCR
Three ways to OCR
Vision LLM (VLM)
local-ocr skill
gaaucau Quick OCR
What it is
Claude reads the page image, as in step 1
Datalab’s open OCR models: Chandra, Surya, Indra
a Mac app: PaddleOCR-VL with layout detection
It runs on
the company’s computers
your laptop
your Mac (Apple Silicon)
How to start
a prompt
/plugin install local-ocr@humanities-skills
Mac App Store
Good for
hard pages; it says where it is unsure
many pages, private sources; ALTO, PAGE, TEI
a quick text, no setup
Watch for
it may “correct” the text without telling you
a 5 GB download for Chandra; Indra cannot read vertical text
Mac only; check the reading order
What vision models can do with hard books: two models read every page, and the edition shades where they disagree.kwokleongtang.net/collections/ocr/
Every OCR makes mistakes.Pick the tool for the page, then check it.
Afternoon · steps 1–2 · demo
Database or scan? You decide
WATCH
Agents compared all 30 pages with database.txt: 75 differences.
human-eval-review made one page: the scan, both readings, a choice.
I choose, and click Download Results. Claude reads my choices.
THE DATABASE IS WRONG HEREThe scan has 解. The database split it into 角□羊.
Ask Claude to mark where each entry starts. An entry starts with ○.
Use cjk-calendar to give each entry a Western date.
WATCH THE ERA CHANGEThe same year can be written as 萬曆四十八年 or 泰昌元年.
Check three dates by hand.Do they match?
PASTE INTO CLAUDE · CODE TAB
Split source/database.txt into entries, one per line, and save entries.txt. Give each entry a Western date with cjk-calendar, and save dated.csv with the original date text next to it.
Notes: cjk-calendar cannot read a 干支 day, so convert the month, then find the day whose 干支 matches. Write 萬曆, not 萬歷. An entry with no 干支 is on the same day as the entry before.
Make a human-eval-review page for the uncertain matches. Decide.
Who decided: the agent, or you?Your review file records the answer.
PASTE INTO CLAUDE · CODE TAB
Read the text of each entry in dated.csv and list every person and place. Look up people with cbdb-api, and places with chgis-tgaz for the year 1620.
cbdb-api gives only its best match, so check its dates and offices. When a match is uncertain, or there is more than one candidate, make a human-eval-review page so I can choose. Save my choices as decisions.json.