Citation Analysis logo

Citation Analysis

Community
beita6969
citation-analysis

Analyze citation networks, compute bibliometric indicators, and identify research fronts. Use when: user asks about citation patterns, h-index, co-authorship networks, research trends, or bibliometric analysis. NOT for: literature searching (use literature-search) or writing papers (use paper-writing).

Overview

Publisherbeita6969
RepositoryScienceClaw
Skill namecitation-analysis
Stars
950
Forks
106
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by beita6969 on GitHub. Read the source before you install it.

Installation

Install the Citation Analysis AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/beita6969/ScienceClaw/tree/main/skills/citation-analysis
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/beita6969/ScienceClaw.git /tmp/ScienceClaw
mkdir -p .claude/skills
cp -r /tmp/ScienceClaw/skills/citation-analysis .claude/skills/citation-analysis
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Citation Analysis in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Citation Analysis on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Citation Analysis is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Citation Analysis

Analyze citation networks, compute bibliometric indicators, and identify research fronts using Semantic Scholar, OpenAlex, and CrossRef data.

When to Use

  • "What's the h-index of this author?"
  • "Show me the citation network for this paper"
  • "Identify the most influential papers in this field"
  • "Map the co-authorship network in this area"
  • "What are the emerging research fronts in NLP?"
  • "Analyze citation trends for CRISPR papers over time"

When NOT to Use

  • Finding papers by topic (use literature-search)
  • Reading or summarizing papers (use scienceclaw-summarization)
  • Writing papers (use paper-writing)
  • Statistical analysis unrelated to citations (use statsmodels-stats)

Bibliometric Indicators

Author-Level Metrics

python
import numpy as np

def h_index(citations: list[int]) -> int:
    """Compute h-index from a list of citation counts."""
    sorted_c = sorted(citations, reverse=True)
    h = 0
    for i, c in enumerate(sorted_c):
        if c >= i + 1:
            h = i + 1
        else:
            break
    return h

def g_index(citations: list[int]) -> int:
    """Compute g-index: largest g such that top g papers have >= g^2 citations."""
    sorted_c = sorted(citations, reverse=True)
    cumsum = np.cumsum(sorted_c)
    g = 0
    for i in range(len(sorted_c)):
        if cumsum[i] >= (i + 1) ** 2:
            g = i + 1
    return g

def i10_index(citations: list[int]) -> int:
    """Number of papers with 10+ citations."""
    return sum(1 for c in citations if c >= 10)

Paper-Level Metrics

  • Citation count: Raw count from Semantic Scholar / OpenAlex
  • Field-weighted citation impact (FWCI): Citations / expected citations in field
  • Percentile rank: Position relative to same-year, same-field papers
  • Citation velocity: Citations per year since publication

Journal-Level Metrics

  • Impact Factor: Citations in year N to papers published in N-1 and N-2
  • CiteScore: Citations over 4 years / documents over 4 years
  • h5-index: h-index of articles published in the last 5 years

Citation Network Analysis

Build Citation Graph

python
import networkx as nx

def build_citation_graph(papers: list[dict]) -> nx.DiGraph:
    """
    Build a directed citation graph.
    Each paper dict should have 'paperId', 'title', 'citations', 'references'.
    Edge direction: citing -> cited.
    """
    G = nx.DiGraph()
    for p in papers:
        G.add_node(p['paperId'], title=p['title'],
                    year=p.get('year'), citations=p.get('citationCount', 0))
        for ref in p.get('references', []):
            if ref.get('paperId'):
                G.add_edge(p['paperId'], ref['paperId'])
        for cit in p.get('citations', []):
            if cit.get('paperId'):
                G.add_edge(cit['paperId'], p['paperId'])
    return G

Key Network Metrics

