fetch-meta-to-kb
Skill11 starsChanged 3 months agoMITView on GitHub
Fetch journal articles from Crossref published after a user-specified date and insert them into PostgreSQL `journals` with DOI deduplication. Use when incrementally ingesting journal metadata from `journals_issn` into `journals`.
In this repository62 other files it gives its agents.
- AGENTS.mdAGENTS.md
- academic-paper-downloadSkill
- airnow-hourly-obs-fetchSkill
- ai-tech-fulltext-fetchSkill
- ai-tech-rss-fetchSkill
- ai-tech-summarySkill
- apply-environmental-thinkingSkill
- bluesky-cascade-fetchSkill
- convert-image-to-jpgSkill
- dify-knowledge-base-searchSkill
- dify-knowledge-base-uploadSkill
- document-granular-decomposeSkill
- domain-onboardingSkill
- eceee-news-fulltext-fetchSkill
- email-imap-appendSkill
- email-imap-fetchSkill
- email-imap-full-fetchSkill
- email-smtp-sendSkill
- epa-eis-records-fetchSkill
- federal-register-doc-fetchSkill
- fetch-abstract-to-kbSkill
- fetch-meta-from-kbSkill
- figshare-data-downloadSkill
- gdelt-doc-searchSkill
- gdelt-events-fetchSkill
- gdelt-gkg-fetchSkill
- gdelt-mentions-fetchSkill
- gdelt-web-ngrams-searchSkill
- github-contribution-period-analysisSkill
- nasa-firms-fire-fetchSkill
- notebooklmSkill
- openaq-data-fetchSkill
- open-meteo-air-quality-fetchSkill
- open-meteo-flood-fetchSkill
- open-meteo-historical-fetchSkill
- regulationsgov-attachments-fetchSkill
- regulationsgov-comment-detail-fetchSkill
- regulationsgov-comments-fetchSkill
- remove-similar-imageSkill
- river-outfall-status-visualizerSkill
- sustainability-fulltext-fetchSkill
- sustainability-rss-fetchSkill
- sustainability-summarySkill
- synology-file-stationSkill
- tiangong-auto-researchSkill
- tiangong-auto-research-workbuddySkill
- tiangong-kb-course-fulltext-fetchSkill
- tiangong-kb-course-searchSkill
- tiangong-kb-edu-searchSkill
- tiangong-kb-esg-searchSkill
- tiangong-kb-ingestSkill
- tiangong-kb-patent-searchSkill
- tiangong-kb-report-searchSkill
- tiangong-kb-sci-searchSkill
- tiangong-kb-textbook-searchSkill
- tsinghua-graduate-thesisSkill
- usbr-project-records-fetchSkill
- usbr-rise-fetchSkill
- use-thuenv-presentation-styleSkill
- usgs-water-iv-fetchSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read ISSN seed rows from journals_issn (journal, issn1).
- Very specific: line 12
Keep the implementation aligned with fetch_meta_to_kb.py.
- Distinctive: line 23
Run incremental fetch with a required date:
- Very specific: line 29
If executing through an exec tool call, set timeout to 1800 seconds (30 minutes).
- Very specific: line 35
Prefer RUN_SUMMARY_JSON emitted by fetch_meta_to_kb.py.
- Very specific: line 36
If JSON is unavailable, parse only this run's ${KB_LOG_DIR}/fetch-meta-to-kb-YYYYMMDD-HHMMSS.log.
- Very specific: line 42
Keep only items whose container-title equals target journal title (case-insensitive).
- Very specific: line 46
Do not compute announcement counts via database-wide or time-window SQL such as WHERE date >= ....
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Fetch Meta to KB
Core Goal
- Pull
journal-articlerecords from Crossref after a given--from-date. - Read ISSN seed rows from
journals_issn(journal,issn1). - Insert rows into
journalswithON CONFLICT (doi) DO NOTHING. - Keep the implementation aligned with
fetch_meta_to_kb.py.
Run Workflow
- Set database connection env vars (user-managed keys prefixed with
KB_):
KB_DB_HOSTKB_DB_PORTKB_DB_NAMEKB_DB_USERKB_DB_PASSWORDKB_LOG_DIR(required, log output directory)
- Run incremental fetch with a required date:
python3 scripts/fetch_meta_to_kb.py --from-date 2024-05-01- If executing through an
exectool call, set timeout to 1800 seconds (30 minutes).
- Check logs in:
${KB_LOG_DIR}/fetch-meta-to-kb-YYYYMMDD-HHMMSS.log(UTC timestamp, one file per run)
- Build user-facing summary strictly from the current run output:
- Prefer
RUN_SUMMARY_JSONemitted byfetch_meta_to_kb.py. - If JSON is unavailable, parse only this run's
${KB_LOG_DIR}/fetch-meta-to-kb-YYYYMMDD-HHMMSS.log. total_insertedmust mean rows inserted in this run (after DOI dedup), not cumulative rows in table.
Behavior Contract
- Query Crossref endpoint:
https://api.crossref.org/journals/{issn}/works. - Filter with
type:journal-article,from-pub-date:<from-date>. - Keep only items whose
container-titleequals target journal title (case-insensitive). - Continue pagination with cursor until no matching items remain.
- Store fields in
journals:title,doi,journal,authors,date,abstract(nullable when Crossref has no abstract). - Reporting/announcement metrics must use current-run log/summary only.
- Do not compute announcement counts via database-wide or time-window SQL such as
WHERE date >= ....
Scope Boundary
- Implement only Crossref incremental fetch + insert into
journals.
Script
scripts/fetch_meta_to_kb.py
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

