用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/llama-farm/claude-code-marketplace --skill derived-from-description命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| description | Generate or modify LlamaFarm configuration from natural language description |
| disable-model-invocation | true |
| allowed-tools | ["Bash","Read","Write"] |
| argument-hint | <description of project or changes> |
Generate or modify LlamaFarm configurations from natural language descriptions.
/llamafarm:config <description of project or changes>
/llamafarm:config I want to chat with FDA correspondence PDFs using llama3.1
/llamafarm:config Add a second database for archived documents with hybrid search
/llamafarm:config Change the chunking strategy to semantic with 1000 char chunks
/llamafarm:config I have markdown docs and want keyword extraction
/llamafarm:config Switch from Universal Runtime to Ollama
/llamafarm:config Add entity extraction for organizations and dates
/llamafarm:validate internallyWhen the user runs /llamafarm:config <description>, follow these steps:
Determine if this is:
llamafarm.yamlKeywords that indicate new project:
Keywords that indicate modification:
Reference the skill for:
| User Says | Pattern to Use |
|---|---|
| PDF, documents, regulatory, FDA, legal | PDF Documents pattern |
| markdown, notes, docs, README | Markdown/Text Notes pattern |
| mixed, various, multiple formats | Mixed Formats pattern |
| code, source, technical, logs | Code/Technical pattern |
| large, complex, ordinance | Large Complex PDFs pattern |
For new projects, generate complete config:
version: v1
name: <derived-from-description>
namespace: default
runtime:
models:
- name: default
description: "<description-based>"
provider: <universal|ollama|openai>
model: <appropriate-model>
base_url: <appropriate-url>
default: true
prompt_format: unstructured
prompts:
- name: default
messages:
- role: system
content: |
<context-appropriate-system-prompt>
rag:
default_database: main_db
databases:
- name: main_db
type: ChromaStore
config:
collection_name: documents
distance_function: cosine
persist_directory: ./data/main_db
embedding_strategies:
- name: default_embeddings
For modifications, read existing config, make targeted changes, preserve structure.
Always run validation before presenting:
# Save to temp file and validate
lf projects validate --config /tmp/generated-config.yaml
If validation fails, fix the issues and regenerate.
Generated LlamaFarm Configuration
=================================
[YAML config here]
---
Next Steps:
1. Save this as `llamafarm.yaml` in your project directory
2. Run: lf start
3. Create your dataset: lf datasets create -s <strategy> -b main_db <dataset-name>
4. Upload files: lf datasets upload <dataset-name> ./path/to/files/*
5. Process: lf datasets process <dataset-name>
6. Chat: lf chat "Your question here"
runtime:
models:
- name: default
provider: universal
base_url: http://127.0.0.1:11540/v1
model: unsloth/Qwen3-4B-GGUF:Q4_K_M
model_api_parameters:
temperature: 0.2
prompts:
- name: default
messages:
- role: system
content: |
You are an expert assistant. Always cite specific document sections.
If information cannot be found in the context, state that clearly.
rag:
data_processing_strategies:
- name: pdf_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf", "*.PDF"]
priority: 100
config:
chunk_size: 1200
chunk_overlap: 150
chunk_strategy: semantic
extract_metadata: true
extract_tables: true
- type:
[, ]
[, , , ]
rag:
data_processing_strategies:
- name: markdown_processor
parsers:
- type: MarkdownParser_LlamaIndex
file_include_patterns: ["*.md", "*.markdown", "README*"]
priority: 100
config:
chunk_size: 400
chunk_overlap: 40
chunk_strategy: headings
- type: TextParser_Python
file_include_patterns: ["*.txt"]
priority: 90
config:
chunk_size: 400
chunk_overlap: 40
extractors:
- type: HeadingExtractor
config:
max_level: 6
include_hierarchy: true
- type: LinkExtractor
config:
extract_urls: true
- type: ContentStatisticsExtractor
rag:
databases:
- name: mixed_db
retrieval_strategies:
- name: hybrid_search
type: HybridUniversalStrategy
config:
strategies:
- type: BasicSimilarityStrategy
config:
top_k: 8
weight: 0.6
combination_method: weighted_average
final_k: 10
default: true
data_processing_strategies:
- name: universal_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf"]
priority: 100
- type: MarkdownParser_LlamaIndex
file_include_patterns: ["*.md"]
priority: 100
- type: DocxParser_LlamaIndex
file_include_patterns: ["*.docx"]
priority:
[]
[, , ]
rag:
data_processing_strategies:
- name: code_processor
parsers:
- type: TextParser_LlamaIndex
file_include_patterns: ["*.py", "*.js", "*.ts", "*.go", "*.java"]
priority: 100
config:
chunk_size: 600
chunk_strategy: code
preserve_code_structure: true
detect_language: true
extractors:
- type: PatternExtractor
config:
predefined_patterns: [email, url, version]
custom_patterns:
- name: function_def
pattern: "def\\s+\\w+\\s*\\("
description: "Python function definitions"
- name: class_def
pattern: "class\\s+\\w+[\\(\\:]"
description: "Class definitions"
-
rag:
data_processing_strategies:
- name: large_pdf_processor
parsers:
- type: PDFParser_LlamaIndex
file_include_patterns: ["*.pdf"]
priority: 100
config:
chunk_size: 1100
chunk_overlap: 160
chunk_strategy: semantic
extract_tables: true
- type: PDFParser_PyPDF2
file_include_patterns: ["*.pdf"]
priority: 50
config:
chunk_size: 900
chunk_overlap: 140
extractors:
- type: HeadingExtractor
config:
max_level: 4
include_hierarchy: true
extract_outline: true
- type: EntityExtractor
config:
entity_types: [ORG, DATE, , , ]
When config changes require CLI operations, provide the commands:
lf init my-project
cd my-project
# Then save the generated llamafarm.yaml here
lf datasets create -s <strategy-name> -b <database-name> <dataset-name>
lf datasets upload <dataset-name> ./path/to/files/*
lf datasets process <dataset-name>
lf services status
lf datasets list
lf rag query --database <db> --top-k 5 "test query"