python
def analyze_citation_network(G: nx.DiGraph) -> dict:
    """Compute key citation network metrics."""
    results = {}
    results['num_papers'] = G.number_of_nodes()
    results['num_citations'] = G.number_of_edges()
    results['density'] = nx.density(G)

    # Most cited (highest in-degree)
    in_deg = dict(G.in_degree())
    results['most_cited'] = sorted(in_deg.items(), key=lambda x: -x[1])[:10]

    # PageRank (identifies influential papers beyond raw citations)
    pr = nx.pagerank(G)
    results['pagerank_top'] = sorted(pr.items(), key=lambda x: -x[1])[:10]

    # Betweenness centrality (bridge papers connecting subfields)
    bc = nx.betweenness_centrality(G)
    results['bridge_papers'] = sorted(bc.items(), key=lambda x: -x[1])[:10]

    return results

Co-Authorship Network

python
def build_coauthor_graph(papers: list[dict]) -> nx.Graph:
    """Build undirected co-authorship graph."""
    G = nx.Graph()
    for p in papers:
        authors = [a['name'] for a in p.get('authors', []) if a.get('name')]
        for i, a1 in enumerate(authors):
            G.add_node(a1)
            for a2 in authors[i+1:]:
                if G.has_edge(a1, a2):
                    G[a1][a2]['weight'] += 1
                else:
                    G.add_edge(a1, a2, weight=1)
    return G

def find_communities(G: nx.Graph) -> list:
    """Detect research communities via Louvain."""
    from networkx.algorithms.community import louvain_communities
    return louvain_communities(G, resolution=1.0)

Research Front Detection

Method: Co-Citation Clustering

  1. Identify highly co-cited paper pairs (cited together frequently)
  2. Cluster co-cited papers into research fronts
  3. Label fronts by common keywords in citing papers

Method: Citation Burst Detection

  1. Track citation counts per year for a set of papers
  2. Identify papers with sudden citation increases (Kleinberg burst detection)
  3. Papers with recent bursts indicate active research fronts

Method: Bibliographic Coupling

  1. Two papers are coupled if they share references
  2. Stronger coupling = more shared references
  3. Cluster coupled papers to find parallel research streams

Visualization

Citation Trend Plot

python
import matplotlib.pyplot as plt

def plot_citation_trend(papers: list[dict], output_path: str):
    """Plot citation counts over publication years."""
    years = [p['year'] for p in papers if p.get('year')]
    fig, ax = plt.subplots(figsize=(8, 4))
    ax.hist(years, bins=range(min(years), max(years)+2), edgecolor='black')
    ax.set_xlabel('Publication Year')
    ax.set_ylabel('Number of Papers')
    ax.set_title('Publication Trend')
    fig.tight_layout()
    fig.savefig(output_path, dpi=300)
    print(f"Saved: {output_path}")

Data Sources

SourceEndpointFree?Rate Limit
Semantic Scholar/paper/{id}/citations, /paper/{id}/referencesYes100/5min (no key)
OpenAlex/works?cited_by={id}, /works?cites={id}Yes100k/day
CrossRef/works/{doi} (reference list)YesPolite pool

Best Practices

  1. Always use Semantic Scholar paperId or DOI as canonical identifiers
  2. Normalize author names (handle variants: "J. Smith" vs "John Smith")
  3. Filter self-citations when computing impact metrics
  4. Use field-normalized metrics for cross-discipline comparisons
  5. Report the date of data collection (citation counts change daily)
  6. Visualize networks with node size proportional to citations

Zero-Hallucination Rule

  • NEVER fabricate citation counts, h-indices, or paper metadata
  • All bibliometric data must come from tool results in the current session
  • If an API returns no data for an author/paper, report the empty result explicitly

Frequently asked questions

What does the Citation Analysis AI skill do?

Analyze citation networks, compute bibliometric indicators, and identify research fronts. Use when: user asks about citation patterns, h-index, co-authorship networks, research trends, or bibliometric analysis. NOT for: literature searching (use literature-search) or writing papers (use paper-writing).

Why use Citation Analysis on TypingMind?

Because you install it once and use it with any model. Citation Analysis is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Citation Analysis in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/beita6969/ScienceClaw/tree/main/skills/citation-analysis. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Citation Analysis?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Citation Analysis?

As many as you like. As long as a model supports skills, you can use Citation Analysis with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Citation Analysis AI skill free?

Yes. It is published on GitHub by beita6969 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