Skip to main content

suken-cite

Mỗi khẳng định đều kèm ảnh chụp nguồn của nó. suken-cite giúp một LLM agent (như Claude Code) trả lời bằng một tuyến truyện ngắn, trong đó mỗi bước có một link 📷 dẫn tới ảnh chụp nguồn:

  • Trường hợp chung (trang web, PDF, Word .docx, CSV, file chữ): nguồn được hiện giống bản gốc, đoạn trích khoanh đỏ, bên dưới là một dòng dịch.
  • Giải thích code: thẻ giải thích gom vị trí trong flow, class, hàm, thư viện, biến và giá trị thật lúc chạy, thể hiện bằng màu, icon và sơ đồ thay cho chữ. Nhiều hàm gọi nhau thì đi từng bước bằng ◀ ▶.

Agent chụp ảnh bằng chrome-devtools. Người đọc chỉ cần bấm link.

Dùng thế nào

Cài gói, rồi bảo agent đọc hướng dẫn và làm theo:

pip install suken-cite
suken-cite usage        # hướng dẫn chung: tuyến truyện + trích dẫn khoanh đỏ
suken-cite usage code   # hướng dẫn giải thích code: 1 thẻ cho 1 dòng code, tuyến truyện + thẻ cho cả flow

Hai hướng dẫn viết cho LLM agent, cùng một khung: luật vàng, checklist, review. suken-cite --help chỉ agent chọn đúng hướng dẫn. Agent tự cài reviewer, tự dựng trích dẫn, tự chụp ảnh, và chỉ giao kết quả khi reviewer chấm ĐẠT.

Các lệnh

Lệnh Làm gì
suken-cite usage [code|renderer] in hướng dẫn: chung / giải thích code / tự làm renderer cho loại file khác
suken-cite install-agent cài 2 subagent reviewer vào .claude/agents/: suken-story-review (truyện chung) và suken-code-review (truyện giải thích code)
suken-cite init --dir ./cites tạo thư mục dự án trích dẫn
suken-cite serve --dir ./cites bật server để xem ảnh (mặc định cổng 8123)
suken-cite snapshot <url> --id <id> lưu bản sao trang web, dùng Chrome đã đăng nhập
suken-cite register --id <id> --file … --url … ghi nguồn gốc của file (SharePoint, email đính kèm…)
suken-cite text --file … | --doc … in chữ của nguồn để chép đoạn trích nguyên văn
suken-cite skeleton --file … --lines … thẻ giải thích code: in khung JSON đã điền sẵn class, hàm kèm tham số, biến của các dòng code (Python); agent chỉ điền ý nghĩa và giá trị
suken-cite add … thêm trích dẫn: --lines / --rows / --page + --quote / --doc, hoặc thẻ code --explain <json> — thẻ code còn thiếu mục nào thì add từ chối và nói rõ thiếu gì
suken-cite urls in link trang cần chụp và link cho người đọc
suken-cite check kiểm mọi trích dẫn và báo ảnh còn thiếu

Ví dụ một trích dẫn:

suken-cite init --dir ./cites
suken-cite serve --dir ./cites &
suken-cite add --dir ./cites --id price --file prices.csv --rows 3 --vi "Lê giá 2,40 mỗi kg."
# trang cần chụp     : http://127.0.0.1:8123/render/csv.html?cite=price
# lưu ảnh vào        : ./cites/shots/price.png
# link cho người đọc : http://127.0.0.1:8123/c.html?id=price

Yêu cầu

  • Python 3.9+ (không cần thư viện Python nào khác; phần chạy trên trình duyệt đã đóng gói sẵn).
  • Chrome, và Claude Code có MCP server chrome-devtools để chụp ảnh.
  • Trang web: Chrome đó phải mở cổng DevTools; SingleFile CLI được tự tải ở lần dùng đầu.
  • Linux hoặc macOS.

Giấy phép

MIT. Các thư viện trình duyệt đi kèm và giấy phép của chúng nằm trong THIRD_PARTY_NOTICES.md.

Metadata

Release files for suken-cite 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suken-cite 0.1.10
File Size Uploaded
suken_cite-0.1.10.tar.gz 763.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for suken-cite 0.1.10
File Interpreter ABI Platform
suken_cite-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / suken_cite-0.1.10.tar.gz

Download URL suken_cite-0.1.10.tar.gz
Size 763.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dbb747e461584391ae45834a80842357b600a4ab22552768290172e631142c36
BLAKE2b-256 checksum
How to use checksums
191fcef6be3e5a3df5d7e7e16895f42f994b5c6e3bccd5ba2e8205cee9d13eac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / suken_cite-0.1.10-py3-none-any.whl

Download URL suken_cite-0.1.10-py3-none-any.whl
Size 777.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7b89af4eb7c37727238c642aa0109812e41a4ad0ed99f8d1f14bb6259c02f10
BLAKE2b-256 checksum
How to use checksums
938dc6e96fd8cd3b796b358823b1a63dfdc50fce099025dbd480245151e1b399
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page