Obsidian Ontology Sync
Bidirectional sync between Obsidian PKM (human-friendly notes) and structured ontology (machine-queryable graph). Automatically extracts entities and relatio...
Bidirectional sync between Obsidian PKM (human-friendly notes) and structured ontology (machine-queryable graph). Automatically extracts entities and relatio...
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
Philosophy: Obsidian is PRIMARY (human writes natural notes) → Ontology is DERIVED (machine extracts structure) → Feedback loop improves both
Obsidian Notes (Markdown) ↓ Extract (every 3 hours) Ontology Graph (Structured) ↓ Query & Analyze Insights & Suggestions ↓ Feedback Improved Note Templates
| Situation | Action |
|---|---|
| After creating/updating contacts | Run sync to extract entities |
| Before business queries | Sync then query ontology |
| Weekly review | Sync + analyze + get suggestions |
| New project setup | Extract entities + suggest structure |
| Team status tracking | Sync daily-status → ontology → analytics |
references/contacts/*.md)Extracts:
Person entity (name, email, phone)works_at → Organizationmet_at → Eventassigned_to → Project (if mentioned)status → (prospect, warm_lead, client, etc.)Example:
# Alice JohnsonEmail: alice@company.com Company: Acme Corp Met At: Tech Conference 2026 Projects: Project Alpha
Notes
Great developer, responsive communication.
Becomes:
{ "entity": { "id": "person_alice_johnson", "type": "Person", "properties": { "name": "Alice Johnson", "email": "alice@company.com", "notes": "Great developer, responsive communication" } }, "relations": [ {"from": "person_alice_johnson", "rel": "works_at", "to": "org_acme"}, {"from": "person_alice_johnson", "rel": "met_at", "to": "event_tech_conference_2026"}, {"from": "person_alice_johnson", "rel": "assigned_to", "to": "project_alpha"} ] }
references/clients/*.md)Extracts:
Organization entityhas_contract_value → numberprojects → Project entitiesprimary_contact → Personreferences/team/*.md)Extracts:
Person entityworks_for → Organizationassigned_to → Project[]reports_to → Personresponse_pattern → (proactive, reactive, non-responsive)daily-status/YYYY-MM-DD/*.md)Extracts:
response_time property on Personstatus_update → Eventblockers → Issue entitiesbehavioral_pattern trackingprojects/*.md)Extracts:
Project entityfor_client → Organizationteam → Person[]status, value, deadline# Run extraction python3 skills/obsidian-ontology-sync/scripts/sync.py extractWhat it does:
1. Scan configured Obsidian directories
2. Parse markdown frontmatter + content
3. Extract entities (Person, Project, Organization, etc.)
4. Extract relationships (works_at, assigned_to, etc.)
5. Write to ontology using append-only operations
Detection Rules:
# Contact files if file.startswith("references/contacts/"): entity_type = "Person" extract_email_from_content() extract_company_from_property("Company:") extract_projects_from_links([[Project]])Client files
if file.startswith("references/clients/"): entity_type = "Organization" extract_contract_value() extract_projects()
Team files
if file.startswith("references/team/"): entity_type = "Person" role = "team_member" extract_assignments() extract_response_patterns()
# Run analytics python3 skills/obsidian-ontology-sync/scripts/sync.py analyzeGenerates insights like:
- "3 team members have no assigned projects"
- "Contact 'John Doe' missing email address"
- "Project 'X' has 5 people but no client linked"
- "10 contacts from AI Summit not linked to follow-up tasks"
# Get suggestions python3 skills/obsidian-ontology-sync/scripts/sync.py feedbackCreates:
- Missing property suggestions
- Broken link reports
- Relationship suggestions
- Template improvements
Example Feedback:
# Sync Feedback - 2026-02-27Missing Information (10 items)
missing phone numberAlice Johnson missing email in team fileBob- Project
missing deadlineProject AlphaSuggested Links (5 items)
- Link
(TechHub) to organizationJane DoeTechHub- Link
to project (found in daily-status but not in team file)EveRelationship Insights
team: Alice, Carol, David (extracted from daily-status)Project Alpha- Suggest updating project file with team assignments
Template Suggestions
Add Projects: [[]]
field to contact template
Add Response Pattern:
field to team template
# /root/life/pkm/ontology-sync/config.yamlobsidian: vault_path: /root/life/pkm
What to sync
sources: contacts: path: references/contacts entity_type: Person extract: - email_from_content - company_from_property - projects_from_links
clients: path: references/clients entity_type: Organization extract: - contract_value - projects - contacts team: path: references/team entity_type: Person role: team_member extract: - assignments - response_patterns - reports_to daily_status: path: daily-status extract: - response_times - behavioral_patterns - blockersontology: storage_path: /root/life/pkm/memory/ontology format: jsonl # or sqlite for scale
Entity types to track
entities: - Person - Organization - Project - Event - Task
Relationships to extract
relationships: - works_at - assigned_to - met_at - for_client - reports_to - has_task - blocks
feedback: output_path: /root/life/pkm/ontology-sync/feedback generate_reports: true suggest_templates: true highlight_missing: true
schedule:
Run via cron every 3 hours
sync_interval: "0 */3 * * *" analyze_daily: "0 9 * * *" # 9 AM daily feedback_weekly: "0 10 * * MON" # Monday 10 AM
# Add to OpenClaw cron python3 skills/obsidian-ontology-sync/scripts/setup-cron.pyOr manually via cron tool
cron add
--schedule "0 */3 * * *"
--task "python3 skills/obsidian-ontology-sync/scripts/sync.py extract"
--label "Obsidian → Ontology Sync"
Cron Jobs Created:
Once synced, you can query:
# All team members on high-value projects python3 skills/ontology/scripts/ontology.py query \ --type Person \ --where '{"role":"team_member"}' \ --related assigned_to \ --filter '{"type":"Project","value__gt":400000}'Contacts from specific event not yet followed up
python3 skills/ontology/scripts/ontology.py query
--type Person
--where '{"met_at":"event_tech_conference_2026"}'
--missing has_taskTeam response patterns
python3 skills/ontology/scripts/ontology.py query
--type Person
--where '{"role":"team_member"}'
--aggregate response_patternProjects by client
python3 skills/ontology/scripts/ontology.py query
--type Project
--group-by for_client
--count
Ontology finds: Person entity with no email property
Feedback generated:
## Missing Contact InformationThe following team members are missing email addresses:
- Bob (
)references/team/Bob.md- Lucky (
)references/team/Lucky.mdSuggestion: Add email field to team member template: ```markdown Email: ```
Ontology finds: Person assigned_to Project that doesn't exist
Feedback generated:
## Broken Project ReferencesFound references to projects that don't have dedicated files:
- "Project Epsilon" mentioned in team files but no
projects/Project Epsilon.md- "Project Delta Tata DT" assigned but no project file
Suggestion: Create project files with template
Ontology finds: Multiple people working at same company
Feedback generated:
## Suggested Company GroupingFound 3 contacts at "TechHub":
- Jane Doe
- [2 others from daily-status mentions]
Suggestion: Createand link contactsreferences/clients/TechHub.md
# Cron runs analysis # Generates daily-insights.md with: - Response rate from yesterday's status requests - Projects needing attention (blockers mentioned) - Contacts to follow up (met > 3 days ago, no task)
# Cron generates weekly feedback # Creates suggestions for: - Missing information to fill in - Broken links to fix - New templates to adopt - Relationship insights
# Before a meeting "Show me all interactions with Client X"Resource planning
"Which team members are on <3 projects?"
Sales pipeline
"Contacts met at conferences in last 30 days without follow-up"
/root/life/pkm/ ├── references/ │ ├── contacts/ # Source notes (you write these) │ ├── clients/ # Source notes │ └── team/ # Source notes ├── daily-status/ # Source notes ├── projects/ # Source notes │ ├── memory/ontology/ # Generated ontology │ ├── graph.jsonl # Entity/relation storage │ └── schema.yaml # Type definitions │ └── ontology-sync/ # Sync outputs ├── config.yaml # Your config ├── feedback/ │ ├── daily-insights.md │ ├── weekly-feedback.md │ └── suggestions.md └── logs/ └── sync-YYYY-MM-DD.log
Future capability:
Update Obsidian notes FROM ontology insights:
# Automatically add missing fields python3 skills/obsidian-ontology-sync/scripts/sync.py apply-feedbackWhat it does:
- Adds missing email field to contact notes
- Creates suggested project files
- Links related entities
- Updates frontmatter
Safety: Always creates backup before modifying files.
| Approach | Pros | Cons |
|---|---|---|
| Manual ontology | Full control | Too much work, falls behind |
| Obsidian only | Simple | No structured queries |
| Ontology only | Powerful queries | Not human-friendly |
| This skill | Best of both | Initial setup needed |
# Already have ontology skill installed clawhub install obsidian # If not already installed
python3 skills/obsidian-ontology-sync/scripts/init.pyCreates:
- config.yaml with your vault path
- ontology directory structure
- cron jobs
# Manual first sync to test python3 skills/obsidian-ontology-sync/scripts/sync.py extract --dry-runSee what would be extracted
Review, then run for real:
python3 skills/obsidian-ontology-sync/scripts/sync.py extract
python3 skills/obsidian-ontology-sync/scripts/setup-cron.pyConfirms cron jobs:
✓ Sync every 3 hours
✓ Daily analysis at 9 AM
✓ Weekly feedback Monday 10 AM
# Try some queries python3 skills/obsidian-ontology-sync/scripts/query.py "team members on high value projects"
# Dry run to see what would be extracted python3 skills/obsidian-ontology-sync/scripts/sync.py extract --dry-run --verboseCheck specific file
python3 skills/obsidian-ontology-sync/scripts/debug.py
--file references/contacts/Alice.md
# Check what's in ontology python3 skills/ontology/scripts/ontology.py query --type PersonVerify sync ran
cat /root/life/pkm/ontology-sync/logs/sync-latest.log
# Manually run analysis python3 skills/obsidian-ontology-sync/scripts/sync.py analyze python3 skills/obsidian-ontology-sync/scripts/sync.py feedback
Author: Built for team management, contact tracking, and business intelligence at scale License: MIT Tags: obsidian, ontology, knowledge-graph, pkm, automation, sync
No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.