| name | github-citation |
| description | Install and use the GitHub Citation CLI or MCP server to generate citations for GitHub repositories. Use when a user asks to cite GitHub repos, software projects, code repositories, CITATION.bib, CITATION.cff, or to produce BibTeX, APA, MLA, Chicago, IEEE, or Harvard references from GitHub URLs. |
GitHub Citation
Use this skill to generate citations for public GitHub repositories. The generator checks sources in this order:
CITATION.bib from the repository.
CITATION.cff, converted into BibTeX and formatted styles.
- GitHub repository metadata as a reviewable fallback.
Always preserve the source/provenance in your answer when it matters for research, manuscripts, papers, reports, or bibliographies. Treat GitHub metadata fallback citations as drafts that the user should review.
Preferred Tool Order
- Use the MCP tool
generate_github_citation when the GitHub Citation MCP server is connected.
- Otherwise use the CLI command
github-citation.
- If the command is unavailable but you are inside this repository, use
node bin/github-citation.js after dependencies are installed.
Use GITHUB_TOKEN or GH_TOKEN in the environment for private repositories or to reduce GitHub API rate-limit failures. Do not ask for a token unless the request fails due to access or rate limits.
Installation
Install the agent skill with the skills CLI:
npx skills add https://github.com/ezefranca/github-citation --skill github-citation
Install globally for Codex:
npx skills add https://github.com/ezefranca/github-citation \
--skill github-citation \
-a codex \
-g \
-y
First check whether the tools already exist:
command -v github-citation
command -v github-citation-mcp
If you are inside a checkout of this repository, install dependencies and use the local commands:
npm install
npm run citation -- owner/repo
npm run mcp
To expose the checkout as normal shell commands on the current machine:
npm install
npm link
github-citation --version
github-citation owner/repo
If the package is available from npm, install it globally:
npm install -g github-citation
github-citation --version
github-citation-mcp
For one-off use without a global install, use npx:
npx -y --package github-citation github-citation owner/repo
npx -y --package github-citation github-citation-mcp
If the npm package is not yet available in the current registry, use the GitHub source:
npm exec --yes --package=github:ezefranca/github-citation -- github-citation owner/repo
npm exec --yes --package=github:ezefranca/github-citation -- github-citation-mcp
Use Node.js 20 or newer. If installation fails, check node --version and npm --version before changing package code.
CLI
Generate BibTeX:
github-citation owner/repo
Generate a style:
github-citation https://github.com/owner/repo --style apa
Generate all styles as JSON:
github-citation owner/repo --all --format json
Include provenance without contaminating stdout citation text:
github-citation owner/repo --style bibtex --provenance
Use an exact access date only when the user asks for one or the surrounding document requires it:
github-citation owner/repo --access-date 2026-05-27
Supported styles: bibtex, apa, mla, chicago, ieee, harvard.
MCP
Add the server to the agent's MCP client config. The exact config path depends on the client; use the client's existing MCP configuration location.
From a local checkout, prefer an absolute path:
{
"mcpServers": {
"github-citation": {
"command": "node",
"args": ["/absolute/path/to/github-citation/bin/github-citation-mcp.js"]
}
}
}
After npm link or a global install:
{
"mcpServers": {
"github-citation": {
"command": "github-citation-mcp"
}
}
}
Without installing globally:
{
"mcpServers": {
"github-citation": {
"command": "npx",
"args": ["-y", "--package", "github-citation", "github-citation-mcp"]
}
}
}
Without installing globally, using the GitHub source:
{
"mcpServers": {
"github-citation": {
"command": "npm",
"args": [
"exec",
"--yes",
"--package=github:ezefranca/github-citation",
"--",
"github-citation-mcp"
]
}
}
}
If private repositories or higher rate limits are needed, add GITHUB_TOKEN or GH_TOKEN to the MCP server environment using the client's supported config format. Do not leave placeholder token strings in config.
Restart or reload the MCP client after editing its config, then verify that the generate_github_citation tool is listed.
Call generate_github_citation with:
{
"repository": "owner/repo",
"style": "bibtex",
"allStyles": false,
"format": "text",
"includeProvenance": true
}
Use "format": "json" when you need structured fields for a bibliography pipeline.
Response Guidance
For a single requested citation, return the citation and a short source note.
For all styles, group by style name and include the repository source once.
If the source is Maintainer-provided CITATION.bib, present it as authoritative repository-provided citation metadata.
If the source is Parsed from CITATION.cff, mention that CFF metadata was converted.
If the source is Inferred from GitHub metadata, say it is a fallback draft and should be checked before publication.
Do not invent missing authors, DOI, publication venue, or release date. Use the generated output as the source of truth unless the user supplies additional metadata.