Logo Virtuoso Librarian

Virtuoso Librarian

Cộng đồng
Arcadia-1
virtuoso-librarian

Di chuyển, sao chép, đóng gói, lưu trữ, tách hoặc sắp xếp lại các cell và thư viện Cadence Virtuoso ở cấp dữ liệu thiết kế. Dùng kỹ năng này khi người dùng muốn: sao chép TB sang thư viện khác, tái tạo độc lập một mô phỏng trong thư viện mới, bàn giao thiết kế, chuẩn bị kho lưu trữ tapeout, tách một cell TB thành nhiều cell, chuyển một block giữa các thư viện hoặc liệt kê toàn bộ hệ thống phân cấp tham chiếu của thiết kế. Hãy xem đây là "thủ thư" cho không gian làm việc Virtuoso của bạn — kỹ năng này biết cell nào thuộc cùng nhóm, cách di chuyển chúng mà không làm hỏng các liên kết cấu hình và cách phân biệt cell của dự án với tham chiếu PDK / std-cell / analogLib.

Tổng quan

Nhà phát hànhArcadia-1
Kho mãanalog-agents
Tên kỹ năngvirtuoso-librarian
Sao
84
Bản fork
19
Tệp đi kèm
3
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được Arcadia-1 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Virtuoso Librarian trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Arcadia-1/analog-agents/tree/main/skills/virtuoso-librarian
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Arcadia-1/analog-agents.git /tmp/analog-agents
mkdir -p .claude/skills
cp -r /tmp/analog-agents/skills/virtuoso-librarian .claude/skills/virtuoso-librarian
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Virtuoso Librarian trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Virtuoso Librarian ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Virtuoso Librarian với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

virtuoso-librarian

Move / clone / reorganize Virtuoso designs at the library level. The ground-floor operation is clone a TB + every project cell it transitively references into a target library, leaving PDK / std-cell / analogLib references untouched, such that the new library simulates identically in isolation.

When to use this skill

Trigger phrases (rough):

  • "把 TB X 复制到 Y 库" / "copy this testbench to "
  • "让 X 在新库里独立复现仿真"
  • "把设计打包交付"
  • "把一个 TB 拆成几个独立 cell"
  • "归档这个设计"

If it's just "rename a TB within the same library" without hierarchy concerns, the virtuoso skill's references/testbench-duplication.md covers the minimal steps. Use this skill when the DUT hierarchy also needs to move.

The canonical tool

bash
python <skill-path>/scripts/tb_clone/clone_tb_full.py \
  SRC_LIB SRC_CELL DST_LIB

Or from Python:

python
import sys
sys.path.insert(0, "<skill-path>/scripts/tb_clone")
from tb_clone_lib import clone_tb_full, scan_hierarchy, rebind_instance
clone_tb_full(client, "PLAYGROUND_AGENTS", "_TB_AMP", "Noisy_Past_Design")

