@qiqiangvae/dsh-obsidian 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ATTRIBUTION.md +36 -0
- package/LICENSE +21 -0
- package/README.md +102 -0
- package/cordis.patch.yml +23 -0
- package/index.js +5 -0
- package/lib/index.d.ts +64 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +351 -0
- package/lib/index.js.map +1 -0
- package/lib/lint.d.ts +25 -0
- package/lib/lint.d.ts.map +1 -0
- package/lib/lint.js +145 -0
- package/lib/lint.js.map +1 -0
- package/lib/scaffold.d.ts +26 -0
- package/lib/scaffold.d.ts.map +1 -0
- package/lib/scaffold.js +67 -0
- package/lib/scaffold.js.map +1 -0
- package/lib/search.d.ts +41 -0
- package/lib/search.d.ts.map +1 -0
- package/lib/search.js +127 -0
- package/lib/search.js.map +1 -0
- package/lib/skills.d.ts +18 -0
- package/lib/skills.d.ts.map +1 -0
- package/lib/skills.js +83 -0
- package/lib/skills.js.map +1 -0
- package/lib/types.d.ts +55 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +6 -0
- package/lib/types.js.map +1 -0
- package/lib/vault.d.ts +69 -0
- package/lib/vault.d.ts.map +1 -0
- package/lib/vault.js +315 -0
- package/lib/vault.js.map +1 -0
- package/package.json +66 -0
- package/skills/defuddle/SKILL.md +35 -0
- package/skills/json-canvas/SKILL.md +61 -0
- package/skills/obsidian-bases/SKILL.md +51 -0
- package/skills/obsidian-cli/SKILL.md +41 -0
- package/skills/obsidian-markdown/SKILL.md +59 -0
- package/skills/save/SKILL.md +33 -0
- package/skills/think/SKILL.md +27 -0
- package/skills/wiki/SKILL.md +45 -0
- package/skills/wiki-ingest/SKILL.md +40 -0
- package/skills/wiki-lint/SKILL.md +36 -0
- package/skills/wiki-query/SKILL.md +34 -0
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-cli
|
|
3
|
+
description: Interact with a running Obsidian instance through its CLI: read, create, search, manage notes/tasks/properties, and dev-loop plugins/themes. Use when the user asks to control Obsidian from the terminal or to debug an Obsidian plugin.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# obsidian-cli
|
|
7
|
+
|
|
8
|
+
Talk to a running Obsidian instance. Requires Obsidian to be open and CLI
|
|
9
|
+
enabled (Settings → General → Enable CLI).
|
|
10
|
+
|
|
11
|
+
## Common commands
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
obsidian read file="My Note"
|
|
15
|
+
obsidian create name="New Note" content="# Hello" template="Template" silent
|
|
16
|
+
obsidian append file="My Note" content="New line"
|
|
17
|
+
obsidian search query="search term" limit=10
|
|
18
|
+
obsidian daily:read
|
|
19
|
+
obsidian daily:append content="- [ ] New task"
|
|
20
|
+
obsidian property:set name="status" value="done" file="My Note"
|
|
21
|
+
obsidian tasks daily todo
|
|
22
|
+
obsidian tags sort=count counts
|
|
23
|
+
obsidian backlinks file="My Note"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- Use `file=<name>` for wikilink-style targeting; `path=<path>` for exact.
|
|
27
|
+
- Use `vault=<name>` first to disambiguate when more than one vault is open.
|
|
28
|
+
- Pass `--copy` to put the result on the clipboard.
|
|
29
|
+
|
|
30
|
+
## Plugin / theme dev loop
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
obsidian plugin:reload id=my-plugin
|
|
34
|
+
obsidian dev:errors
|
|
35
|
+
obsidian dev:screenshot path=screenshot.png
|
|
36
|
+
obsidian dev:dom selector=".workspace-leaf" text
|
|
37
|
+
obsidian dev:console level=error
|
|
38
|
+
obsidian eval code="app.vault.getFiles().length"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
1. Reload → 2. Check errors → 3. Verify visually → 4. Check console → loop.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: obsidian-markdown
|
|
3
|
+
description: Create and edit Obsidian Flavored Markdown (.md) with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Always-on reference for any markdown the agent writes into the vault.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# obsidian-markdown
|
|
7
|
+
|
|
8
|
+
Use Obsidian Flavored Markdown (OFM), not generic Markdown.
|
|
9
|
+
|
|
10
|
+
## Wikilinks
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
[[Page Name]] → link
|
|
14
|
+
[[Page Name|alias]] → link with custom text
|
|
15
|
+
[[Page Name#Heading]] → link to a heading
|
|
16
|
+
![[Page Name]] → embed (transclude) the page
|
|
17
|
+
![[Page Name#Heading]] → embed a section
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Properties (YAML frontmatter)
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
---
|
|
24
|
+
title: My Note
|
|
25
|
+
type: resource
|
|
26
|
+
tags: [rust, async, ownership]
|
|
27
|
+
created: 2026-08-29
|
|
28
|
+
updated: 2026-08-29
|
|
29
|
+
source: https://example.com/article
|
|
30
|
+
source_hash: a1b2c3...
|
|
31
|
+
aliases: [Note Alias]
|
|
32
|
+
status: seedling
|
|
33
|
+
---
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- `type` — required, drives folder routing (see wiki skill)
|
|
37
|
+
- `created` — set once, never overwrite
|
|
38
|
+
- `updated` — set on every write
|
|
39
|
+
- `source` / `source_hash` — provenance for ingested content
|
|
40
|
+
|
|
41
|
+
## Callouts
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
> [!note]
|
|
45
|
+
> Plain callout body.
|
|
46
|
+
|
|
47
|
+
> [!warning] Optional title
|
|
48
|
+
> Body with a title.
|
|
49
|
+
|
|
50
|
+
> [!quote] Title
|
|
51
|
+
> For quoted material with attribution.
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Other useful types: `tip`, `info`, `example`, `question`, `success`, `failure`, `danger`, `bug`.
|
|
55
|
+
|
|
56
|
+
## Standard markdown
|
|
57
|
+
|
|
58
|
+
Headings, lists, tables, code blocks, links, blockquotes, images: standard
|
|
59
|
+
CommonMark works. Do not re-introduce it from scratch in a skill body.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: save
|
|
3
|
+
description: File conversation insights back into the vault as new pages or annotations. Trigger when the user says "save this", "remember this insight", or "add this to my notes" during a conversation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# save
|
|
7
|
+
|
|
8
|
+
Persist a conversational insight to the vault.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "Save this insight to my notes"
|
|
13
|
+
- "Add a note about this conversation"
|
|
14
|
+
- "I want to remember that…"
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. **Identify the type**: is this a resource (a fact / concept), a project
|
|
19
|
+
note (a decision or status), or a source (something external)?
|
|
20
|
+
2. **Pick or draft a title**: prefer an existing `[[title]]` if the topic
|
|
21
|
+
is in the vault. Otherwise draft a short noun phrase.
|
|
22
|
+
3. **Body**: keep it tight. If the user said something quotable, use a
|
|
23
|
+
`> quote` block with `**Source:** conversation, YYYY-MM-DD`.
|
|
24
|
+
4. **Write** via `wiki_write`. Pass `source_path: "conversation"` to record
|
|
25
|
+
provenance without a real file hash.
|
|
26
|
+
5. **Confirm** with the user, including the resolved path and the master
|
|
27
|
+
index entry that was added.
|
|
28
|
+
|
|
29
|
+
## Don't
|
|
30
|
+
|
|
31
|
+
- Do not save without explicit consent ("save this", "remember this",
|
|
32
|
+
"add a note"). A "huh, interesting" is not consent.
|
|
33
|
+
- Do not duplicate an existing page without checking. `wiki_query` first.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: think
|
|
3
|
+
description: The 10-principle reasoning loop (OBSERVE → ORIENT → DECIDE → ACT → REVIEW) that every other wiki skill maps onto. Use when the user asks for careful reasoning, a multi-step plan, or a structured decision.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# think
|
|
7
|
+
|
|
8
|
+
A 10-step reasoning loop. Use it before any non-trivial operation.
|
|
9
|
+
|
|
10
|
+
## The 10 principles
|
|
11
|
+
|
|
12
|
+
1. **OBSERVE** — what is the actual state? (read tools, don't assume)
|
|
13
|
+
2. **ORIENT** — what is the goal? what is the gap?
|
|
14
|
+
3. **DECIDE** — pick the smallest reversible action
|
|
15
|
+
4. **ACT** — do it (call the right tool)
|
|
16
|
+
5. **REVIEW** — did it work? what changed?
|
|
17
|
+
6. **REPORT** — tell the user what happened, with citations
|
|
18
|
+
7. **REFLECT** — was there a better way? log it for next time
|
|
19
|
+
8. **PRESERVE** — if there's a new insight, save it (the `save` skill)
|
|
20
|
+
9. **RECORD** — append to the log via `wiki/log.md` (the tool does this)
|
|
21
|
+
10. **REST** — stop. Don't loop. Cap at 3-5 tool calls per turn.
|
|
22
|
+
|
|
23
|
+
## When to use
|
|
24
|
+
|
|
25
|
+
- "Help me think through this"
|
|
26
|
+
- Before any `wiki_write` or `wiki_rename` that touches more than one page
|
|
27
|
+
- When the user is about to make a destructive change
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki
|
|
3
|
+
description: Scaffold a new vault, manage wiki/ folders, and handle cross-project referencing. Trigger when the user asks to set up an Obsidian vault, create a wiki structure, or reference notes across projects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki
|
|
7
|
+
|
|
8
|
+
Scaffold and maintain the LLM Wiki pattern layout in an Obsidian vault.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "Set up a new vault" / "scaffold my Obsidian" / "init a wiki here"
|
|
13
|
+
- "Where should I put this note?" / "move this to the right folder"
|
|
14
|
+
- "List my wiki structure"
|
|
15
|
+
|
|
16
|
+
## Operations
|
|
17
|
+
|
|
18
|
+
### SCAFFOLD (dry-run by default)
|
|
19
|
+
|
|
20
|
+
Call the `wiki_scaffold` tool with `{ template: "default", apply: false }` to preview.
|
|
21
|
+
Pass `apply: true` to write the layout. Typical new vault: `apply: true`.
|
|
22
|
+
|
|
23
|
+
### TYPE ROUTING
|
|
24
|
+
|
|
25
|
+
| Type | Folder (default) |
|
|
26
|
+
| --------- | ------------------ |
|
|
27
|
+
| `domain` | `wiki/areas` |
|
|
28
|
+
| `area` | `wiki/areas` |
|
|
29
|
+
| `project` | `wiki/projects` |
|
|
30
|
+
| `resource`| `wiki/resources` |
|
|
31
|
+
| `source` | `wiki/sources` |
|
|
32
|
+
| `archive` | `wiki/archive` |
|
|
33
|
+
|
|
34
|
+
Override per-vault by setting `config.typeFolders` in your profile.
|
|
35
|
+
|
|
36
|
+
### CROSS-PROJECT REFERENCING
|
|
37
|
+
|
|
38
|
+
The vault is host-local user data outside any session workspace. Pages link
|
|
39
|
+
by `[[bare title]]`, which resolves vault-wide via `wiki_query`.
|
|
40
|
+
|
|
41
|
+
## Don't
|
|
42
|
+
|
|
43
|
+
- Do not write to `wiki/meta/` directly; tools manage that directory.
|
|
44
|
+
- Do not rename `index.md`, `hot.md`, or `log.md`; tools depend on them.
|
|
45
|
+
- Do not put page content in `inbox/`; that is for raw sources only.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-ingest
|
|
3
|
+
description: Ingest a source (URL, file, or pasted text) into the vault: extract entities and concepts, cross-reference existing notes, log the operation. Trigger when the user says "save this to my vault", "ingest this article", or "capture this".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki-ingest
|
|
7
|
+
|
|
8
|
+
Ingest external sources into the vault as first-class wiki pages.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "Save this article to my vault" / "ingest this URL"
|
|
13
|
+
- "Capture these notes" / "add this to my second brain"
|
|
14
|
+
- Pasted text + "remember this"
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. **Plan**: parse the source into one or more wiki pages. Pick a `type`
|
|
19
|
+
per page (resource/source/project/etc.). Avoid putting a single source
|
|
20
|
+
into multiple pages unless the user asked for a split.
|
|
21
|
+
2. **Pre-flight check**: call `wiki_query` with the source's main topics to
|
|
22
|
+
find existing notes. Plan links from the new page to those notes.
|
|
23
|
+
3. **Write**: for each page, call `wiki_write` with:
|
|
24
|
+
- `title` — short noun phrase, becomes the filename
|
|
25
|
+
- `type` — pick from the wiki SKILL routing table
|
|
26
|
+
- `content` — markdown body with `[[wikilinks]]` to existing pages
|
|
27
|
+
- `source_path` — the local path or `inbox/` file; SHA-256 is recorded
|
|
28
|
+
- `tags` — 2-5 lower-case tags
|
|
29
|
+
4. **Acknowledge unresolved links**: `wiki_write` returns
|
|
30
|
+
`unresolvedLinks`. Tell the user about any forward links and, if
|
|
31
|
+
reasonable, draft placeholder pages in a second pass.
|
|
32
|
+
5. **Log the operation**: the tool appends to `wiki/log.md` automatically.
|
|
33
|
+
|
|
34
|
+
## Don't
|
|
35
|
+
|
|
36
|
+
- Do not write to `wiki/` directly. Always go through `wiki_write`.
|
|
37
|
+
- Do not paraphrase a source as if it were original work; copy quotes with
|
|
38
|
+
a clear `> quote` block and a `source:` frontmatter entry.
|
|
39
|
+
- Do not invent claims or page numbers. If the source doesn't say it,
|
|
40
|
+
don't write it.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-lint
|
|
3
|
+
description: Vault health check. Use to find orphan notes, dead wikilinks, missing frontmatter, empty sections, and stale index/hot entries. The result is written to wiki/meta/Lint Report <date>.md.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki-lint
|
|
7
|
+
|
|
8
|
+
Audit the vault for structural rot.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "Check my vault health" / "lint my vault"
|
|
13
|
+
- Before a major rewrite or migration
|
|
14
|
+
- After a bulk import
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. Call `wiki_lint`. It returns a structured report and writes a copy to
|
|
19
|
+
`wiki/meta/Lint Report YYYY-MM-DD.md`.
|
|
20
|
+
2. Group the issues by category. The categories the linter checks:
|
|
21
|
+
- `duplicate-filename` (error)
|
|
22
|
+
- `dead-link` (warn)
|
|
23
|
+
- `frontmatter` (warn / info)
|
|
24
|
+
- `empty-section` (info)
|
|
25
|
+
- `orphan` (info)
|
|
26
|
+
- `stale-index` (info)
|
|
27
|
+
- `stale-hot` (info)
|
|
28
|
+
3. For each error, propose a fix using `wiki_write` / `wiki_rename`. Do
|
|
29
|
+
not auto-fix without user consent.
|
|
30
|
+
4. Re-run `wiki_lint` to confirm issues are resolved.
|
|
31
|
+
|
|
32
|
+
## Don't
|
|
33
|
+
|
|
34
|
+
- Do not mass-rename pages. Each `wiki_rename` is a separate confirmation.
|
|
35
|
+
- Do not delete orphan pages without checking with the user.
|
|
36
|
+
- Do not modify `wiki/meta/Lint Report …` files; they are machinery.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-query
|
|
3
|
+
description: Answer a question by reading the vault: search via BM25, follow the link graph, return citations with source locators. Trigger when the user asks "what's in my vault about X", "do I have notes on Y", or wants a synthesis of existing pages.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki-query
|
|
7
|
+
|
|
8
|
+
Answer from the vault with citations.
|
|
9
|
+
|
|
10
|
+
## When to use
|
|
11
|
+
|
|
12
|
+
- "What's in my vault about Rust async?"
|
|
13
|
+
- "Do I have notes on Karpathy's LLM Wiki pattern?"
|
|
14
|
+
- "Summarize what I know about topic X"
|
|
15
|
+
|
|
16
|
+
## Workflow
|
|
17
|
+
|
|
18
|
+
1. **Quick check first**: call `wiki_query` in `mode: "quick"` to read
|
|
19
|
+
`hot.md` + `index.md` verbatim — this is the model's recent context
|
|
20
|
+
and the master index. Often enough to answer the question.
|
|
21
|
+
2. **Full search**: if not enough, call `wiki_query` in `mode: "standard"`
|
|
22
|
+
(default) with the user's question. Get top-N hits with snippets and
|
|
23
|
+
the inbound/outbound link graph.
|
|
24
|
+
3. **Follow links**: if a top hit looks promising, call `wiki_query` again
|
|
25
|
+
on the top hit's outbound titles to expand the context. Up to 2 hops.
|
|
26
|
+
4. **Synthesize**: write the answer with explicit `[[wikilink]]` citations.
|
|
27
|
+
Quote verbatim where useful; never invent.
|
|
28
|
+
|
|
29
|
+
## Don't
|
|
30
|
+
|
|
31
|
+
- Do not answer from prior knowledge alone if the vault is the source of
|
|
32
|
+
truth for this question. Always cite the page.
|
|
33
|
+
- Do not loop indefinitely. Cap at 3-5 `wiki_query` calls per turn.
|
|
34
|
+
- Do not return more than ~6 hits to the user; summarize instead.
|