JabKit + Claude Code
Please vote if you support this proposal:
- I would like to have this feature, too!
- I don’t care.
TL;DR — I wrapped JabKit (JabRef’s CLI toolkit) as a Claude Code skill and now manage my entire
.biblibrary through natural language. This post documents what worked, what didn’t, and how to reproduce the setup.
Background
I’m a cognitive neuroscience researcher (RSA / fNIRS / EEG), using JabRef to manage a growing bibliography.
My typical pain points:
-
Importing PDFs from scattered Zotero-style directories
-
Cleaning metadata and deduplication
-
Searching and maintaining
.bibfiles -
Repetitive manual workflows
After discovering JabKit, I decided to experiment with a different approach:
Wrap it as a Claude Code skill (/jabkit)
Drive the entire bibliography workflow via natural language
A Quick Disclaimer
I’m not a professional developer—this setup is a personal experiment built out of curiosity.
-
I’m very interested in seeing official improvements to JabKit and JabRef workflows
-
I’d love to see more people explore this direction together
-
Tools like OpenCode / OpenClaw seem to follow a similar philosophy, so there’s clearly a broader pattern here
This is just one possible implementation, not a “best practice”.
I’m especially looking forward to more capabilities being added to JabKit in the future
System Environment
OS: Ubuntu 24.04.4 LTS
Java: OpenJDK 21 (apt)
JabRef GUI: 5.15
JabKit: 6.0-alpha.341
Node.js: installed (for npx testing)
Shell: bash
Installation: What Worked vs What Didn’t
Step 1: Install JBang
curl -Ls https://sh.jbang.dev | bash -s - app setup
Key points:
-
Installs Temurin JDK 17 automatically
-
JDKs are cached in:
~/.jbang/cache/jdks/
After setup, I had:
-
System JDK 21
-
JBang JDK 17
-
JabKit-required JDK 25
They coexist without issues.
Step 1.5: PATH Configuration (Important)
Add to ~/.bashrc:
export PATH="$HOME/.jbang/bin:$HOME/.jbang/currentjdk/bin:$PATH"
export JAVA_HOME=$HOME/.jbang/currentjdk
alias j!=jbang
Otherwise:
Claude Code’s non-interactive shell won’t find jbang
Step 2: Install JabKit (Reliable Method)
jbang app install --java 25 jabkit@jabref
What happens:
-
Downloads JDK 25 (required by JabKit)
-
Installs CLI at:
~/.jbang/bin/jabkit
Wrapper:
exec jbang run --java 25 jabkit@jabref "$@"
Step 3: What Didn’t Work — npx
I tried:
npx @jbangdev/jbang jabkit@jabref
Result: failed
Likely reasons:
-
Java version requirement not properly forwarded
-
JDK resolution conflict
Conclusion:
Use JBang directly, not npx
Step 4: Updating JabKit
Since it’s a SNAPSHOT build:
jbang --fresh jabkit@jabref --help
Or:
jbang app install --fresh --force jabkit@jabref
Claude Code Skill Setup
Location:
~/.claude/skills/jabkit/SKILL.md
Skill Metadata
Environment:
- JBang: ~/.jbang/bin/jbang
- JabKit: ~/.jbang/bin/jabkit
- PATH must include ~/.jbang/bin
Commands Covered
| Category | Commands |
|---|---|
| Literature collection | doi-to-bibtex, convert, fetch |
| Library management | search, citationkeys generate |
| PDF management | pdf update |
| Quality checks | check-integrity, check-consistency |
| Citation network | get-citing-works, get-cited-works |
| Preferences | preferences |
Core Workflows
1. Add via DOI
jabkit doi-to-bibtex <DOI> >> library.bib
2. Add via PDF
jabkit convert \
--input=<pdf> \
--input-format=pdfMerged \
--output=/tmp/entry.bib \
--output-format=bibtex
3. Batch Import Example
import subprocess
for pdf in find_pdfs(pdf_dir):
subprocess.run([
"jabkit", "convert",
"--input", pdf,
"--input-format", "pdfMerged",
"--output", out_file,
"--output-format", "bibtex"
])
Results:
-
5 papers added -
3 skipped (duplicate DOI) -
0 failures
4. Quality Checks
jabkit check-integrity
jabkit check-consistency
5. Citation Tracing
jabkit get-citing-works
jabkit get-cited-works
What Changed (Before vs After)
Before
-
Manual DOI lookup → copy → paste
-
Painful batch workflows
-
No structured quality checks
-
Limited citation tracing
After
I can just say:
-
“Add this PDF to my library”
-
“Find all papers by Zhai”
-
“Check my library quality”
-
“What cites this paper?”
Everything runs through natural language + the skill
Insights from JabRef Source Code
While building this, I checked jabref-main:
-
All 12 commands live in:
jabkit/src/main/java/org/jabref/toolkit/commands/ -
External changes are detected via
DatabaseChangeMonitor -
There is currently no option to auto-accept external changes
Known Issues
External Change Notifications
When JabKit modifies .bib while JabRef is open:
“The library has been modified by another program”
Current state:
-
Cannot disable -
No auto-accept option
Workaround:
Close the library before running batch operations
File Path Handling
After importing:
-
filefields contain absolute paths -
“Copy linked files”:
-
copies files
-
does not always update links
-
I’ve opened a separate Discourse issue for this
Practical Tips
-
Use JBang, not npx
-
Always specify
--java 25 -
Ensure PATH is set in
.bashrc -
Use
--freshregularly -
Close JabRef GUI before batch operations
References
-
JabKit Documentation
-
JBang Documentation
-
JabRef GitHub
-
JabKit Source Code
Final Thoughts
This workflow significantly reduces friction in managing a .bib library, especially for batch operations and metadata handling.
That said, this is still an early-stage, experimental setup.
-
There’s clear potential for tighter integration
-
Many rough edges remain (especially around GUI sync and file handling)
-
A more official workflow could make this much more accessible
If others are experimenting with similar setups (Claude Code, OpenCode, OpenClaw, etc.), I’d be very interested to hear how you approached it.