Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Computational methods for humanities research including text mining and netwo...
.claude/skills/brycewang-stanford-digital-humanities-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 40% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 37% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 34% | 0% |
| case-04 | ✓→✓ | = Same ✓ | 42% | 0% |
A skill for applying computational and quantitative methods to humanities research. Covers text mining, network analysis, spatial humanities, and digital archival methods. Designed for researchers bridging traditional humanities with data-driven approaches.
pythonimport re from collections import Counter def prepare_corpus(texts: list[str], stopwords: set = None) -> list[list[str]]: """ Tokenize and clean a corpus of texts for analysis. Args: texts: List of raw text strings stopwords: Set of words to remove Returns: List of tokenized, cleaned documents """ if stopwords is None: stopwords = {'the', 'a', 'an', 'and', 'or', 'but', 'in', 'on', 'at', 'to', 'for', 'of', 'with', 'is', 'was', 'are'} processed = [] for text in texts: # Lowercase and remove punctuation tokens = re.findall(r'\b[a-z]+\b', text.lower()) # Remove stopwords and short tokens tokens = [t for t in tokens if t not in stopwords and len(t) > 2] processed.append(tokens) return processed def compute_tfidf(corpus: list[list[str]]) -> dict: """Compute TF-IDF scores for term importance analysis.""" import math n_docs = len(corpus) # Document frequency df = Counter() for doc in corpus: df.update(set(doc)) # TF-IDF per document tfidf_scores = [] for doc in corpus: tf = Counter(doc) total = len(doc) scores = {} for term, count in tf.items(): tf_val = count / total idf_val = math.log(n_docs / (1 + df[term])) scores[term] = tf_val * idf_val tfidf_scores.append(scores) return tfidf_scores
Apply Latent Dirichlet Allocation (LDA) to discover thematic structures in large text corpora:
pythonfrom gensim import corpora, models def run_topic_model(corpus: list[list[str]], n_topics: int = 10, passes: int = 15) -> models.LdaModel: """ Train an LDA topic model on a preprocessed corpus. """ dictionary = corpora.Dictionary(corpus) dictionary.filter_extremes(no_below=5, no_above=0.5) bow_corpus = [dictionary.doc2bow(doc) for doc in corpus] lda_model = models.LdaModel( bow_corpus, num_topics=n_topics, id2word=dictionary, passes=passes, random_state=42, alpha='auto', eta='auto' ) return lda_model # Print top words per topic # for idx, topic in lda_model.print_topics(-1): # print(f"Topic {idx}: {topic}")
pythonimport networkx as nx def build_correspondence_network(letters: list[dict]) -> nx.Graph: """ Build a social network from historical correspondence data. Args: letters: List of dicts with 'sender', 'recipient', 'date', 'location' """ G = nx.Graph() for letter in letters: sender = letter['sender'] recipient = letter['recipient'] if G.has_edge(sender, recipient): G[sender][recipient]['weight'] += 1 else: G.add_edge(sender, recipient, weight=1) # Compute centrality measures degree_cent = nx.degree_centrality(G) betweenness = nx.betweenness_centrality(G) for node in G.nodes(): G.nodes[node]['degree_centrality'] = degree_cent[node] G.nodes[node]['betweenness'] = betweenness[node] return G # Identify the most connected and most bridging figures # sorted(degree_cent.items(), key=lambda x: x[1], reverse=True)[:10]
Map historical events, literary settings, or cultural artifacts using GIS tools:
Georeferencing historical maps requires at least 4 ground control points with known coordinates, using polynomial or thin-plate spline transformation.
The Text Encoding Initiative (TEI) is the standard for scholarly digital editions:
xml<TEI xmlns="http://www.tei-c.org/ns/1.0"> <teiHeader> <fileDesc> <titleStmt> <title>Letters of [Historical Figure]</title> </titleStmt> </fileDesc> </teiHeader> <text> <body> <div type="letter" n="1"> <opener> <dateline><date when="1789-07-14">14 July 1789</date></dateline> <salute>Dear Friend,</salute> </opener> <p>The events of today have been most extraordinary...</p> </div> </body> </text> </TEI>
Digital humanities research must address: copyright and fair use for digitized materials, privacy concerns for living subjects in social network analysis, algorithmic bias in NLP tools trained on modern English when applied to historical texts, and the responsibility to make digital scholarship accessible beyond the academy.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 22,908 | 33,422 | +46% | 1 | 1 | 0% | 4,173 | 5,934 | +42% | 0 | 0 | — |
case-02 | fail→pass | 20,283 | 21,390 | +5% | 1 | 1 | 0% | 3,785 | 5,316 | +40% | 0 | 0 | — |
case-03 | pass→pass | 12,338 | 11,274 | -9% | 1 | 1 | 0% | 2,207 | 2,963 | +34% | 0 | 0 | — |
case-04 | pass→pass | 16,547 | 16,938 | +2% | 1 | 1 | 0% | 3,068 | 4,352 | +42% | 0 | 0 | — |
case-05 | pass→pass | 12,173 | 11,195 | -8% | 1 | 1 | 0% | 2,347 | 3,517 | +50% | 0 | 0 | — |
case-06 | pass→pass | 9,151 | 8,462 | -8% | 1 | 1 | 0% | 1,669 | 2,961 | +77% | 0 | 0 | — |
case-07 | fail→fail | 17,740 | 11,587 | -35% | 1 | 1 | 0% | 2,484 | 3,302 | +33% | 0 | 0 | — |
case-08 | pass→pass | 23,078 | 12,911 | -44% | 1 | 1 | 0% | 2,875 | 3,704 | +29% | 0 | 0 | — |
case-09 | pass→pass | 13,082 | 8,014 | -39% | 1 | 1 | 0% | 2,035 | 2,713 | +33% | 0 | 0 | — |
case-10 | pass→pass | 11,371 | 6,253 | -45% | 1 | 1 | 0% | 1,859 | 2,322 | +25% | 0 | 0 | — |
case-11 | fail→pass | 14,339 | 12,192 | -15% | 1 | 1 | 0% | 2,665 | 3,654 | +37% | 0 | 0 | — |
case-12 | pass→pass | 16,541 | 15,295 | -8% | 1 | 1 | 0% | 2,913 | 4,092 | +40% | 0 | 0 | — |
case-13 | fail→fail | 10,387 | 2,920 | -72% | 1 | 1 | 0% | 1,528 | 1,851 | +21% | 0 | 0 | — |
case-14 | pass→pass | 14,640 | 11,251 | -23% | 1 | 1 | 0% | 2,109 | 3,078 | +46% | 0 | 0 | — |
case-15 | pass→pass | 5,505 | 5,052 | -8% | 1 | 1 | 0% | 802 | 2,127 | +165% | 0 | 0 | — |
case-16 | pass→pass | 12,395 | 3,086 | -75% | 1 | 1 | 0% | 1,780 | 1,776 | -0% | 0 | 0 | — |
case-17 | fail→pass | 13,527 | 12,293 | -9% | 1 | 1 | 0% | 1,999 | 3,097 | +55% | 0 | 0 | — |
case-18 | pass→pass | 21,527 | 15,537 | -28% | 1 | 1 | 0% | 3,091 | 3,627 | +17% | 0 | 0 | — |
case-19 | pass→pass | 3,283 | 2,171 | -34% | 1 | 1 | 0% | 509 | 1,737 | +241% | 0 | 0 | — |
case-20 | pass→pass | 5,287 | 4,940 | -7% | 1 | 1 | 0% | 809 | 2,162 | +167% | 0 | 0 | — |
case-21 | pass→pass | 15,682 | 14,702 | -6% | 1 | 1 | 0% | 2,646 | 4,065 | +54% | 0 | 0 | — |
case-22 | pass→pass | 10,101 | 5,887 | -42% | 1 | 1 | 0% | 1,786 | 2,453 | +37% | 0 | 0 | — |
case-23 | pass→pass | 16,714 | 11,516 | -31% | 1 | 1 | 0% | 2,187 | 2,996 | +37% | 0 | 0 | — |
case-24 | pass→pass | 11,712 | 8,930 | -24% | 1 | 1 | 0% | 1,661 | 2,587 | +56% | 0 | 0 | — |
case-25 | pass→pass | 20,975 | 19,087 | -9% | 1 | 1 | 0% | 3,184 | 4,382 | +38% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +12 percentage points is the difference between those two pass rates over the 25 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.