What it does end-to-end:

  1. Walks the TB schematic recursively, collects every (lib, cell).
  2. Classifies each as project-owned (copy to DST) or external (keep reference). External = analogLib, basic, any lib matching ^tsmc, ^tcbn\d+, ^smic, ^gf\d+, etc. See is_external_lib.
  3. For every project cell: rsync -a --exclude='*.cdslck*' --exclude='*%' the whole cell directory, deref SOS symlinks in master.tag, chmod u+w. For TBs also wipes results/ and auto-run snapshots in test_states/.
  4. Patches config/expand.cfg (design + sub-cell bindings).
  5. Patches maestro/maestro.sdb, active.state, and test_states/*.state — scoped substitution on <value>LIB</value> and "LIB" only, never on path strings.
  6. For every copied cell's schematic, replays dbDeleteObject(inst) + dbCreateInst(cv new_master name xy orient) on every instance whose master was in a project lib. Multi-level — TB + DUT + DUT-of-DUT all get rebound.
  7. Verifies zero stale project-lib references remain.

Why the tool exists (6 hard-earned constraints)

All earned the hard way during the 2026-04-20 session cloning 8 TBs (7 from PLAYGROUND_AGENTS + 1 from GM2026) into Noisy_Past_Design.

1. External-lib filter must be pattern-based, not a name list

TSMC adds HVT/LVT/ULVT track variants continuously. Hardcoding {"tcbn28hpcplusbwp12t30p140"} misses tcbn28hpcplusbwp12t30p140hvt and every future variant. Use regex: ^tsmc, ^tcbn\d+, ^smic, ^gf\d+. The tool does.

Symptom if missed: std-cell library gets "copied" into the destination (30+ cells like BUFFD8BWP12T30P140HVT). Obvious smell: library-named files named like PDK conventions appear under your project library root.

2. dbReplaceHierInst / dbReplaceMaster / dbSetInstMaster DON'T WORK on IC6.1.8

Nor does inst~>libName = "NewLib". All silently succeed with no effect. Tested at both the individual Instance level and the InstHeader level (ih~>libName = "X") — reading back immediately after assignment still yields the old value. libName is effectively read-only in IC6.1.8's db layer. The only mechanism that rebinds instance masters is delete-and-recreate:

skill
xy     = inst~>xy
orient = inst~>orient
; NOTE: dbProp's type accessor is `~>valueType`, NOT `~>type`.
; `~>type` silently returns nil for every prop -> snapshot becomes
; empty and dbReplaceProp later errors with `sprintf: argument #2 is nil`.
; Real accessors (via p~>?): cellView objType prop enum name object
; range value valueType assocTextDisplays.
props  = mapcar(lambda((p) list(p~>name p~>valueType p~>value)) inst~>prop)
new_master = dbOpenCellViewByType(dst_lib dut_cell view nil "r")
dbDeleteObject(inst)
new_inst = dbCreateInst(cv new_master inst_name xy orient)
foreach(p props
  when(and(nth(0 p) nth(1 p))      ; skip system props with nil name/valueType
    dbReplaceProp(new_inst nth(0 p) nth(1 p) nth(2 p))))

Bus-syntax names (I21<1:0>, I127<20:1>) pass as normal strings. The instance usually binds to symbol view, not schematic — read inst~>master~>viewName before rebinding.

Must preserve inst~>prop across delete+create. dbCreateInst builds a fresh instance with only the master's CDF defaults, so any per-instance override is wiped silently. Real examples seen: nlAction="ignore" (device-exclude flag — losing it re-injects intentionally-excluded instances into the netlist, changing sim results), vtrans_clk=... (ahdlLib S&H threshold override), per-inst transistor sizing. Keep prop values in-SKILL the whole time — never round-trip through strings, since sprintf "%L" quotes for display and can't be read back as the original float/int/list. Guard against props with nil name or type (system/internal props that dbReplaceProp rejects — you'll see *Error* fprintf/sprintf: ... argument #2 is nil spam).

3. Copy with rsync --exclude, never cp -r + cleanup

Source libs are often held by other users with .cdslck lock files (e.g., sch.oa.cdslck.RHEL30.thu-ming.186048). If those lock files touch disk at the destination even briefly, Cadence's DD caches "this cellview is being edited by someone else" and subsequent dbOpenCellViewByType('a') calls silently return nil, making every rebind fail.

rsync -a --exclude='*.cdslck' --exclude='*.cdslck.*' --exclude='*%' filters at source — the junk never touches destination disk.

4. Copy whole cell directory, not per-view

cp -r srclib/cell/schematic dstlib/cell/schematic fails silently when dstlib/cell/ doesn't exist yet. rsync with trailing slashes (src/ dst/) creates the parent.

5. Configs may not exist; patching must be conditional

Some TBs bind their maestro directly to schematic (no config view at all). patch_expand_cfg probes and skips cleanly in that case.

6. Nested SKILL with let + if/when + return crashes silently

SKILL's return inside deep let/when/if branches doesn't always unwind properly. Use explicit if/then/else with a status variable. Flat let + when inside foreach is safe though — that's what the batched rebind_all_in_cell relies on. The harder failure mode to avoid is return from nested branches.

7. Bridge's \n handling is non-deterministic; separate records with ;;

virtuoso-bridge-lite's response serializer sometimes returns a SKILL sprintf(nil "%s\\n" ...) as literal backslash-n, sometimes converts newlines to single spaces. The same exact SKILL code can return different separators across calls. A parser that splits on \\n then silently returns one giant line as a single record, so stale_instances underreports and rebind silently misses ~40% of its work while still logging ✓ clean. Emit multi-record SKILL output with a dedicated separator like ;; that's opaque to any whitespace rewrite.

8. Walk hierarchy via instHeaders, not instances + inst~>master

foreach(inst cv~>instances when(inst~>master ...)) skips any inst whose master can't be resolved at open time — e.g. a Verilog-A-only child cell referenced from the parent as symbol, where Cadence fails the lookup and inst~>master is nil. Those insts silently drop out of scan/stale lists. cv~>instHeaders carries the declared (libName, cellName, viewName) triple regardless of resolvability, so every declared ref is visible. Both scan_hierarchy and list_instances use the instHeaders path.

9. Prop snapshot: use p~>valueType, never p~>type

On IC6.1.8 every dbProp's ~>type slot returns nil (real slot is ~>valueType returning "string" | "int" | "float" | "boolean" | "ILList"). Accessor list via p~>?: (cellView objType prop enum name object range value valueType assocTextDisplays). A naive prop-copy that reads ~>type captures nothing AND triggers *Error* fprintf/sprintf: ... argument #2 is nil when later fed to dbReplaceProp.

10. Cadence's open-time auto-remap drops inst props silently

When dbOpenCellViewByType opens a freshly-rsynced dst cellview whose insts' declared libs now have local equivalents in the dst library (because we just copied them), Cadence rewrites those header refs to point at the local copies — a hidden "auto-remap" pass. During that pass some insts' ~>prop overrides are silently discarded. Empirically the loss is inst-specific and unpredictable: two scalar insts in the same cell with the same master-lib can behave differently; one survives, one gets wiped. Reading props from the dst cv after the open is therefore unreliable as a source-of-truth.

Workaround: capture inst-level props from the source cellview (which never triggers the remap — its refs already resolve in-place) and re-apply by inst-name to dst after rebind. This is what sync_props_src_to_dst does. Only sync for insts whose master lib is in project_libs: PDK/analogLib etc. insts don't trigger the remap (the declared lib has no dst-local equivalent) so rsync's byte-identical copy already carries their props intact — syncing them would be wasted work and semantically wrong (not our data).

11. SOS-managed sources: dereference every symlink in dst, not just master.tag

Cliosoft SOS-managed libs (FIRAS, 2025_CMFE, ...) store data.dm, *.oa, and other artifacts as symlinks into a shared cache (/home/dmanager/sos_cache/SOS_T28.cac/...). rsync preserves the symlinks by default. If data.dm lands in the dst lib still pointing to the read-only cache, Cadence's dbOpenCellViewByType in "a" mode succeeds in READ-mode semantics but can't commit writes. dbDeleteObject + dbCreateInst then silently no-op, rebind reports ok=0 fail=0 with no log line, and cells end up with stale refs. The old rule (only deref master.tag) was learned on non-SOS libs; for SOS sources you must find {dst} -type l | while read ln; do cp --remove-destination -L "$ln" "$ln.tmp" && mv "$ln.tmp" "$ln"; done to replace ALL symlinks with regular file copies before Cadence touches the lib.

12. Same cell name in two source libs silently collapses to first-copied

cp_cell_dir skips when the destination already has a cell of the same name. If two project libs contribute a cell with the same name (e.g. FCT2026/L4_SWITCH_4 and FFCT_ICTDSM/L4_SWITCH_4 both referenced in one clone), the second source is silently skipped and every instance that pointed to either one gets rebound to the single dst copy. When the two sources happen to be byte-identical (shared block drop), this is fine. When they differ, sim behavior changes without warning. We've only observed the identical case in real designs; if you hit a divergent collision, either rename one source cell or sequence clones so only one variant feeds the dst.

14. Must schCheck after rebind or sim fails with "check and save"

After we flip inst masters via delete+create and re-apply props, the cell's extracted view (the hierarchical netlist cache Maestro / spectre uses) is stale — it still reflects the pre-rebind hierarchy. dbSave alone doesn't refresh it. The user then opens Maestro, hits run, and gets Error: check and save required on every modified schematic. They'd have to hand-open each cell in Virtuoso and press Check&Save before sim can start.

schCheck(cv) regenerates the extracted view from the schematic, which is what "Check and Save" does. It must run on every cell we modified.

sync_props_batch calls it just before its per-cell dbSave — free ride since the cv is already open. Don't remove it even if the DB-270212 cellview does not exist warnings come back: those are schCheck recursively opening every child schematic for hierarchy validation, and leaf cells (PDK primitives, Verilog-A blocks, analogLib sources) legitimately don't have a schematic view. The warnings are noise; the alternative is manual UI clicks per cell, which is worse.

13. Exclude PEX-output views from rsync (calibre_*, av_extracted, starrc_*)

Post-layout parasitic-extraction views live inside the cell directory alongside schematic/ and layout/ — e.g. calibre_r/, calibre_cc/, av_extracted/, starrc_*/. Each can be hundreds of MB (sometimes GB) per cell because the extracted view includes every parasitic R/C as a separate dbProp bag. For a schematic-level library clone they have zero value: any layout change invalidates the extraction, and the user will re-run PEX in the new library context anyway. Excluding them at rsync time turns a cell that would take 30s to copy into a sub-second copy, and makes the overall clone scale with the actual schematic/symbol/layout content rather than with the extraction history.

