ワンクリックで
rag-search
Indexes and searches documents in the my-documents folder using knowledge graph vector store
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Indexes and searches documents in the my-documents folder using knowledge graph vector store
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Deterministic communication metrics for the mirrored Teams channels. Computes reply-latency distributions, after-hours share, burst/fragmentation index, unanswered blockers, and interruption-cascade depth from data/teams/*/messages.jsonl, and refreshes the hyperscreen dashboard data. Use before making ANY quantitative claim about team communication.
Generate an interactive "application simulator" — a tiny, agent-built React mock of an external app (SAP MD04, a CRM, an ERP form) that the trainee can click through. The trainee's clicks stream back to you via viewerState so you can coach in real time. Each simulator is a single self-contained HTML file under `out/simulators/<app>.simulator.html`. Use this skill when the expert asks for a simulator (often in the context of curriculum topic 4 "Werkzeuge") or when a guest asks "can I practice this somewhere?".
Co-author a new roleplay scenario with an expert. Interview the expert about the persona, topic, hints with point values, and evaluation criteria, draft the JSON, and on confirmation write it to roleplay/<slug>.roleplay.json. Use when the expert invokes "Author a roleplay scenario" from the menu, asks "let me add a customer call to practice", "I want to script a difficult buyer", or equivalent. The scenarios authored here are consumed at runtime by the roleplay-engine skill.
Maintains a project knowledge wiki at wiki/ as the agent's long-term memory, dynamically structured around the mission in wiki/_meta/mission.md. Use whenever the user shares a fact, decision, preference, requirement, or finding worth remembering; whenever the user says "remember this", "add to wiki", "we decided", "save", "note that", or "for the record"; whenever the user asks "what do we know about X", "have we considered Y", "what did we decide", "summarize what we have"; whenever a file in the project codebase contains information relevant to the mission and should be ingested; at the end of a session to consolidate findings; and at session start to load relevant context. Reads index first, deduplicates before writing, tracks provenance, appends history rather than overwriting, and creates stubs for mentioned-but-unresearched topics. Pure markdown, no embeddings, no external network.
Engineering Design Support System. Use this skill whenever the user is doing long-horizon product/engineering design and wants to capture intent, decisions, risks, assumptions, evidence, open questions, or hypotheses; whenever they say 'add a decision', 'propose a hypothesis', 'what did we rule out', 'what changed', 'generate a status report', 'show whitespots', 'sharpen this', 'mission', 'realign', or ask what the project knows; at session start to load mission + state; and as the curator/researcher/synthesizer/critic loops. The mission is the versioned north star; the RDF knowledge graph is the system of record for a typed dependency graph (Concept/Decision/Risk/Assumption/Evidence/OpenQuestion/Gap/Whitespot/Hypothesis/Test); the scrapbook is a projected view; the wiki is synthesized prose; hypotheses run as stateful workflows. Pull-only: never push to the engineer except a critic mission-contradiction.
Use this skill whenever the user wants to take structured notes, collect ideas, organize project requirements, or manage a project notebook — trigger on phrases like 'scrapbook', 'add a note', 'what have we captured', 'notebook', 'show my notes', 'what should I focus on', 'jot this down', or any request to review, prioritize, or organize project items. Reads and writes to the project scrapbook via MCP tools, presenting content as a structured hierarchy with priorities and focus levels.
| name | rag-search |
| description | Indexes and searches documents in the my-documents folder using knowledge graph vector store |
This skill enables document indexing and semantic search over files placed in the my-documents/ folder. Documents are automatically indexed into the knowledge base vector store when created or modified, and removed when deleted. Users can query the knowledge base in conversation by mentioning "my documents", "my-documents", "knowledge base", or "our kb".
This skill requires the vector-store service to be running and listening on port 7100.
Use this skill when:
my-documents/ folderIMPORTANT: On every conversation turn, before handling the user's request, you MUST check whether the RAG Search rules have been initialized for this project. Call GET /api/rules/{project} and look for rules named "RAG: File Created", "RAG: File Deleted", and "RAG: File Modified". If any of these three rules are missing, run the full Initialization steps below silently before responding to the user's actual request. This ensures documents dropped into my-documents/ are indexed automatically from the very first interaction, without requiring the user to explicitly ask for setup.
If all three rules already exist, skip initialization and proceed directly to handling the user's request.
Perform the following setup steps in order.
Check if my-documents/ exists in the project directory. If not, create it:
python3 -c "import os; os.makedirs('my-documents', exist_ok=True)"
Check if markitdown is available:
python3 -c "import markitdown"
If the import fails, install it:
pip3 install markitdown
Create three prompts that will be used as rule actions. Replace {project} with the actual project name.
Prompt 1 - Index New Document:
POST /api/prompts/{project}
Content-Type: application/json; charset=utf-8
{
"title": "RAG: Index New Document",
"content": "A new file was added to the my-documents folder. You must index it into the knowledge base using the document indexing workflow.\n\nSteps:\n1. Extract the file path from the 'File:' line above.\n2. Check the file extension.\n3. If the file has a binary extension (.pdf, .docx, .xlsx, .pptx), you MUST convert it to markdown first using markitdown:\n ```\n python3 -c \"\nfrom markitdown import MarkItDown\nmd = MarkItDown()\nresult = md.convert('/workspace/{project}/<filepath>')\nprint(result.text_content)\n \"\n ```\n Then call kg_learn_document with the project name, the original file path, and the converted text in the 'content' parameter.\n4. For text-based files (.md, .txt, .csv, .json, etc.), call kg_learn_document with just the project name and file path - it will read the file directly.\n5. Confirm the document was indexed successfully."
}
Save the returned prompt.id as promptId1.
Prompt 2 - Remove Deleted Document:
POST /api/prompts/{project}
Content-Type: application/json; charset=utf-8
{
"title": "RAG: Remove Deleted Document",
"content": "A file was deleted from the my-documents folder. You must remove it from the knowledge base.\n\nSteps:\n1. Extract the file path from the 'File:' line above.\n2. Call the kg_forget_document MCP tool with the project name and the file path (relative to the project directory).\n3. Confirm the document was removed from the knowledge base."
}
Save the returned prompt.id as promptId2.
Prompt 3 - Re-index Modified Document:
POST /api/prompts/{project}
Content-Type: application/json; charset=utf-8
{
"title": "RAG: Re-index Modified Document",
"content": "A file was modified in the my-documents folder. You must update it in the knowledge base by removing the old version and indexing the new one.\n\nSteps:\n1. Extract the file path from the 'File:' line above.\n2. First, call kg_forget_document MCP tool with the project name and file path (relative to the project directory) to remove the old version.\n3. Wait for the forget operation to complete before proceeding.\n4. Check the file extension.\n5. If the file has a binary extension (.pdf, .docx, .xlsx, .pptx), you MUST convert it to markdown first using markitdown:\n ```\n python3 -c \"\nfrom markitdown import MarkItDown\nmd = MarkItDown()\nresult = md.convert('/workspace/{project}/<filepath>')\nprint(result.text_content)\n \"\n ```\n Then call kg_learn_document with the project name, the original file path, and the converted text in the 'content' parameter.\n6. For text-based files, call kg_learn_document with just the project name and file path.\n7. Confirm the document was re-indexed successfully."
}
Save the returned prompt.id as promptId3.
Create three rules referencing the prompt IDs from Step 3. Replace {project} with the actual project name and <promptIdN> with the actual prompt IDs.
Rule 1 - File Created in my-documents:
POST /api/rules/{project}
Content-Type: application/json; charset=utf-8
{
"name": "RAG: File Created",
"enabled": true,
"condition": {
"type": "simple",
"event": {
"group": "Filesystem",
"name": "File Created",
"payload.path": "*/my-documents/*"
}
},
"action": {
"type": "prompt",
"promptId": "<promptId1>"
}
}
Rule 2 - File Deleted from my-documents:
POST /api/rules/{project}
Content-Type: application/json; charset=utf-8
{
"name": "RAG: File Deleted",
"enabled": true,
"condition": {
"type": "simple",
"event": {
"group": "Filesystem",
"name": "File Deleted",
"payload.path": "*/my-documents/*"
}
},
"action": {
"type": "prompt",
"promptId": "<promptId2>"
}
}
Rule 3 - File Modified in my-documents:
POST /api/rules/{project}
Content-Type: application/json; charset=utf-8
{
"name": "RAG: File Modified",
"enabled": true,
"condition": {
"type": "simple",
"event": {
"group": "Filesystem",
"name": "File Modified",
"payload.path": "*/my-documents/*"
}
},
"action": {
"type": "prompt",
"promptId": "<promptId3>"
}
}
After creating the rules, scan the my-documents/ directory for any files already present. For each file found, index it into the knowledge base following the Document Indexing Workflow below. This ensures documents that were placed before initialization are searchable immediately.
After all prompts, rules are created, and existing documents are indexed, briefly inform the user that the knowledge base has been initialized with automatic document indexing. Keep it short - the user did not explicitly ask for setup, so don't overwhelm them. Then proceed to handle their original request.
IMPORTANT: The kg_learn_document tool reads files as UTF-8 text. Binary formats (PDF, DOCX, XLSX, PPTX) will produce garbage or errors if read directly. You MUST preprocess binary files with markitdown before indexing.
To index a document:
python3 -c "
from markitdown import MarkItDown
md = MarkItDown()
result = md.convert('/workspace/{project}/{filepath}')
print(result.text_content)
"
kg_learn_document with project, filepath (the original path like my-documents/report.pdf), and content (the converted markdown text from markitdown output).kg_learn_document with just project and filepath. The tool will read the file content directly.When the user mentions "my documents", "my-documents", "knowledge base", or "our kb" in a question or request, follow these steps:
Call the kg_search_document MCP tool with:
project: The current project name (extract from the working directory)query: The user's question or search intent (extract the semantic meaning)If the search returns results:
filepath from the search results is relative to the project directoryCitation format for single source:
According to [filename.pdf](my-documents/filename.pdf), the policy states that ...
Citation format for multiple sources:
Based on [document1.pdf](my-documents/document1.pdf) and [document2.docx](my-documents/document2.docx), the answer is ...
If no results are found:
my-documents/ folderPOST /api/prompts/{project}
Body: { title: string, content: string }
Response: { success: boolean, prompt: { id: string, title: string, content: string, createdAt: string, updatedAt: string } }
GET /api/rules/{project}
Response: { success: boolean, count: number, rules: EventRule[] }
POST /api/rules/{project}
Body: { name: string, enabled: boolean, condition: EventCondition, action: RuleAction }
Response: { success: boolean, rule: { id: string, name: string, enabled: boolean, condition: EventCondition, action: RuleAction, createdAt: string, updatedAt: string } }
Adds a document to the vector store knowledge base. Generates embeddings and stores the content for semantic search.
project (string, required): The project name (directory name in workspace)filepath (string, required): Relative path to the document file within the project workspace (e.g., "my-documents/report.md"). Used as the document identifier.content (string, optional): Pre-extracted text content. When provided, the tool uses this instead of reading from the file. Use this for binary files (PDF, DOCX, XLSX, PPTX) that have been converted to text using markitdown.Searches documents in the vector store knowledge base. Returns the top 3 matching document contents with filepath and similarity score.
project (string, required): The project namequery (string, required): Natural language query or question (e.g., "What is the return policy for electronics?")Removes a document from the vector store knowledge base.
project (string, required): The project namefilepath (string, required): Relative path to the document file within the project workspace (e.g., "my-documents/old-report.md")User: "In regard to our knowledge base how should customer returns in the category food be handled?"
Agent (detects rules are missing → silently runs initialization Steps 1-6, indexing any existing files in my-documents → then calls kg_search_document):
"I've initialized the knowledge base for your project. According to return-policy.pdf we accept food returns only up to 3 days after the purchase date in original and unbroken packaging."
User: "What does our kb say about warranty claims?"
Agent (checks rules → all 3 exist → skips initialization → calls kg_search_document):
"According to warranty-policy.pdf warranty claims must be filed within 12 months of purchase with proof of purchase."
User: "What do my documents say about employee onboarding?"
Agent (internally calls kg_search_document with query "employee onboarding process"):
"Based on hr-handbook.pdf and onboarding-checklist.docx, new employees go through a 2-week onboarding program that includes IT setup on day 1, team introductions on day 2, and role-specific training during the first two weeks."
User: "What does our kb say about shipping to Alaska?"
Agent (internally calls kg_search_document, gets no results):
"I couldn't find any information about shipping to Alaska in your knowledge base. You may want to add relevant shipping policy documents to the my-documents/ folder so I can index and search them for you."
payload.path as workspace-relative paths (e.g., projectname/my-documents/file.pdf). The wildcard pattern */my-documents/* matches this format correctly.Event: {event name} and File: {path relative to project} to the prompt content. The file path is already relative to the project root (e.g., my-documents/file.pdf), so you can use it directly with MCP tools.kg_learn_document tool reads files as UTF-8 text. Binary formats (PDF, DOCX, XLSX, PPTX) will fail or produce garbage. You MUST convert them to markdown using markitdown first, then pass the converted text via the content parameter while keeping the original filepath as the document identifier.charset=utf-8 in the Content-Type header when making API calls to ensure proper encoding of non-ASCII characters.