ワンクリックで
Search X (Twitter) posts via Grok API and ingest results into the knowledge graph.
npx skills add https://github.com/okikusan-public/knowledge_graph --skill x-searchこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストール
Search X (Twitter) posts via Grok API and ingest results into the knowledge graph.
npx skills add https://github.com/okikusan-public/knowledge_graph --skill x-searchこのコマンドをClaude Codeにコピー&ペーストしてスキルをインストール
| name | x-search |
| description | Search X (Twitter) posts via Grok API and ingest results into the knowledge graph. |
Search X (Twitter) posts in real-time using xAI's Grok API, save results as structured Markdown, then ingest into the knowledge graph with entity extraction.
/x-search "AI agent frameworks"
/x-search "product launch" --days 30 --handles elonmusk,openai
/x-search "knowledge graphs" --web-search --project project_a
/x-search "生成AI トレンド" --days 3
pip install openaiXAI_API_KEY environment variable set (get key at https://console.x.ai/)Note: No --auto mode is provided due to per-search API costs ($0.015-$0.025/call). All searches require user review before ingestion.
Parse $ARGUMENTS for the query and optional flags. Run:
python ${CLAUDE_SKILL_DIR}/../../../scripts/x_search.py "<query>" --days <N> [--handles h1,h2] [--exclude-handles h1,h2] [--web-search] $1 $2
Capture the output path (last line of stdout).
Read the generated markdown file using the Read tool. Present a summary to the user:
Ask the user if they want to proceed with ingestion into the knowledge graph.
python ${CLAUDE_SKILL_DIR}/../../../scripts/auto_ingest.py upsert "<md_file_path>" $1 $2
Note the chunk count from the output.
Read the generated markdown file using the Read tool. Analyze the X search results and extract entities and relationships as JSON.
Entity types:
X-search-specific extraction guidance:
Before saving, check for conflicts with existing entities:
python -c "
import sys, json
sys.path.insert(0, '.')
from neo4j import GraphDatabase
from config import get_config
from scripts.save_entities import query_existing_entities
cfg = get_config()
driver = GraphDatabase.driver(cfg.neo4j_uri, auth=cfg.neo4j_auth)
names = [COMMA_SEPARATED_ENTITY_NAMES]
result = query_existing_entities(driver, names)
driver.close()
for name, info in result.items():
print(json.dumps({'name': name, 'type': info['type'], 'description': info['description'], 'sources': info['sources']}, ensure_ascii=False))
"
For each entity that already exists:
cat <<'ENTITIES_JSON' | python ${CLAUDE_SKILL_DIR}/../../../scripts/save_entities.py --source-path "<md_file_path>" $1 $2
{"entities": [...], "relationships": [...]}
ENTITIES_JSON
Note: Community detection and relationship discovery run automatically via the post-entity-save hook.
Report: search query, date range, markdown output path, chunk count, entity count, relationship count, and any conflicts resolved.
| Feature | /x-search | /youtube-markitdown | /pdf-markitdown | /add-knowledge |
|---|---|---|---|---|
| Input | Search query | YouTube URL | PDF file | Free text |
| Source | X posts (real-time) | YouTube video | Document file | User input |
| API cost | ~$0.02/search | Free | Free | Free |
| Automated mode | No | Yes (--auto) | Yes (--auto) | No |
| Best for | Trends, discussions | Video content | Structured docs | Quick notes |
pip install openai and XAI_API_KEY environment variablegrok-4-1-fast-non-reasoning (cheapest: $0.20/M input, $0.50/M output)--web-search adds web context alongside X results (optional)--handles and --exclude-handles cannot be used together (API constraint)docs/x_search_{query}_{date}.mdAutonomous multi-tool search agent that dynamically selects search strategies, evaluates results, and iterates until sufficient context is gathered to answer complex questions
Convert YouTube video to structured Markdown via markitdown (metadata + transcript) and ingest into the knowledge graph.
Add knowledge directly to the graph from free-form text input without requiring a document file. Supports Note, WebSource, Conversation, or any custom source type.
Convert PDF to structured Markdown via markitdown and ingest into the knowledge graph. Preserves tables, headings, and formatting better than plain-text extraction.
Spaced repetition quiz using GraphRAG entities. Generates questions, grades answers, and tracks learning progress with optimal review intervals.
Hybrid search combining vector similarity with graph traversal for multi-hop reasoning over the knowledge graph