Patterns currently filtered: --exclude='calibre_*' --exclude='av_extracted' --exclude='av_netlist' --exclude='starrc_*'

Add your site's PEX tool outputs if you use something else (e.g. Quantus qrc_*, Synopsys hspicelnetlist, ...).

Reference

  • references/testbench-duplication.md (in this skill) — the deep mechanics doc: data.dm binary prop bag format, maestro.sdb XML surgery, SOS metadata (*%, symlink master.tag), dbCopyCellView quirks, per-step sed patterns. The tool scripts implement what this doc teaches.
  • For general SKILL / Maestro / schematic / layout API reference, use the global virtuoso skill's references/ (maestro-skill-api, schematic-skill-api, layout-skill-api, etc.).
  • Tool internals rely on virtuoso-bridge-lite primitives: client.execute_skill(), client.run_shell_command(), client.download_file(), client.upload_file().

Files in this skill

virtuoso-librarian/
├── SKILL.md
└── scripts/
    └── tb_clone/
        ├── clone_tb_full.py   (~40 lines, CLI driver)
        └── tb_clone_lib.py    (~300 lines, single-purpose helpers)

Each helper function in tb_clone_lib.py is 10-30 lines and single-purpose — scan_hierarchy, classify_pairs, cp_cell_dir, patch_expand_cfg, patch_maestro_files, rebind_instance, rebind_all_in_cell, clear_all_cdslck_in_lib. Read the docstrings before modifying; they encode the "why" for each constraint above.

