- name
SKILL.md
File skill tetap berada di repositori penerbit.
Tempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add FengZhenfei/carrel --skill carrel-search -a cursor -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add FengZhenfei/carrel --skill carrel-search -a claude-code -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add FengZhenfei/carrel --skill carrel-search -a codex -yTempel perintah yang disalin di terminal. Perintah itu memasang SKILL.md ini ke agen tersebut.
npx skills add FengZhenfei/carrel --skill carrel-search -a grok -yKirim pesan yang disalin di chat Grok Bot. Bot mengambil SKILL.md ini dari GitHub dan menambahkannya ke skill yang dipakai bersama oleh semua Bot Anda.
Install this skill: https://github.com/FengZhenfei/carrel/tree/HEAD/skills/carrel-searchDari penerbit
Evidence is retrieved through Carrel's search service (app/kb_search, default port 9810); the agent invoking this skill understands the question, composes the answer, lists the reference files and turns the graph leads into directions the user can ask about next. The service only recalls, reranks and arranges evidence and does no generation. The display name is Carrel-Search and the invocation name is $carrel-search.
The client is scripts/carrel_search.py in this directory (Python 3.9+, standard library only). It defaults to http://127.0.0.1:9810; when the service runs on another machine, set the address and token through environment variables or a config file as described in API and configuration. The skill contains no real token; never read or print one. SKILL_DIR stands for the directory containing this SKILL.md; replace it with the actual absolute path when executing.
python3 "$SKILL_DIR/scripts/carrel_search.py" search --question "<the user's question>"
Every command prints a compact view directly: retrieval status, the text of the sources (each with the file and place it comes from), facts, page summaries and graph leads, and at the end "Reference files", one line per file. Quality and degradation flags remain visible; IDs, scores and debug fields are left out; document text is not: a hit is printed in full and the chunks before and after it follow it. The script keeps the complete response by itself; do not pass --output and do not write scripts of your own to parse it.
What does not fit goes to the next page; nothing is cut off: one output has a size limit, and every page ends by saying what the next page is and how to fetch it (show <call id> --page 2). Where it says "read on", read every page before using the result: reading back the original and listings are always like this, and so is a search whose best sources are too long for the first page, which then says so. Where it says "the full text of the other sources, to be read when useful", the next page holds the lower-ranked sources and neighbouring chunks of a search and may be skipped. An entry too long for a page continues on the next one, which opens with the same label and "(continued from the previous page)". To save room, the path of a file is written in full only the first time and "same file as S1" afterwards, and a table header repeated from an earlier chunk reads "HEADER: same as S3". "chunk 26 of 67" at the end of a source line is its position in the document and the document's length in chunks.
Every entry has a label: S a source, F a fact, P a page, E an entity, R a relation, H the neighbourhood of a subject (H1.2 is its second relation), N a relation returned by a neighbourhood lookup. Later commands point at an entry with --ref <call id>:<label> instead of copying IDs or writing request files; only R cannot be used this way: a relation has two ends and is no starting point, so point at the entity entry of one of its ends. The table gives the subcommand and arguments only; each follows the same script:
Limit the scope with arguments: --kb (repeatable), --top-k, --block-type table (a soft preference for table lookups). Do not hard-code KB numbers and do not assume every knowledge base has a graph. Send commands that do not depend on each other together in one step instead of waiting for them one by one.
On a connection failure (DNS, timeout, 401/403) check the address, the service and the token as described in API and configuration and tell the user the cause; it does not mean the knowledge base has no content.
Use docs --kb ID --name "filename fragment" when the question names a file or version whose exact path is unknown, or asks for an inventory. --dir, --limit and --offset narrow or page the list. A D reference names a registered document: search --question "…" --in-doc a1b2c3:D1. Registration alone does not establish semantic coverage.
Use grep --kb ID --phrase "term" to locate an explicit term, identifier or quotation; repeat --phrase and use --in-doc a1b2c3:D1 when the document is known. The default is eight snippets per phrase; adjust --limit as needed. Read the relevant G hit with context --ref a1b2c3:G1. Phrase counts are analyzer matches, with normalized literal checks on the returned snippets, not exact occurrence counts. No hit is not proof of semantic absence. --history and --as-of preserve the requested time scope.
These are optional routes for file and phrase questions, not prerequisites for every search. Once a file is located, search within it; use semantic search and graph traversal for meaning, summaries and relationships.
search; for explicit files, versions or phrases use the navigation routes above. The service routes and ranks evidence. Graph-source originals use the same S references as direct hits. The skill does not rerank. Preserve model numbers, symbols, abbreviations, file names and negations; name the subjects and dimensions of a comparison. Preserve the user's knowledge-base, document, version and time scope in every follow-up. Use --as-of for the state at a date and --history for successive records. For a report from a particular year, verify the report's year itself; a time filter is not a substitute.context --ref for that place. Read the next page when the compact view shows only an opening. A service-selected relevant excerpt may start inside a chunk; do not treat it as the whole passage.--in-doc; do not query the directory just to obtain a D reference. Use docs only while the file or version remains unresolved.grep for explicit words, identifiers or quotations, scoped to the known document. For missing meaning, conditions or scope, continue with targeted search rather than cycling through synonyms across the whole knowledge base.search --in-doc for that fact. When a subject or comparison dimension still lacks evidence, search for that subject and missing dimension within the original scope, rather than repeatedly rephrasing the whole question.catalog or schema --kb; schema discovery is not a mandatory step for every question.--type or --property when useful, rather than expanding merely to collect more relations.context --ref or the original image when needed. Association across documents does not establish causation or a complete chain by itself.The graph records the relations between entities and the facts under each subject, and connects what is scattered across documents. Actively retrieve the relations needed for the current question as described in "Graph evidence"; turn optional exploration into a few directions the user can pick at a glance.
neighbors (possibly with --type) or a single facts on that one entity; a direction that involves several entities is split into several follow-ups, or reduced to the one that matters most. Prefer those that would add to or change the present answer: the party the present answer speaks about has an entry of its own among the leads, the conditions, limits and exceptions under which the conclusion holds, what it consists of, requires and integrates with, records of the same matter at another time or in another document, places where the leads show documents disagreeing. Leads that have nothing to do with the question are not offered; when nothing among the leads is worth asking about, offer no follow-ups and do not pad. Each follow-up rests on one entity entry among the leads (the label of an H or an E; H1.2 stands for the far end of that relation); remember the label yourself. The "Relations" line (R) only tells which two entities are related: a follow-up it suggests rests on the entry one of its ends has among H or E; when that end has no entry of its own, remember its name and look it up by name when the time comes (neighbors --kb <KB id> --entity <name>, the KB id being in the first line of the result).context --ref before use.--as-of to filter facts and relations by their occurrence or effective time; use --history to include records outside that scope. Publication date and experiment/reporting period are different: a later paper can describe an earlier experiment. period_text preserves the stated window and time_source identifies an inherited document/section quote. A full-period result is dated at the end of its reporting window; an experiment ending does not invalidate its historical settings or measurements. Source text can still mention events after the cutoff: check the relevant passage and do not present an unfinished window's aggregate as already completed. Explicit local dates take precedence over inherited context; definitions need no event date.context --ref takes the fact's label.
Historical series summaries contain facts recorded at graph-build time, may include superseded values and do not establish a complete history. The compact view signals that a summary exists without displaying values that lack per-entry quality; the full response keeps series_text, available through . Use it as a lead, and compare independent facts or original passages; query historical facts when the needed evidence is missing. Before comparing, confirm subject, property, convertible units, comparable conditions, record time and validity period. Use for , , , reference ranges and flags when needed. A document's own ranges and flags describe its criteria, not a general standard. means the source chunks are active, not human approval. An awaiting-verification value is not a settled conclusion; a not-directly-comparable flag prevents numerical trend calculations without invalidating textual facts. Present conflicting records and conditions side by side. For a reading conflict, check the text and extracted readings; do not guess a reading absent from the response. Inactive sources are not current grounds.Give the answer and reference files first, then check the graph leads already returned. When a relevant direction qualifies and the answer has not covered it, include numbered follow-ups; omit them only when none qualify. Write all of it, headings included, in the language the user writes in. Every conclusion in the answer rests on the retrieved result; call ids, labels and IDs of any kind are for later commands only and stay out of the answer.
The answer. The first sentence is the conclusion or the content the user asked for; after it, arrange the evidence into one coherent reply. When the user asked several things at once, each gets its own direct sentence. Use checked evidence needed for this question. Put unexplored one-hop leads in the follow-ups according to the rules below.
Reference files. A new paragraph after the answer: the heading "Reference files" in bold, and under it a bulleted list with one item for each file the answer actually used. Copy the path of that file from the "Reference files" block at the end of the result, the part before ←, as it is: a plain-text path that starts at the knowledge base's top-level folder. Add no page or section, do not rewrite or shorten the path, do not put server-side directories in the answer, and do not invent links or document URLs. Files the answer did not use are not listed; with more than ten, list the ten that matter most and say how many more there are.
Follow-up options. Check the finished answer against the graph leads already returned. Keep a direction only when it is relevant to the current question, asks a specific question the answer has not covered, and has a relation or fact to look up for the matching entity. Exclude candidates that are answered, unrelated or lack a lookup starting point; if any qualify, list them rather than omitting all options just because the body is complete. An entity name alone is not enough; merely mentioning an entity in the answer does not answer questions about its specific attributes, conditions or relations. If a candidate contains several subquestions, remove the answered parts and keep only the unanswered parts. Drop paraphrases of answered questions, resolve the current question's required evidence gaps this turn, and do not run extra searches just to create options.
Use only the search, context, catalog, graph and image reading endpoints, always through the client in this directory. On connection failure, check the configuration and report the cause; do not restart the service, change parameters, parse, build graphs or modify the knowledge base on your own. Respect the query scope set by the user; this skill is not responsible for production management or console functions. Correction rules are applied by the service; the skill neither reads their backend files nor writes corrections.
Graph assertions retain polarity, target_polarity, modality, and conditions. Read these qualifiers together with the relation; quality_state=needs_review calls for checking its source. fact_kind distinguishes observations, continuing states, and general reference facts. A newer observation does not invalidate an earlier one.
Query the user's local knowledge bases through the Carrel search API, use original text and source images as needed in the answer, list the reference files and offer follow-up directions drawn from th
---name: carrel-searchdescription: Query the user's local knowledge bases through the Carrel search API, use original text and source images as…---# skills/carrel-search/SKILL.mdRingkasan umum
Query the user's local knowledge bases through the Carrel search API, use original text and source images as needed in the answer, list the reference files and offer follow-up directions drawn from the knowledge graph. Use when the user asks to search the knowledge base, find evidence in the stored material, compare records, or answer from several documents together.
FAQ
Unduh skills/carrel-search/SKILL.md dari penerbit, atau salin path-nya dan buka repositori. PlugMCP hanya mendaftar skill ini dan tidak meng-host filenya.
Penerbit menyimpannya di https://github.com/FengZhenfei/carrel.
Claude, Cursor, Codex, dan Grok Build bisa membaca SKILL.md yang Anda tambahkan dari repositori penerbit. Grok Bot memasangnya saat Anda mengirim tautan folder GitHub skill tersebut di chat.
| Look back in time | search, grep, neighbors and facts accept --as-of 2024 (year/month forms use the last day) or --history (include superseded, expired and archived records with status flags) |
| Inspect types and coverage | catalog includes graph overviews; use schema --kb <KB id> for type inheritance and relation definitions, and stats --kb <KB id> for coverage and time spans |
| See the full text or every field of an entry | show a1b2c3:S9 a1b2c3:S13 (full text for sources and pages, every field for the rest); show a1b2c3 prints the compact view of that call again and show a1b2c3 --page 2 its next page |
neighborsfactsimage --ref, cropping if needed. Do not fetch extra images for conclusions already supported by text.context --whole or the listing commands. For overviews and scope comparisons, fill the important factual gaps without expanding into a line-by-line audit.catalog and search the relevant scope. Weak or widened routing alone does not establish a scope error.part_of and the like) or "the graph shows".→ means the current entity is the subject, ← that the far end is, — an undirected association from which neither subject and object nor causality is inferred. The entries of the "Relations" line of a search result are all joined by — because no direction is given there; do not read subject and object from their order either.--entity-id. Other entities with the same name are listed at the top; when the lookup landed on the wrong one, take another. External identifiers from the material can also be looked up as names. After a rebuild invalidates an old entity reference, relocate it by name within the original scope and check same-named candidates; a stale reference does not establish that the material is absent.showshowkindscomparableunit_canonicalsource_validimage --ref first; which pictures to look at is yours to decide, and for each you should be able to say what it is to confirm. crop a part when the text in the picture is hard to read; when the original itself is low in resolution and cropping does not help, say plainly that it cannot be read. For one marked as having conflicts between the text in the picture and estimated readings, check the actual figure text. After inspecting an image that helps explain the answer, embed its returned local path or display_markdown beside the relevant paragraph. Enclose paths containing spaces in angle brackets. Add a short caption naming the original file and known figure/page; label crops as source-image crops and still list the original document in Reference files. If embedding is unavailable, provide an attachment or local link. An authenticated API URL is not a public image URL. Downloading is not viewing; fetch only images that serve the question.← being those that come from each file. For a question with several subjects or documents, check the requested facts and conditions item by item, not just the presence of files; fill specific gaps through the answer flow and state what remains unresolved; a multi-document question can add --top-k 20 to leave enough slots. The number of hits is no proof of completeness over the whole knowledge base: "the knowledge base has nothing on …" is a conclusion that needs a lookup behind it, and where you have not specifically looked, say which side the material comes from and what it covers, and do not say the knowledge base holds no other account.schema --kb <KB id> for type inheritance and relationship definitions, or stats --kb <KB id> for coverage. Entities support --kind instance/class/all. Search, neighbors, and facts default to current evidence; use --history for superseded records or --as-of YYYY-MM-DD for a historical date.
Both commands need a knowledge base (--kb): the one the search routed to, or one whose entity types in catalog include the type wanted. Type names were induced when the graph was built and may not be in the user's language: match them by meaning instead of repeating the user's wording.
List entities with entities --kb <KB id> --type <type name> (or the upper class --upper, or a name with --name): take the type name from the type in brackets after an entity in the search result, or from the entity types catalog lists; the output starts with the number of entities per type. The path after each line is the document that mentions the entity most. Query facts with facts: --subject name or --ref returns the facts under that subject, and the properties line at the top lists which properties it has; add --property for one property; --property alone goes across subjects. --in-doc <ref> scopes facts to a document, and --conflict-only selects cross-document conflict groups.
"N in all" is the number of matches, 50 to a page by default; page with --offset when one page is not enough. When the total is still in the hundreds after narrowing, answer with the first page and state the total and how many are not listed. The lists come from the graph: the entities and facts the model registered at build time, with omissions, duplicates and noise. Write "the graph registers N of them", not "the documents contain N".1., 2., 3.; even a single option starts with 1.. Each item asks one specific question, names the entity and the relation or fact to explore, and retains its lookup starting point for when the user replies with a number. Do not combine directions into an unnumbered "you could also explore …" sentence or answer those directions now.Roughly like this (it shows the form only; do not copy the wording):
A few places are worth following up; reply with a number:
- How the other party itself describes this — the above is one side's account.
- What this plan depends on to be put into practice.
- What parts it consists of and what each is for.