Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

ontology本体论

Agent Skill

ontology 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

5,127

周安装

218

GitHub Stars

公开资料未说明

下载量

1,796
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ontology(本体论)
来源仓库:https://github.com/hiveminderbot/ontology
仓库路径:skills/ontology
安装命令:
npx skills add https://github.com/hiveminderbot/ontology --skill ontology
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/hiveminderbot/ontology --skill ontology

简介

ontology 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合围绕项目状态进行整理。

  • 适用于代码变更追踪、协作事项管理和仓库状态分析等场景。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用该技能。
  • 安装前需确认权限范围、维护状态,避免触发联网或命令执行操作。
  • 建议结合原始 README 核验具体用法和功能边界。

SKILL.md

Ontology

A typed vocabulary + constraint system for representing knowledge as a verifiable graph.

Architecture

This skill follows the Pattern A: Full Modular architecture:

ontology/
├── src/                      # Modular source code
│   ├── __init__.py          # Package exports
│   ├── cli.py               # CLI entry point
│   ├── services/            # Business logic
│   │   ├── entity_service.py
│   │   ├── relation_service.py
│   │   ├── validation_service.py
│   │   └── schema_service.py
│   └── utils/               # Utilities
│       ├── path_utils.py
│       ├── id_utils.py
│       └── graph_loader.py
├── tests/                   # Comprehensive tests (60+)
│   ├── unit/
│   └── integration/
├── docs/                    # Documentation
├── scripts/                 # Legacy CLI (deprecated)
└── SKILL.md                 # This file

Core Concept

Everything is an entity with a type, properties, and relations to other entities. Every mutation is validated against type constraints before committing.

Entity: { id, type, properties, relations, created, updated }
Relation: { from_id, relation_type, to_id, properties }

When to Use

TriggerAction
"Remember that..."Create/update entity
"What do I know about X?"Query graph
"Link X to Y"Create relation
"Show all tasks for project Z"Graph traversal
"What depends on X?"Dependency query
Planning multi-step workModel as graph transformations
Skill needs shared stateRead/write ontology objects

Core Types

# Agents & People
Person: { name, email?, phone?, notes? }
Organization: { name, type?, members[] }

# Work
Project: { name, status, goals[], owner? }
Task: { title, status, due?, priority?, assignee?, blockers[] }
Goal: { description, target_date?, metrics[] }

# Time & Place
Event: { title, start, end?, location?, attendees[], recurrence? }
Location: { name, address?, coordinates? }

# Information
Document: { title, path?, url?, summary? }
Message: { content, sender, recipients[], thread? }
Thread: { subject, participants[], messages[] }
Note: { content, tags[], refs[] }

# Resources
Account: { service, username, credential_ref? }
Device: { name, type, identifiers[] }
Credential: { service, secret_ref }  # Never store secrets directly

# Meta
Action: { type, target, timestamp, outcome? }
Policy: { scope, rule, enforcement }

Storage

Default: memory/ontology/graph.jsonl

{"op":"create","entity":{"id":"p_001","type":"Person","properties":{"name":"Alice"}}}
{"op":"create","entity":{"id":"proj_001","type":"Project","properties":{"name":"Website Redesign","status":"active"}}}
{"op":"relate","from":"proj_001","rel":"has_owner","to":"p_001"}

Query via scripts or direct file ops. For complex graphs, migrate to SQLite.

Append-Only Rule

When working with existing ontology data or schema, append/merge changes instead of overwriting files. This preserves history and avoids clobbering prior definitions.

Workflows

Using the Modular API

from src.services.entity_service import create_entity, query_entities
from src.services.relation_service import create_relation
from src.services.validation_service import validate_graph

# Create entities
alice = create_entity("Person", {"name": "Alice"}, "memory/ontology/graph.jsonl")
project = create_entity("Project", {"name": "Website"}, "memory/ontology/graph.jsonl")

# Create relation
create_relation(alice["id"], "owns", project["id"], {}, "memory/ontology/graph.jsonl")

