manage-bibliography
정보
이 스킬은 개발자가 R을 통해 BibTeX 서지 데이터를 관리할 수 있도록 지원하며, 파싱, 중복 제거를 통한 병합, DOI나 ISBN 같은 식별자로부터 항목을 생성하는 기능을 제공합니다. R Markdown이나 Quarto를 위한 깔끔한 .bib 파일을 만들거나 여러 협업자의 서지 데이터를 통합하는 데 유용합니다. 주요 기능으로는 DOI/제목 유사성을 통한 지능형 중복 제거와 정렬된 구조화된 BibTeX 출력 내보내기가 포함됩니다.
빠른 설치
Claude Code
추천npx skills add pjt222/agent-almanac -a claude-code/plugin add https://github.com/pjt222/agent-almanacgit clone https://github.com/pjt222/agent-almanac.git ~/.claude/skills/manage-bibliographyClaude Code에서 이 명령을 복사하여 붙여넣어 스킬을 설치하세요
문서
Manage Bibliography
Create, merge, dedup BibTeX bib files via R. Full lifecycle: parse existing .bib → structured R, gen new entries from identifiers (DOI, ISBN, arXiv ID), merge multi bibs w/ intelligent dedup, export clean consistent .bib.
Use When
- New .bib for R Markdown / Quarto project
- Merge bibs from multi collaborators / sources
- Dedup .bib grown by copy-paste accumulation
- Gen BibTeX entries programmatically from DOIs / identifiers
- Clean + standardize existing .bib (consistent keys, sorted fields)
In
- Req: Path to ≥1 .bib files, or list of DOIs/ISBNs/arXiv IDs
- Opt: Output .bib path (default:
references.bib) - Opt: Dedup strategy (
doi,title,both; default:both) - Opt: Sort order (
author,year,key; default:key) - Opt: Key gen pattern (default:
AuthorYear)
Do
Step 1: Install + Load Pkgs
required_packages <- c("RefManageR", "bibtex", "stringdist")
missing <- required_packages[!vapply(required_packages, requireNamespace,
logical(1), quietly = TRUE)]
if (length(missing) > 0) install.packages(missing)
library(RefManageR)
→ All pkgs load w/o errs.
If err: RefManageR fails → check curl + xml2 sys libs avail. Ubuntu: sudo apt install libcurl4-openssl-dev libxml2-dev.
Step 2: Parse Existing .bib
bib <- RefManageR::ReadBib("references.bib", check = FALSE)
message(sprintf("Parsed %d entries from references.bib", length(bib)))
# Inspect structure
print(bib[1:3])
# Access fields programmatically
keys <- names(bib)
years <- vapply(bib, function(x) x$year %||% NA_character_, character(1))
→ BibEntry obj w/ all entries. Count matches @article{, @book{, etc blocks.
If err: Parse fails → check unmatched braces / invalid UTF-8. Fallback: bibtex::read.bib() w/ stricter parsing.
Step 3: Gen Entries from Identifiers
# From DOI
entry_doi <- RefManageR::GetBibEntryWithDOI("10.1093/bioinformatics/btz848")
# From a vector of DOIs
dois <- c("10.1093/bioinformatics/btz848", "10.1038/s41586-020-2649-2")
entries <- do.call(c, lapply(dois, function(d) {
tryCatch(
RefManageR::GetBibEntryWithDOI(d),
error = function(e) {
warning(sprintf("Failed to fetch DOI %s: %s", d, e$message))
NULL
}
)
}))
entries <- Filter(Negate(is.null), entries)
→ BibEntry objs w/ complete metadata (title, author, journal, year, DOI) per resolved identifier.
If err: DOI resolution → CrossRef API. Failed → check connectivity + DOI valid. Rate limiting for large batches → Sys.sleep(1) between reqs.
Step 4: Merge Multi Bibs
bib1 <- RefManageR::ReadBib("project_a.bib", check = FALSE)
bib2 <- RefManageR::ReadBib("project_b.bib", check = FALSE)
# Simple merge
merged <- c(bib1, bib2)
message(sprintf("Merged: %d + %d = %d entries (before dedup)",
length(bib1), length(bib2), length(merged)))
→ Combined BibEntry obj w/ entries from both files.
Step 5: Dedup Entries
deduplicate_bib <- function(bib, method = "both") {
n_before <- length(bib)
keys_to_remove <- c()
for (i in seq_along(bib)) {
if (names(bib)[i] %in% keys_to_remove) next
for (j in seq(i + 1, length(bib))) {
if (j > length(bib)) break
if (names(bib)[j] %in% keys_to_remove) next
is_dup <- FALSE
if (method %in% c("doi", "both")) {
doi_i <- bib[[i]]$doi %||% ""
doi_j <- bib[[j]]$doi %||% ""
if (nzchar(doi_i) && nzchar(doi_j) && tolower(doi_i) == tolower(doi_j)) {
is_dup <- TRUE
}
}
if (!is_dup && method %in% c("title", "both")) {
title_i <- tolower(gsub("[^a-z0-9 ]", "", tolower(bib[[i]]$title %||% "")))
title_j <- tolower(gsub("[^a-z0-9 ]", "", tolower(bib[[j]]$title %||% "")))
if (nzchar(title_i) && nzchar(title_j)) {
sim <- 1 - stringdist::stringdist(title_i, title_j, method = "jw")
if (sim > 0.95) is_dup <- TRUE
}
}
if (is_dup) keys_to_remove <- c(keys_to_remove, names(bib)[j])
}
}
if (length(keys_to_remove) > 0) {
bib <- bib[!names(bib) %in% keys_to_remove]
}
message(sprintf("Deduplication: %d -> %d entries (%d duplicates removed)",
n_before, length(bib), n_before - length(bib)))
bib
}
merged <- deduplicate_bib(merged, method = "both")
→ Dup entries removed. Count of removed dups printed.
If err: Title comparison too aggressive (removing non-dups) → raise threshold > 0.95 or switch method = "doi" only.
Step 6: Sort + Export
# Sort by citation key
sorted_bib <- sort(merged, sorting = "nyt") # name-year-title
# Export to .bib file
RefManageR::WriteBib(sorted_bib, file = "references.bib", biblatex = FALSE)
message(sprintf("Wrote %d entries to references.bib", length(sorted_bib)))
→ Clean .bib on disk w/ consistent format, one entry per block, sorted alphabetically by key.
If err: WriteBib encoding issues → ensure R locale supports UTF-8: Sys.setlocale("LC_ALL", "en_US.UTF-8").
Check
- Output .bib parses w/o errs:
RefManageR::ReadBib("references.bib") - Entry count matches expectations (input - dups)
- No dup DOIs remain: all DOIs in output unique
- All entries have citation key
- Required fields per entry type (author, title, year min)
- File valid BibTeX (test w/
bibtex::read.bib())
Traps
- Encoding issues: Latin-1 accents break UTF-8 parsers. Convert first:
iconv -f ISO-8859-1 -t UTF-8 old.bib > new.bib - Unmatched braces: Single missing
}silently drops entries. Validate balance before parsing large. - DOI rate limiting: CrossRef throttles unauthenticated. Set polite email w/
RefManageR::BibOptions(check.entries = FALSE)+ batch reqs. - Key collisions: Merging files w/ dup keys (both have
Smith2020) silently overwrites. Regen keys after merge. - LaTeX in titles: Titles w/
{DNA}/$\alpha$need careful handling. RefManageR preserves but downstream may strip.
→
format-citations— format bib entries → styled citationsvalidate-references— verify completeness + DOI resolution../reporting/format-apa-report— APA-formatted reports using bibs../r-packages/write-vignette— pkg vignettes citing refs
GitHub 저장소
연관 스킬
content-collections
메타이 스킬은 콘텐츠 콜렉션(Content Collections)을 위한 프로덕션 검증된 설정을 제공합니다. 콘텐츠 콜렉션은 Markdown/MDX 파일을 Zod 검증이 포함된 타입 안전한 데이터 콜렉션으로 변환해주는 TypeScript 최우선 도구입니다. 블로그, 문서 사이트 또는 콘텐츠 중심의 Vite + React 애플리케이션을 구축할 때 타입 안전성과 자동 콘텐츠 검증을 보장하기 위해 사용하세요. Vite 플러그인 구성과 MDX 컴파일부터 배포 최적화 및 스키마 검증에 이르기까지 모든 것을 다룹니다.
polymarket
메타이 스킬은 개발자들이 Polymarket 예측 시장 플랫폼을 활용한 애플리케이션을 구축할 수 있도록 지원하며, 거래 및 시장 데이터를 위한 API 통합 기능을 포함합니다. 또한 WebSocket을 통한 실시간 데이터 스트리밍을 제공하여 실시간 거래와 시장 활동을 모니터링할 수 있습니다. 이를 통해 거래 전략을 구현하거나 실시간 시장 업데이트를 처리하는 도구를 생성하는 데 활용할 수 있습니다.
creating-opencode-plugins
메타이 스킬은 개발자들이 명령어, 파일, LSP 작업 등 25개 이상의 이벤트 유형에 연결되는 OpenCode 플러그인을 만들 수 있도록 돕습니다. JavaScript/TypeScript 모듈을 위한 플러그인 구조, 이벤트 API 명세, 구현 패턴을 제공합니다. OpenCode AI 어시스턴트의 라이프사이클을 사용자 정의 이벤트 기반 로직으로 가로채거나, 모니터링하거나, 확장해야 할 때 사용하세요.
sglang
메타SGLang은 RadixAttention 프리픽스 캐싱을 활용하여 JSON, 정규식, 에이전트 워크플로우를 위한 고속 구조화 생성에 특화된 고성능 LLM 서빙 프레임워크입니다. 특히 반복되는 프리픽스가 있는 작업에서 상당히 빠른 추론 속도를 제공하여 복잡한 구조화 출력 및 다중 턴 대화에 이상적입니다. 제약 디코딩이 필요하거나 광범위한 프리픽스 공유가 있는 애플리케이션을 구축할 때는 vLLM과 같은 대안보다 SGLang을 선택하십시오.
