xiaohongshu
xiaohongshu
import-content
Import existing markdown files into Kurt database. Fix ERROR records, bulk import files, link content to database.
Full skill instructions
This skill helps import existing markdown files into Kurt's database when automatic ingestion fails. It's the manual fallback for the auto-import hook and provides bulk operations for fixing ERROR records.
When to use:
/sources/# Fix single ERROR record
python .claude/scripts/import_markdown.py \
--document-id 5f403260 \
--file-path sources/docs.getdbt.com/guides/fusion-quickstart.md
# Extract metadata after import
kurt index 5f403260
Scenario: Used WebFetch to retrieve content, but Kurt DB has ERROR records.
Steps:
List ERROR records:
kurt content list --status ERROR
Find corresponding markdown files:
find sources -name "*.md" -type f
For each ERROR record with a matching file:
python .claude/scripts/import_markdown.py \
--document-id <doc-id> \
--file-path <file-path>
# Then extract metadata
kurt index <doc-id>
Verify success:
kurt content get-metadata <doc-id>
Scenario: Multiple ERROR records with existing markdown files.
Create bash script:
#!/bin/bash
# Fix all ERROR records with matching files
while read -r doc_id url status; do
if [ "$status" = "ERROR" ]; then
# Try to find corresponding file
# (Implement file finding logic based on URL)
if [ -f "$file_path" ]; then
echo "Importing: $doc_id"
python .claude/scripts/import_markdown.py \
--document-id "$doc_id" \
--file-path "$file_path"
kurt index "$doc_id"
fi
fi
done < <(kurt content list)
Scenario: You created markdown files directly without using kurct content.
Steps:
Verify file exists and has content
Check if document record exists:
kurt content list --url-contains <domain>
If ERROR record exists, import:
python .claude/scripts/import_markdown.py \
--document-id <doc-id> \
--file-path <file-path>
If no record exists, use kurct content:
# Create record and import
kurct content add <url>
# Then import file content
python .claude/scripts/import_markdown.py \
--document-id <new-doc-id> \
--file-path <file-path>
Files written to /sources/ or projects/*/sources/ are automatically imported via PostToolUse hook.
How it works:
Hook location: .claude/settings.json
Script: .claude/scripts/auto-import-source.sh
Logs: .claude/logs/auto-import.log
The import script automatically parses YAML frontmatter from markdown files and populates database metadata fields.
The following frontmatter fields are automatically extracted and stored in Kurt database:
| Frontmatter Field | Database Column | Notes |
|---|---|---|
title | title | Full page title |
description | description | Page description/summary |
author | author | Single author or list (stored as JSON array) |
published_date | published_date | Publication date |
date | published_date | Alternative to published_date |
last_modified | published_date | Falls back if published_date not found |
Use YAML frontmatter at the start of markdown files:
---
title: "Full Page Title | Site Name"
url: https://example.com/page
description: "Brief description of the page content"
author: "Author Name"
published_date: "2025-05-28"
last_modified: "2025-10-22"
fetched_via: WebFetch
fetched_at: "2025-10-23"
---
# Page Content
[Markdown content here...]
With frontmatter:
Without frontmatter:
Document imported without frontmatter:
kurt content get-metadata abc123
Title: fusion
Status: FETCHED
Author(s): None
Published: None
Description: None
Document imported with frontmatter:
kurt content get-metadata abc123
Title: Quickstart for the dbt Fusion engine | dbt Developer Hub
Status: FETCHED
Author(s): dbt Labs, Inc.
Published: 2025-10-22
Description: Get started with the dbt Fusion engine in minutes...
When using WebFetch as a fallback, always request metadata:
WebFetch prompt:
"Extract ALL metadata from this page including:
- Full page title
- Description/meta description
- Author(s)
- Published date or last modified date
- The complete page content as markdown
Return with clear separation between metadata and content."
Then save with frontmatter format shown above.
Python dependencies:
pyyaml library (auto-installed with Kurt)If yaml library is not available, frontmatter parsing is skipped gracefully (no errors, but metadata won't be extracted).
Frontmatter not extracted:
--- on first line.claude/logs/auto-import.logpython -c "import yaml; print('OK')"Wrong metadata populated:
YYYY-MM-DDauthor: ["Name 1", "Name 2"] or author: "Single Name"The import script converts file paths to content_path format:
Organization KB (top-level sources/):
File: sources/docs.getdbt.com/guides/fusion.md
→ content_path: docs.getdbt.com/guides/fusion.md
→ URL: https://docs.getdbt.com/guides/fusion
Project sources:
File: projects/my-project/sources/internal-spec.md
→ content_path: projects/my-project/sources/internal-spec.md
→ URL: (no URL mapping, project-specific)
Check:
ls sources/file <path>cat .claude/logs/auto-import.logwhich kurtManual fix:
python .claude/scripts/import_markdown.py \
--document-id <doc-id> \
--file-path <file-path>
Cause: File is new, not from failed fetch
Solution: Create document record first
# If you know the URL:
kurct content add <url>
# Then import content
python .claude/scripts/import_markdown.py \
--document-id <new-doc-id> \
--file-path <file-path>
Cause: Another Kurt process has DB lock
Solution: Wait and retry, or kill other processes
# Check for running Kurt processes
ps aux | grep kurt
# Wait and retry
sleep 2
python .claude/scripts/import_markdown.py ...
Cause: LLM API timeout or rate limit
Solution: Retry manually
# List docs without metadata
kurt content list --status FETCHED
# Re-run indexing
kurt index <doc-id>
# Or batch index all
kurt index --status FETCHED --url-prefix <url>
| Task | Command |
|---|---|
| Import single file | python .claude/scripts/import_markdown.py --document-id <id> --file-path <path> |
| List ERROR records | kurt content list --status ERROR |
| Extract metadata | kurt index <doc-id> |
| View import logs | cat .claude/logs/auto-import.log |
| Verify import | kurt content get-metadata <doc-id> |
| Bulk index | kurt index --status FETCHED --url-prefix <url> |
With ingest-content-skill:
With document-management-skill:
kurt content get-metadataWith project-management-skill:
from pathlib import Path
import sys
sys.path.append('.claude/scripts')
from import_markdown import import_markdown_to_kurt
# Import single file
success = import_markdown_to_kurt(
document_id="5f403260",
file_path="sources/docs.getdbt.com/guides/fusion.md"
)
if success:
print("✓ Import successful")
# Run metadata extraction
import subprocess
subprocess.run(["kurt", "index", "5f403260"])
kurt content get-metadata after importxiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience