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. Truyện được vẽ trên khung UI có sẵn — trục thời gian hoặc chuỗi nhân quả, cùng các khung so sánh, mâu thuẫn, trạng thái, chỗ hổng… — thay cho đoạn văn; người đọc nhận một link và đi từng bước bằng ◀ ▶. - 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; thêm --tab để lưu đúng tab đang mở (đã bấm mở rộng, đã cuộn) |
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 story --template timeline|argument |
in khung truyện trống; điền xong thì story --id … --json … kiểm và lưu — còn thiếu trường hay chữ quá dài thì từ chối và nói rõ ô nào |
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, mọi truyệ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.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| suken_cite-0.1.13.tar.gz | 775.6 kB | Without provenance | Details for suken_cite-0.1.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| suken_cite-0.1.13-py3-none-any.whl | Python 3 | none | any | Details for suken_cite-0.1.13-py3-none-any.whl |
Total release size: 1.6 MB
Release files / suken_cite-0.1.13.tar.gz
| Download URL | suken_cite-0.1.13.tar.gz |
|---|---|
| Size | 775.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b4d80cfd05833a3b7c85692981b9da5d0e5d74e03334e3b6380f85f93baa800
|
|
BLAKE2b-256 checksum How to use checksums |
121845e4baf0f50730ef95e11f0bdeb21f8e3584016b8f1a622babb08c47dbd8
|
| 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.13-py3-none-any.whl
| Download URL | suken_cite-0.1.13-py3-none-any.whl |
|---|---|
| Size | 791.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
316122d9b07c491d3f5c3de09d9b4cd3ed8cb4d5fb8cc393c5b58cec41198cc8
|
|
BLAKE2b-256 checksum How to use checksums |
d82dcd8f3abc92658f45a0c8110dff10be9607c578b611df118536052fbbad39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.3
|
Security for suken-cite 0.1.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.