Agent Skillsevolution-foundation/evo-nexus › knowledge-ingest

knowledge-ingest

GitHub

用于将文件或URL上传至知识库,自动触发解析、分块、嵌入及异步分类流程。支持本地路径或远程链接,完成验证、上传、状态轮询及分类结果获取。

.claude/skills/knowledge-ingest/SKILL.md evolution-foundation/evo-nexus

Trigger Scenarios

用户要求索引PDF或添加URL到知识库 用户提供带有摄入意图的文件路径或链接

Install

npx skills add evolution-foundation/evo-nexus --skill knowledge-ingest -g -y
More Options

Non-standard path

npx skills add https://github.com/evolution-foundation/evo-nexus/tree/main/.claude/skills/knowledge-ingest -g -y

Use without installing

npx skills use evolution-foundation/evo-nexus@knowledge-ingest

指定 Agent (Claude Code)

npx skills add evolution-foundation/evo-nexus --skill knowledge-ingest -a claude-code -g -y

安装 repo 全部 skill

npx skills add evolution-foundation/evo-nexus --all -g -y

预览 repo 内 skill

npx skills add evolution-foundation/evo-nexus --list

SKILL.md

Frontmatter
{
    "name": "knowledge-ingest",
    "description": "Upload a file (PDF, DOCX, PPTX, XLSX, HTML, EPUB, image) or URL to the Knowledge base. Triggers Marker parsing, chunking, embedding, and async classification. Use when the user says 'index this PDF', 'add this URL to the knowledge base', 'upload these files to Academy', or pastes a file path\/URL with ingestion intent."
}

knowledge-ingest

Group: Ingestion. Upload + automatic classification via pipeline parse → chunk → embed → enqueue classify.

When to trigger

  • "Index this PDF"
  • "Add this URL to the knowledge base"
  • "Upload these files to Academy"
  • User passes a file path with ingestion intent

Arguments

Name Type Required Description
file_path str one of two Local path
url str one of two URL to download first
connection str no Defaults to first ready
space str yes Destination space slug
unit_id str no Associated unit
title str no Derived from filename if absent
tags list[str] no User-defined tags

Workflow

Step 1 — Validate connection + space

If connection not provided, use first ready. If none: error ("Run knowledge-admin action=connect").

Validate space via GET /spaces. If not found: list spaces + ask for confirmation.

Step 2 — Resolve file

If url:

import requests, tempfile
from pathlib import Path
from urllib.parse import urlparse

parsed = urlparse(url)
filename = Path(parsed.path).name or "downloaded"
tmp = Path(tempfile.gettempdir()) / filename
with requests.get(url, stream=True, timeout=60) as r:
    r.raise_for_status()
    with open(tmp, "wb") as f:
        for chunk in r.iter_content(8192):
            f.write(chunk)
file_path = str(tmp)

If file_path: validate existence.

Step 3 — Multipart upload

from dashboard.backend.sdk_client import evo

with open(file_path, "rb") as f:
    result = evo.post(
        "/api/knowledge/v1/documents",
        files={"file": f},
        data={
            "space": space,
            "unit_id": unit_id,
            "title": title or Path(file_path).stem,
            "tags": ",".join(tags or []),
        },
        headers={"X-Knowledge-Connection": connection},
    )

document_id = result["document_id"]

Endpoint returns 202 Accepted + document_id. Async worker.

Step 4 — Poll status

Interval 2s, timeout 10min:

import time
deadline = time.time() + 600
while time.time() < deadline:
    status = evo.get(
        f"/api/knowledge/v1/documents/{document_id}/status",
        headers={"X-Knowledge-Connection": connection},
    )
    phase = status.get("phase")
    if phase in ("done", "ready"):
        break
    if phase == "error":
        raise RuntimeError(status.get("error"))
    time.sleep(2)

Step 5 — Fetch classification (non-blocking)

Classification is asynchronous. 1 extra GET on /documents/{id}:

  • content_type != null: show full classification
  • Else: "Classification pending — will appear in seconds via async worker"

Output

✓ Document uploaded: {title}
  document_id: {uuid}
  space: {connection}/{space}
  unit: {unit_title or "none"}
  status: ready
  chunks: {N}
  classification:
    content_type: {lesson|tutorial|faq|...}
    difficulty: {...}
    topics: [...]
  elapsed: {X}s

Actionable failures

  • File not found → "File does not exist: {path}"
  • URL fetch failed → "Download failed: {status_code}"
  • Space not found → list available spaces
  • Marker models missing → "Run knowledge-admin action=install-parser"
  • Timeout → "Timeout after 10min. Status: {phase}. Check knowledge-browse."

Version History

  • 7f5dd76 Current 2026-07-25 04:55

Same Skill Collection

.claude/skills/create-agent/SKILL.md
.claude/skills/create-command/SKILL.md
.claude/skills/create-goal/SKILL.md
.claude/skills/create-heartbeat/SKILL.md
.claude/skills/create-integration/SKILL.md
.claude/skills/create-routine/SKILL.md
.claude/skills/create-ticket/SKILL.md
.claude/skills/cs-ticket-triage/SKILL.md
.claude/skills/data-build-dashboard/SKILL.md
.claude/skills/data-create-viz/SKILL.md
.claude/skills/data-explore/SKILL.md
.claude/skills/data-statistical-analysis/SKILL.md
.claude/skills/data-validate/SKILL.md
.claude/skills/db-mongo/SKILL.md
.claude/skills/db-mysql/SKILL.md
.claude/skills/db-postgres/SKILL.md
.claude/skills/db-redis/SKILL.md
.claude/skills/dev-ai-slop-cleaner/SKILL.md
.claude/skills/dev-ask/SKILL.md
.claude/skills/dev-autopilot/SKILL.md
.claude/skills/dev-cancel/SKILL.md
.claude/skills/dev-ccg/SKILL.md
.claude/skills/dev-configure-notifications/SKILL.md
.claude/skills/dev-deep-dive/SKILL.md
.claude/skills/dev-deep-interview/SKILL.md
.claude/skills/dev-deepinit/SKILL.md
.claude/skills/dev-external-context/SKILL.md
.claude/skills/dev-learner/SKILL.md
.claude/skills/dev-mcp-setup/SKILL.md
.claude/skills/dev-plan/SKILL.md
.claude/skills/dev-project-session-manager/SKILL.md
.claude/skills/dev-ralph/SKILL.md
.claude/skills/dev-ralplan/SKILL.md
.claude/skills/dev-release/SKILL.md
.claude/skills/dev-remember/SKILL.md
.claude/skills/dev-sciomc/SKILL.md
.claude/skills/dev-skillify/SKILL.md
.claude/skills/dev-team/SKILL.md
.claude/skills/dev-trace/SKILL.md
.claude/skills/dev-ultraqa/SKILL.md
.claude/skills/dev-verify/SKILL.md
.claude/skills/dev-visual-verdict/SKILL.md
.claude/skills/discord-create-channel/SKILL.md
.claude/skills/discord-get-messages/SKILL.md
.claude/skills/discord-list-channels/SKILL.md
.claude/skills/discord-manage-channel/SKILL.md
.claude/skills/discord-send-message/SKILL.md
.claude/skills/fin-audit-support/SKILL.md
.claude/skills/fin-close-management/SKILL.md
.claude/skills/fin-daily-pulse/SKILL.md

Metadata

Files
0
Version
7f5dd76
Hash
b2ec4c8d
Indexed
2026-07-25 04:55

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-22 00:18
浙ICP备14020137号-1 $mapa de visitantes$