structured-knowledge-extraction
Use when extracting entities, relations, evidence, and provenance from Markdown or plain text into a typed, versioned knowledge graph under `.devin/`.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- structured-knowledge-extraction
- version
- 1.0.0
- triggers
- [ "user", "model" ]
- description
- Use when extracting entities, relations, evidence, and provenance from Markdown or plain text into a typed, versioned knowledge graph under `.devin/`.
02 资源文件 1
- 脚本scripts/extract.py28.2 KB
03 SKILL.md 正文
structured-knowledge-extraction
Deterministic, provider-neutral extraction of entities, relations, evidence, and provenance from Markdown or plain text into versioned JSON and relational Markdown under .devin/.
When to use
- You need to turn one or more Markdown/text documents into a typed, mergeable knowledge graph.
- You want every extracted fact to point back to a source file, line, and quote.
- You need incremental updates: merge new sources without duplicating entities or silently overwriting conflicting ones.
- You want a no-API-key, no-LLM baseline for searching the knowledge graph.
- You are evaluating - but not yet installing - Hyper-Extract, embeddings, or MCP integration.
When NOT to use
- You need full semantic search or vector retrieval today; this skill is a lexical baseline.
- You want automatic conflict resolution; conflicts are reported and require explicit action.
- You want to install external dependencies or MCP servers by default.
Core operations
All operations use only the Python standard library and stay inside .devin/.
| Operation | Purpose | Default output |
|---|---|---|
extract |
Extract entities, relations, evidence, and provenance from a Markdown/text source. | JSON to stdout |
merge |
Merge a new extraction into an existing .devin/notes/structured-knowledge-extraction/knowledge.json. |
JSON to stdout |
search |
Lexical search over the stored knowledge graph (no API key). | JSON to stdout |
plan |
Generate an integration guidance note for optional Hyper-Extract/embeddings/MCP evaluation. | Markdown to stdout; writes note only with --write --approve |
Usage
From the bundle root:
python skills/structured-knowledge-extraction/scripts/extract.py extract <source> [project] [--write] [--approve]
python skills/structured-knowledge-extraction/scripts/extract.py merge <source> [project] [--write] [--approve]
python skills/structured-knowledge-extraction/scripts/extract.py search <query> [project]
python skills/structured-knowledge-extraction/scripts/extract.py plan [project] [--write] [--approve]
After installation the helper is available at ~/.config/devin/skills/structured-knowledge-extraction/scripts/extract.py.
Rules
- Provider-neutral and stdlib-only. No LLM, embedding, or external-provider dependency is required for the core path.
- Write only under
.devin/. Generated artifacts go to.devin/notes/structured-knowledge-extraction/. No other files are created or modified. - Explicit approval required.
--writemust be paired with--approvefor any persistence. - Every fact has provenance. Each entity and relation records source, line, and quote.
- Incremental merge without silent conflict resolution. Duplicates are deduplicated; conflicts are reported explicitly and never resolved automatically.
- Deterministic and idempotent. Sorted output, stable hashes, and content-derived timestamps (never mtime) make repeated runs byte-identical for unchanged inputs.
- No API key required. The lexical search baseline works without network, embeddings, or MCP.
- Reject symlinks and outside-
.devinwrites. Symlinked sources are rejected; output paths are verified to stay inside.devin/. - Optional integrations only. Hyper-Extract, embeddings, and MCP are evaluated in isolation and never installed by the core skill.
Source and license attribution
structured-knowledge-extraction is conceptually inspired by Hyper-Extract's typed entities, incremental extraction, and provenance-first design. No code, prompts, or templates are copied from Hyper-Extract. The core implementation uses only the Python standard library.
- Hyper-Extract (Apache-2.0): https://github.com/yifanfeng97/Hyper-Extract
- README: https://github.com/yifanfeng97/Hyper-Extract/blob/main/README.md
- pyproject: https://github.com/yifanfeng97/Hyper-Extract/blob/main/pyproject.toml
- License: https://github.com/yifanfeng97/Hyper-Extract/blob/main/LICENSE
Limitations
- Lexical, not semantic. This skill extracts entities and relations from Markdown structure (headings, links, citations, code). It does not extract abstract concepts, infer intent, or perform semantic reasoning. For domain-level validation of extracted knowledge, use
ontology-validator. - No automatic conflict resolution. Conflicts are reported but require explicit human or agent action.
- No vector search. The
searchoperation is lexical; semantic search requires embeddings or an external index.
Cross-references
/devin-manager- audit.devin/health before writing./mcp-context-audit- measure MCP tool-definition cost before enabling an integration./research- verify primary-source claims before adding external integrations./ontology-validator- validate extracted entities and relations against domain rules before side effects.
04 同仓库更多 Skills
montador-de-ideias
Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.
git-github-adaptive-engineering
Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.
adaptive-agenda-calendar-routine-engine
Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.
demo
Use when demonstrating a skill in a fixture project.
duplicate-skill
Use when testing duplicate skill name detection.
duplicate-skill
Use when testing duplicate skill name detection.