Wiki debug

From minh2004pd/chatbotfullpipeline · View interactive version

Wiki debug is an AI agent skill from the GitHub repository minh2004pd/chatbotfullpipeline. Inspect wiki state for a user — list all pages, read index.md, show recent log entries. Use when wiki isn't updating correctly after ingestion or when you need to verify wiki content.

How to use this skill

Skill file

You are helping debug the Wiki Layer of MemRAG. Perform these steps in order:

1. Locate wiki directory

Check backend/app/core/config.py for wiki_base_dir default. Also check if .env overrides WIKI_BASE_DIR. Default is ./wiki relative to where the server runs.

For local dev, wiki lives at backend/wiki/ or the configured path.

2. List wiki structure

Run:

find <wiki_base_dir>/<user_id> -type f | sort

If user_id is unknown, check backend/wiki/ for available user directories.

3. Read index.md

cat <wiki_base_dir>/<user_id>/index.md

Report: how many pages are listed (count - [[ occurrences), which categories have entries (Entities/Topics/Summaries).

4. Show last 20 lines of log.md

tail -20 <wiki_base_dir>/<user_id>/log.md

Report: last INGEST entry (source name, entities count, topics count), any DELETE entries, timestamps.

5. Check a specific page (if user provides rel_path)

cat <wiki_base_dir>/<user_id>/<rel_path>

Report: frontmatter (title, type, sources, version), section headers present.

6. Count pages by category

ls <wiki_base_dir>/<user_id>/pages/entities/ | wc -l
ls <wiki_base_dir>/<user_id>/pages/topics/ | wc -l
ls <wiki_base_dir>/<user_id>/pages/summaries/ | wc -l

7. Summarize findings

Report:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.