视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
document-indexing【文档与办公】Guides Semantra text and PDF preprocessing, window configuration, cache artifact inspection, and no-server indexing workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill when the task is to prepare local text or PDF files for Semantra, choose chunk windows, control the Semantra cache directory, inspect cached artifacts, or troubleshoot preprocessing before the interactive web UI is used.
semantra over one file, many files, *.txt, or a
PDF collection.--no-server.--windows, --encoding, --force, --semantra-dir, or
--show-semantra-dir means.Route model/backend questions to models-and-embeddings. Route query syntax, result interpretation, preference tags, web API, or local server behavior to interactive-search.
Confirm that Semantra is installed and the CLI is visible. From a normal user environment, prefer:
semantra --help
semantra --list-models
semantra --show-semantra-dir
Decide where processed artifacts should live. If the user does not care, let Semantra use its application cache directory. For reproducible tasks, pass an explicit cache directory:
semantra --semantra-dir ./semantra-cache --no-server documents/*.txt
Choose documents. Semantra accepts one or more existing filenames. It reads
.pdf files through its PDF path and treats other filenames as text using
the selected encoding.
Choose a model with the sibling models-and-embeddings sub-skill before launching a large job. Local transformer models may download model files the first time; OpenAI mode requires credentials and sends text to an external API.
Use --no-server for preprocessing-only jobs. Omit it when the next step is
interactive search in the local browser UI.
Validate the result without relying on the source checkout:
python path/to/inspect_semantra_cache.py --cache-dir ./semantra-cache
Expect at least a config JSON, token JSON, embedding binary, and usually an Annoy index for each processed document/config/window combination.
Semantra's default --windows 128_0_16 means windows of 128 tokens, initial
offset 0, and a rewind/overlap of 16 tokens. The CLI accepts comma-separated
window specs:
128 -> (size=128, offset=0, rewind=0).128_0_16 -> (size=128, offset=0, rewind=16).64_8 -> (size=64, offset=8, rewind=0).Only the first configured window is used by the query routes in this Semantra version; extra windows can still be processed and cached. Use smaller windows for short, precise excerpts and larger windows for more context. Increase rewind when important passages are often split across window boundaries.
Semantra hashes both document content and model/window configuration. A document
can have multiple cache groups if you change model, tokens, windows, Annoy tree
count, encoding, or Semantra version. Use --force when the cache exists but
must be rebuilt. Before deleting artifacts, inspect the cache and identify the
matching document/config group in cache-and-data-formats.md.
For PDFs, Semantra extracts text and stores page-position metadata used by the web viewer. If the PDF opens but navigation/highlighting is wrong, distinguish between: