AGENT SKILL

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

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

  1. Provider-neutral and stdlib-only. No LLM, embedding, or external-provider dependency is required for the core path.
  2. Write only under .devin/. Generated artifacts go to .devin/notes/structured-knowledge-extraction/. No other files are created or modified.
  3. Explicit approval required. --write must be paired with --approve for any persistence.
  4. Every fact has provenance. Each entity and relation records source, line, and quote.
  5. Incremental merge without silent conflict resolution. Duplicates are deduplicated; conflicts are reported explicitly and never resolved automatically.
  6. Deterministic and idempotent. Sorted output, stable hashes, and content-derived timestamps (never mtime) make repeated runs byte-identical for unchanged inputs.
  7. No API key required. The lexical search baseline works without network, embeddings, or MCP.
  8. Reject symlinks and outside-.devin writes. Symlinked sources are rejected; output paths are verified to stay inside .devin/.
  9. 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.

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 search operation 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

Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

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.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0