# Validate
errors = validate_graph("memory/ontology/graph.jsonl", "memory/ontology/schema.yaml")

Using the CLI

# Create entity
python3 -m src.cli create --type Person --props '{"name":"Alice"}'

# Query
python3 -m src.cli query --type Task --where '{"status":"open"}'
python3 -m src.cli get --id task_001
python3 -m src.cli related --id proj_001 --rel has_task

# Link entities
python3 -m src.cli relate --from proj_001 --rel has_task --to task_001

# Validate
python3 -m src.cli validate

Legacy CLI (deprecated)

python3 scripts/ontology.py create --type Person --props '{"name":"Alice"}'

Constraints

Define in memory/ontology/schema.yaml:

types:
  Task:
    required: [title, status]
    status_enum: [open, in_progress, blocked, done]

  Event:
    required: [title, start]
    validate: "end >= start if end exists"

  Credential:
    required: [service, secret_ref]
    forbidden_properties: [password, secret, token]  # Force indirection

relations:
  has_owner:
    from_types: [Project, Task]
    to_types: [Person]
    cardinality: many_to_one

  blocks:
    from_types: [Task]
    to_types: [Task]
    acyclic: true  # No circular dependencies

Skill Contract

Skills that use ontology should declare:

# In SKILL.md frontmatter or header
ontology:
  reads: [Task, Project, Person]
  writes: [Task, Action]
  preconditions:
    - "Task.assignee must exist"
  postconditions:
    - "Created Task has status=open"

Planning as Graph Transformation

Model multi-step plans as a sequence of graph operations:

Plan: "Schedule team meeting and create follow-up tasks"

1. CREATE Event { title: "Team Sync", attendees: [p_001, p_002] }
2. RELATE Event -> has_project -> proj_001
3. CREATE Task { title: "Prepare agenda", assignee: p_001 }
4. RELATE Task -> for_event -> event_001
5. CREATE Task { title: "Send summary", assignee: p_001, blockers: [task_001] }

Each step is validated before execution. Rollback on constraint violation.

Integration Patterns

With Causal Inference

Log ontology mutations as causal actions:

# When creating/updating entities, also log to causal action log
action = {
    "action": "create_entity",
    "domain": "ontology",
    "context": {"type": "Task", "project": "proj_001"},
    "outcome": "created"
}

Cross-Skill Communication

# Email skill creates commitment
commitment = ontology.create("Commitment", {
    "source_message": msg_id,
    "description": "Send report by Friday",
    "due": "2026-01-31"
})

# Task skill picks it up
tasks = ontology.query("Commitment", {"status": "pending"})
for c in tasks:
    ontology.create("Task", {
        "title": c.description,
        "due": c.due,
        "source": c.id
    })

Quick Start

# Initialize ontology storage
mkdir -p memory/ontology
touch memory/ontology/graph.jsonl

# Run tests
cd skills/ontology
python3 -m pytest tests/ -v

# Create schema (optional but recommended)
python3 -m src.cli schema-append --data '{
  "types": {
    "Task": { "required": ["title", "status"] },
    "Project": { "required": ["name"] },
    "Person": { "required": ["name"] }
  }
}'

# Start using
python3 -m src.cli create --type Person --props '{"name":"Alice"}'
python3 -m src.cli list --type Person

References

  • references/schema.md — Full type definitions and constraint patterns
  • references/queries.md — Query language and traversal examples

Instruction Scope

Runtime instructions operate on local files (memory/ontology/graph.jsonl and memory/ontology/schema.yaml) and provide CLI usage for create/query/relate/validate; this is within scope. The skill reads/writes workspace files and will create the memory/ontology directory when used. Validation includes property/enum/forbidden checks, relation type/cardinality validation, acyclicity for relations marked acyclic: true, and Event end >= start checks; other higher-level constraints may still be documentation-only unless implemented in code.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.16%
按下载量换算667

Claude

31.42%
按下载量换算564

Cursor

18.42%
按下载量换算331

Gemini CLI

10.54%
按下载量换算189

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills