citation-fixer
Skill này làm gì
Skill này rà soát các trang trong brain và đảm bảo mỗi thông tin đều có ghi chú nguồn rõ ràng. Nó sửa các trích dẫn sai định dạng và báo cáo những gì còn lại.
Khi nào nên dùng
- ✓Khi bạn muốn kiểm tra mọi thông tin trong brain đều có nguồn.
- ✓Khi các trích dẫn trên trang lộn xộn, thiếu sót hoặc không nhất quán.
- ✓Khi một bài đăng hoặc tweet được nhắc đến nhưng không có liên kết hoạt động.
Liên kết skill
https://github.com/garrytan/gbrain/blob/master/plugin/skills/citation-fixer/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra các trang brain của tôi xem có thiếu trích dẫn nguồn không, và sửa định dạng ở những chỗ có thể.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent đọc từng trang và tìm thông tin không có nguồn, thiếu ngày, hoặc sai định dạng. Nó sửa các lỗi định dạng có thể sửa và liệt kê những chỗ còn thiếu.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Citation Fixer Skill
Convention: see conventions/quality.md for the canonical citation format every fix should match.
Output rule: all links MUST be deterministic (built from API data, not composed by LLM). See _output-rules.md.
Contract
This skill guarantees:
- Every brain page is scanned for citation compliance.
- Missing citations are flagged with specific location.
- Malformed citations are fixed to match the standard format.
- (v0.25.1) Tweet / post references without URLs are resolved via
X API and patched with deterministic
https://x.com/<handle>/status/<id>links. - Results reported with counts (scanned, fixed, remaining).
Phases
- Scan pages. List pages and read each one, checking for inline
[Source: ...]citations. - Identify issues:
- Facts without any citation
- Citations missing date
- Citations missing source type
- Citations with wrong format
- (v0.25.1) Tweet references without
x.comURLs
- Fix format issues. Rewrite malformed citations to match
conventions/quality.md. - (v0.25.1) Resolve tweet references via the X API integration.
- Report results. Count: pages scanned, citations found, issues fixed, tweets resolved, remaining gaps.
Tweet resolution pipeline (v0.25.1 extension)
For each broken tweet reference, follow this chain. The actual API call
goes through whatever X integration the host has configured (typical
shape: a recipe under recipes/x-api/ with handle / search-all
endpoints).
Step 1: Identify broken references
Scan the page for patterns that indicate tweet references without URLs:
- Contains words like
tweeted,posted,said on X,RT,retweet,X post - Contains quoted text that looks like a tweet (short, punchy, often starts with a quote)
- Has
[Source: ... X/Twitter ...]without anx.comURL - References engagement metrics (likes, impressions) without a link
Step 2: Extract searchable content
From each broken reference, extract:
- The handle (if mentioned:
@<username>) - The quoted text (if available)
- The approximate date (often present in surrounding timeline entries)
Step 3: Search for the actual tweet
Use the host's X API integration. Query patterns:
# Handle + quoted text:
from:<handle> "<exact quote fragment>"
# Quoted text only:
"<exact quote fragment>"
# Original of a retweet:
"<exact quote>" -is:retweet
Step 4: Verify and extract metadata
Once a candidate is found:
- Confirm the text matches the quoted fragment.
- Pull the tweet id, author handle, engagement metrics (likes / RTs / impressions).
- Construct the URL:
https://x.com/<handle>/status/<tweet_id>.
Step 5: Patch the brain page
Replace the broken citation with a proper one:
Before:
"<quote fragment>" [Source: <some hand-wavy attribution>]
After:
"<full verified quote>" — <N> likes, <N> RTs, <N> impressions
[Source: [X/<handle>, YYYY-MM-DD](https://x.com/<handle>/status/<tweet_id>)]
Batch mode
When sweeping many pages:
Find candidate pages
# Pages mentioning tweets but with no x.com links
for f in $(find . -name "*.md" -not -path "./node_modules/*"); do
refs=$(grep -ci "tweet\|posted\|x post\|RT\|retweet\|said on X" "$f")
links=$(grep -c "x.com/.*/status/" "$f")
if [ "$refs" -gt 2 ] && [ "$links" -eq 0 ]; then
echo "$f"
fi
done
Priority order
- Recently created / updated pages — fresh broken refs are easiest to resolve while context is fresh.
- High-traffic pages (frequent reads / writes from other skills).
- Everything else — bulk cleanup over time.
Rate limiting
- X API: respect the host's tier limits; don't hammer.
- Target ~50 pages per batch run.
- 1-3 API calls per page (search + verify).
- Batch-commit every 10-20 pages so a partial failure doesn't lose progress.
Output format
Citation Audit Report
=====================
Pages scanned: N
Citations found: N
Issues fixed: N
Tweet links resolved: N
Remaining gaps: N (pages with uncitable facts)
When it fails
Follow the agent operator protocol for any gbrain error code, exit code, [AGENT] block or notice block. Specific to this skill:
put_pagereturnsrevision_conflictmid-batch: re-read that page, re-apply only the citation fix, and continue; never ove
Câu hỏi thường gặp
Nó có tự bịa nguồn không?
Không. Nó dùng định dạng trích dẫn chuẩn và chỉ điền liên kết từ dữ liệu tra cứu được.
Nó xử lý tweet không có liên kết thế nào?
Nó tra cứu qua tích hợp X và thêm địa chỉ web tương ứng khi tìm được.
Tôi có thấy bản tóm tắt không?
Có. Nó báo cáo số trang đã kiểm tra, đã sửa và vẫn còn thiếu.
Chi tiết
Mô tả gốc của tác giả
Audit and fix citation formatting across brain pages. Ensures every fact has an inline [Source: ...] citation matching the standard format. Extended in v0.25.1: scans for broken tweet/post references that lack actual URLs and resolves them via the host's X / Twitter API integration.
repo: garrytan/gbrain
Độ phổ biến
- Sao GitHub
- 31k
- Vị trí xếp hạng
- #9293
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
gbrain
31kCho phép agent của bạn tìm trong kho tri thức dùng chung của công ty các thông tin về con người, dự án và quyết định, và lưu ghi chú bền vững vào đó.
brain-ingest-gate
31kKiểm tra nội dung mới với kho tri thức hiện có trước khi thêm vào, để tránh trùng lặp và xác định các thực thể được nêu tên trước.
brain-link-discipline
31kĐảm bảo agent của bạn kèm một liên kết hoạt động đến mỗi trang kho tri thức mà nó báo cáo, trong cùng một tin nhắn, để bạn mở được ngay.
brain-ops
31kCung cấp cho agent của bạn thói quen cốt lõi cho kho tri thức: kiểm tra ngữ cảnh có sẵn trước, lưu ghi chú rõ ràng kèm nguồn và liên kết các trang liên quan.
Skill tương tự
obsidian-vault-maintainer
394kGiúp agent của bạn giữ gọn kho ghi nhớ kiểu Obsidian, với liên kết wiki hoạt động tốt, thuộc tính nhất quán và các phần tự tạo an toàn.
wiki-maintainer
394kGiúp agent của bạn duy trì wiki bộ nhớ OpenClaw với các trang có thể lặp lại, khối được quản lý an toàn và kiểm tra mâu thuẫn hoặc thiếu sót.
obsidian
394kCho phép agent của bạn đọc, tìm, tạo và sửa ghi chú, công việc, liên kết và thuộc tính trong Obsidian bằng dòng lệnh Obsidian chính thức.