AGENT SKILL

rag-applications

Compose and validate LEANN RAG workflows for documents, code, personal or live data, semantic file search, images, and visual PDFs without exposing private data or triggering heavy setup.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
rag-applications
license
MIT
metadata
{ "disco-role": "operating" }
description
Compose and validate LEANN RAG workflows for documents, code, personal or live data, semantic file search, images, and visual PDFs without exposing private data or triggering heavy setup.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

LEANN RAG Applications

Use this sub-skill to turn a source into LEANN passages, preserve useful metadata, build a searchable index, and choose retrieval or chat. Start with a small bounded sample and keep private, live, and multimodal sources opt-in.

Route by source

  • For PDF/TXT/Markdown documents, code repositories, or mixed code and prose, use document and code RAG.
  • For browser history, Apple Mail, Apple Calendar, iMessage, existing WeChat exports, Slack, or Twitter/X, use personal and live data.
  • For CLIP image retrieval or ColQwen2/ColPali visual-PDF retrieval, use multimodal RAG.
  • For chunk sizes, Abstract Syntax Tree (AST) fallback, file layout, ignore rules, metadata schemas, filters, or temporal search, use chunking, metadata, and layout.
  • For parser, permission, export, Model Context Protocol (MCP), PDF, image, dependency, or empty-corpus failures, use troubleshooting.
  • To produce a validated public leann command without executing it, use the bundled command planner.

Operating sequence

  1. Classify the source as local public files, private local data, live MCP data, image data, or vision-PDF data. State platform, permissions, export format, dependency, model-cache, and compute prerequisites before access.
  2. Define a passage contract: non-empty text plus a flat metadata mapping. Select stable source identifiers and use one field name and type per concept.
  3. Load a bounded sample. Exclude hidden, ignored, generated, oversized, empty, corrupt, or unsupported inputs before chunking.
  4. Chunk prose traditionally; use AST-aware chunking only for supported code. Keep the deterministic traditional fallback enabled.
  5. Validate counts and inspect representative passage text and metadata. Stop if zero passages, required source identity is missing, or chunk metadata no longer matches its text.
  6. Build, then search with a query whose expected source is known. Add metadata or time filters only after verifying those fields exist in stored passages.
  7. Add chat only after retrieval is sound. Provider, credential, and model selection belongs to the provider sub-skill.

Safety rules

  • Never export private platform data, open private databases, start an MCP server, read credentials, install system packages, or download models merely to plan a workflow.
  • Never print secrets or include them in generated commands. Pass credentials through the provider or server's documented environment only when the user separately authorizes execution.
  • Treat Slack and Twitter/X readers, Spotlight collection, image encoders, and visual-PDF models as reference-only here. Preflight them; do not run them.
  • Treat an existing WeChat export as input. Do not invoke an exporter or attempt to modify a running client.
  • Do not force rebuilds or include hidden files by default. Preserve the source corpus and write indexes to a separate destination.

Boundaries

  • Backend choice, graph/search parameters, compact storage, recomputation, and index updates: backends and storage.
  • Embedding modes, model caches, API credentials, prompt templates, and LLM/chat providers: embeddings and chat.
  • MCP protocol details, server installation, transport, and deployment: MCP and services.
  • General Python builder/searcher lifecycle and custom precomputed-vector code: API and indexing.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-triton-opt

Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-solve

END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-skill

PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-pattern-fusion

Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-orchestrate

Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

passnet-feedback

Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).

★ 351