Typical failure modes and recoveries

SymptomCauseFix
rebind in X: ok=0 fail=NStale .cdslck at destinationclear_all_cdslck_in_lib(client, dst_lib) then rerun; check source library for locks you didn't know about
STALE remaining in X: [...] shows a cell whose lib isn't in project_libsThe cell was in a library not classified as project (e.g., an IP drop not matching patterns)Either add the lib to _EXTERNAL_PATTERNS (if it's really a PDK/IP-drop) or to your project set (will then get copied)
"no-new-master"Target cell wasn't copied, OR a required view (usually symbol) missing at destinationCheck ddGetObj(dst_lib cell)~>views~>name; rerun the copy step for that specific cell
30+ PDK-named cells in destinationis_external_lib filter let them throughHotfix: rm -rf them, extend _EXTERNAL_PATTERNS, rerun
Scripts see fewer project cells than expectedSource lib not in cds.lib → scan can't descend into its cellsAdd library definitions to cds.lib, then rerun scan (tool's ddReleaseObj(ddGetLibList()) idiom forces reload)

Related workflow: history cleanup

After packaging, the destination maestros still carry per-run history pointers in maestro.sdb and auto-saved states in test_states/. These are harmless but clutter the history picker. If the user wants a clean package, use the companion cleaner — see virtuoso skill's references/testbench-duplication.md for the "clean only the latest history" approach, or ask; a similar clean_maestro_history.py exists in project logs from the same session.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Virtuoso Librarian làm được gì?

Di chuyển, sao chép, đóng gói, lưu trữ, tách hoặc sắp xếp lại các cell và thư viện Cadence Virtuoso ở cấp dữ liệu thiết kế. Dùng kỹ năng này khi người dùng muốn: sao chép TB sang thư viện khác, tái tạo độc lập một mô phỏng trong thư viện mới, bàn giao thiết kế, chuẩn bị kho lưu trữ tapeout, tách một cell TB thành nhiều cell, chuyển một block giữa các thư viện hoặc liệt kê toàn bộ hệ thống phân cấp tham chiếu của thiết kế. Hãy xem đây là "thủ thư" cho không gian làm việc Virtuoso của bạn — kỹ năng này biết cell nào thuộc cùng nhóm, cách di chuyển chúng mà không làm hỏng các liên kết cấu hình...

Vì sao nên dùng Virtuoso Librarian trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Virtuoso Librarian là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Virtuoso Librarian trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Arcadia-1/analog-agents/tree/main/skills/virtuoso-librarian. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Virtuoso Librarian?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Virtuoso Librarian với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Virtuoso Librarian với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Virtuoso Librarian có miễn phí không?

Kỹ năng này được Arcadia-1 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