obsidian-dev-skills 1.0.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/LICENSE +21 -0
- package/README.md +80 -0
- package/obsidian-ops/SKILL.md +35 -0
- package/obsidian-ops/references/build-workflow.md +75 -0
- package/obsidian-ops/references/performance.md +14 -0
- package/obsidian-ops/references/quick-reference.md +169 -0
- package/obsidian-ops/references/quick-sync-guide.md +166 -0
- package/obsidian-ops/references/release-readiness.md +210 -0
- package/obsidian-ops/references/security-privacy.md +61 -0
- package/obsidian-ops/references/summarize-commands.md +153 -0
- package/obsidian-ops/references/sync-procedure.md +381 -0
- package/obsidian-ops/references/testing.md +17 -0
- package/obsidian-ops/references/troubleshooting.md +114 -0
- package/obsidian-ops/references/versioning-releases.md +16 -0
- package/obsidian-ref/SKILL.md +35 -0
- package/obsidian-ref/references/environment.md +52 -0
- package/obsidian-ref/references/file-conventions.md +65 -0
- package/obsidian-ref/references/manifest.md +39 -0
- package/obsidian-ref/references/mobile.md +14 -0
- package/obsidian-ref/references/obsidian-file-formats.md +759 -0
- package/obsidian-ref/references/ref-instructions.md +548 -0
- package/obsidian-ref/references/references.md +22 -0
- package/obsidian-ref/references/ux-copy.md +15 -0
- package/package.json +29 -0
|
@@ -0,0 +1,548 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Project-specific instructions
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Update as reference management strategy evolves
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# .ref Folder Instructions
|
|
8
|
+
|
|
9
|
+
## Purpose
|
|
10
|
+
|
|
11
|
+
The `.ref` folder is a **gitignored directory** that uses **symlinks** to reference materials, documentation, and repositories. It acts as a "portal" to other locations on your computer, not a storage location itself.
|
|
12
|
+
|
|
13
|
+
**Key Concept**: The `.ref` folder should contain **symlinks** (not actual files) pointing to:
|
|
14
|
+
- **Global references** (like `obsidian-api`) → symlink to a central location (e.g., `C:\Users\david\Development\.ref\obsidian-dev`)
|
|
15
|
+
- **Local projects** you're developing → symlink to your working copy (e.g., `../my-other-plugin`)
|
|
16
|
+
- **External repos** → clone to central location first, then symlink
|
|
17
|
+
|
|
18
|
+
## Important: What Happens When Someone Clones This Repo?
|
|
19
|
+
|
|
20
|
+
**The `.ref` folder is gitignored**, so symlinks are **not committed** to the repository. When someone clones this repo:
|
|
21
|
+
|
|
22
|
+
1. The `.ref` folder will be **empty or missing**
|
|
23
|
+
2. They need to **set up their own symlinks** following the instructions below
|
|
24
|
+
3. They can either:
|
|
25
|
+
- **Option A**: Set up a central `.ref/obsidian-dev` location and symlink to it (recommended for multiple projects)
|
|
26
|
+
- **Option B**: Clone repos directly into `.ref` folder (simpler, but less efficient for multiple projects)
|
|
27
|
+
|
|
28
|
+
This is intentional - each developer manages their own reference setup based on their directory structure.
|
|
29
|
+
|
|
30
|
+
## Folder Organization
|
|
31
|
+
|
|
32
|
+
The `.ref` folder structure (via symlinks) should be organized as follows:
|
|
33
|
+
|
|
34
|
+
### Core Obsidian References (Always Relevant)
|
|
35
|
+
|
|
36
|
+
These 6 projects are **always relevant** for any Obsidian plugin or theme project. They should be symlinked in **every** project's `.ref` folder:
|
|
37
|
+
|
|
38
|
+
- **Root level**: Base Obsidian repositories (API, official docs, sample projects, linting)
|
|
39
|
+
- `obsidian-api/` → symlink to central location
|
|
40
|
+
- `obsidian-sample-plugin/` → symlink to central location
|
|
41
|
+
- `obsidian-developer-docs/` → symlink to central location
|
|
42
|
+
- `obsidian-plugin-docs/` → symlink to central location
|
|
43
|
+
- `obsidian-sample-theme/` → symlink to central location
|
|
44
|
+
- `eslint-plugin/` → symlink to central location (ESLint rules for Obsidian plugins)
|
|
45
|
+
|
|
46
|
+
### Project-Specific References (Optional, Project-Dependent)
|
|
47
|
+
|
|
48
|
+
These are **only relevant** to specific projects. They should be documented in `project-context.md` for each project that uses them:
|
|
49
|
+
|
|
50
|
+
- **`plugins/`**: Community plugins relevant to this specific project
|
|
51
|
+
- Example: `.ref/plugins/some-community-plugin/` → symlink to central location or working copy
|
|
52
|
+
- **Note**: Only add plugins that are specifically relevant to this project's development
|
|
53
|
+
|
|
54
|
+
- **`themes/`**: Community themes relevant to this specific project
|
|
55
|
+
- Example: `.ref/themes/some-community-theme/` → symlink to central location or working copy
|
|
56
|
+
- **Note**: Only add themes that are specifically relevant to this project's development
|
|
57
|
+
|
|
58
|
+
**Important**: The general `.agents` documentation focuses on the 6 core Obsidian projects. Project-specific plugins and themes should be documented in `project-context.md` for each project.
|
|
59
|
+
|
|
60
|
+
## For AI Agents
|
|
61
|
+
|
|
62
|
+
**IMPORTANT**: When the user asks you to reference something in `.ref`, actively search for it. The `.ref` folder may be hidden by default in some file explorers, but it exists in the project root. Use tools like `list_dir`, `glob_file_search`, or `read_file` to access `.ref` contents.
|
|
63
|
+
|
|
64
|
+
**Organization to remember**:
|
|
65
|
+
- **Core Obsidian repos** (always relevant) are in `.ref/` root (e.g., `.ref/obsidian-api/`)
|
|
66
|
+
- **Project-specific plugins** (only if relevant to this project) are in `.ref/plugins/` (e.g., `.ref/plugins/plugin-name/`)
|
|
67
|
+
- **Project-specific themes** (only if relevant to this project) are in `.ref/themes/` (e.g., `.ref/themes/theme-name/`)
|
|
68
|
+
|
|
69
|
+
**When adding references**:
|
|
70
|
+
- **External repos** (GitHub, GitLab, etc.) → Clone to `../.ref/obsidian-dev/` (global location), then create symlink in project's `.ref/`
|
|
71
|
+
- **Local projects** (projects you're developing) → Create symlink directly in project's `.ref/` pointing to the local project (don't clone to global)
|
|
72
|
+
|
|
73
|
+
If you cannot find `.ref` initially, try:
|
|
74
|
+
- Listing the root directory with hidden files enabled
|
|
75
|
+
- Using `glob_file_search` with pattern `.ref/**`
|
|
76
|
+
- Directly reading files with paths like `.ref/obsidian-api/README.md` or `.ref/plugins/plugin-name/main.ts`
|
|
77
|
+
|
|
78
|
+
### Checking for Updates to Reference Repos
|
|
79
|
+
|
|
80
|
+
**When the user asks about updates** (e.g., "are there any updates to the hider plugin repo?" or "check for updates to obsidian-api"):
|
|
81
|
+
|
|
82
|
+
1. **Search for the repo**:
|
|
83
|
+
- For plugins: Search `.ref/plugins/` for matching names (use fuzzy matching - "hider" might match "hider-plugin", "obsidian-hider", etc.)
|
|
84
|
+
- For themes: Search `.ref/themes/` for matching names
|
|
85
|
+
- For base Obsidian repos: Check `.ref/` root (obsidian-api, obsidian-sample-plugin, etc.)
|
|
86
|
+
|
|
87
|
+
2. **Check for updates** (read-only operations are safe):
|
|
88
|
+
```bash
|
|
89
|
+
# Navigate to the repo
|
|
90
|
+
cd .ref/plugins/hider-plugin # or whatever the actual folder name is
|
|
91
|
+
|
|
92
|
+
# Fetch latest changes (read-only, safe)
|
|
93
|
+
git fetch
|
|
94
|
+
|
|
95
|
+
# Check what's new (compare local vs remote)
|
|
96
|
+
git log HEAD..origin/main --oneline # or origin/master, depending on default branch
|
|
97
|
+
|
|
98
|
+
# Or see recent commits
|
|
99
|
+
git log --oneline -10
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
3. **Report findings**:
|
|
103
|
+
- If updates are available, show what changed (use `git log` or `git diff`)
|
|
104
|
+
- Ask if the user wants to pull the updates
|
|
105
|
+
- **Never automatically pull** - always ask first (see [agent-dos-donts.md](agent-dos-donts.md))
|
|
106
|
+
|
|
107
|
+
4. **If repo not found**:
|
|
108
|
+
- List what's available in `.ref/plugins/` or `.ref/themes/`
|
|
109
|
+
- Suggest adding it if it's not there yet (see "Adding Project-Specific References" section)
|
|
110
|
+
|
|
111
|
+
## First Time Setup
|
|
112
|
+
|
|
113
|
+
The goal is to have **one central `.ref/obsidian-dev` directory** on your computer that contains all Obsidian reference repos, and each project's `.ref` folder contains **symlinks** pointing to that central location. This avoids duplicating repos across projects and allows `.ref/` to be used for other purposes.
|
|
114
|
+
|
|
115
|
+
### Step 1: Set Up Central Reference Location (One-Time, Per Computer)
|
|
116
|
+
|
|
117
|
+
**Choose a central location** for all your Obsidian reference repos. This should be **outside** of any individual project folder. Common locations:
|
|
118
|
+
- Windows: `C:\Users\YourName\Development\.ref\obsidian-dev` or `C:\Development\.ref\obsidian-dev`
|
|
119
|
+
- macOS/Linux: `~/Development/.ref/obsidian-dev` or `/opt/ref/obsidian-dev`
|
|
120
|
+
|
|
121
|
+
**Clone the 6 core Obsidian projects once** to this central location:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Navigate to your chosen central location
|
|
125
|
+
cd ~/Development # or C:\Users\YourName\Development on Windows
|
|
126
|
+
mkdir -p .ref/obsidian-dev
|
|
127
|
+
cd .ref/obsidian-dev
|
|
128
|
+
|
|
129
|
+
# Clone all 6 core projects (one-time setup)
|
|
130
|
+
git clone https://github.com/obsidianmd/obsidian-api.git obsidian-api
|
|
131
|
+
git clone https://github.com/obsidianmd/obsidian-sample-plugin.git obsidian-sample-plugin
|
|
132
|
+
git clone https://github.com/obsidianmd/obsidian-developer-docs.git obsidian-developer-docs
|
|
133
|
+
git clone https://github.com/obsidianmd/obsidian-plugin-docs.git obsidian-plugin-docs
|
|
134
|
+
git clone https://github.com/obsidianmd/obsidian-sample-theme.git obsidian-sample-theme
|
|
135
|
+
git clone https://github.com/obsidianmd/eslint-plugin.git eslint-plugin
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
**Note**: You only do this once per computer. All your projects will symlink to this central location.
|
|
139
|
+
|
|
140
|
+
### Step 2: Create Symlinks in Each Project
|
|
141
|
+
|
|
142
|
+
**For each Obsidian project**, create symlinks pointing to your central location. The easiest way is to use the setup script:
|
|
143
|
+
|
|
144
|
+
**Windows**: Run `setup-ref-links.bat` from the project root
|
|
145
|
+
**macOS/Linux**: Run `./setup-ref-links.sh` from the project root
|
|
146
|
+
|
|
147
|
+
**Or manually** (if you prefer):
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# From your project root, create .ref directory
|
|
151
|
+
mkdir .ref
|
|
152
|
+
|
|
153
|
+
# Windows (PowerShell - adjust path to your central .ref/obsidian-dev):
|
|
154
|
+
# If your central .ref/obsidian-dev is at C:\Users\YourName\Development\.ref\obsidian-dev
|
|
155
|
+
# and your project is at C:\Users\YourName\Development\my-plugin:
|
|
156
|
+
cmd /c mklink /J .ref\obsidian-api ..\.ref\obsidian-dev\obsidian-api
|
|
157
|
+
cmd /c mklink /J .ref\obsidian-sample-plugin ..\.ref\obsidian-dev\obsidian-sample-plugin
|
|
158
|
+
cmd /c mklink /J .ref\obsidian-developer-docs ..\.ref\obsidian-dev\obsidian-developer-docs
|
|
159
|
+
cmd /c mklink /J .ref\obsidian-plugin-docs ..\.ref\obsidian-dev\obsidian-plugin-docs
|
|
160
|
+
cmd /c mklink /J .ref\obsidian-sample-theme ..\.ref\obsidian-dev\obsidian-sample-theme
|
|
161
|
+
cmd /c mklink /J .ref\eslint-plugin ..\.ref\obsidian-dev\eslint-plugin
|
|
162
|
+
|
|
163
|
+
# macOS/Linux (adjust path to your central .ref/obsidian-dev):
|
|
164
|
+
# If your central .ref/obsidian-dev is at ~/Development/.ref/obsidian-dev
|
|
165
|
+
# and your project is at ~/Development/my-plugin:
|
|
166
|
+
ln -s ../.ref/obsidian-dev/obsidian-api .ref/obsidian-api
|
|
167
|
+
ln -s ../.ref/obsidian-dev/obsidian-sample-plugin .ref/obsidian-sample-plugin
|
|
168
|
+
ln -s ../.ref/obsidian-dev/obsidian-developer-docs .ref/obsidian-developer-docs
|
|
169
|
+
ln -s ../.ref/obsidian-dev/obsidian-plugin-docs .ref/obsidian-plugin-docs
|
|
170
|
+
ln -s ../.ref/obsidian-dev/obsidian-sample-theme .ref/obsidian-sample-theme
|
|
171
|
+
ln -s ../.ref/obsidian-dev/eslint-plugin .ref/eslint-plugin
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Important**: Adjust the relative path (`../.ref/obsidian-dev`) based on where your project is relative to your central `.ref/obsidian-dev` location. If they're in different directory structures, use absolute paths.
|
|
175
|
+
|
|
176
|
+
**Easiest method**: Use the setup scripts in the `scripts/` folder:
|
|
177
|
+
- **Windows**: `scripts\setup-ref-links.bat` or `.\scripts\setup-ref-links.ps1`
|
|
178
|
+
- **macOS/Linux**: `./scripts/setup-ref-links.sh`
|
|
179
|
+
|
|
180
|
+
These scripts will automatically:
|
|
181
|
+
- Detect your central `.ref/obsidian-dev` location
|
|
182
|
+
- Clone the 6 core Obsidian projects if they don't exist
|
|
183
|
+
- Pull the latest changes if the repos already exist
|
|
184
|
+
- Create all the symlinks for you
|
|
185
|
+
|
|
186
|
+
You can run the setup script anytime to keep your reference repos up to date.
|
|
187
|
+
|
|
188
|
+
## Updating References (Optional)
|
|
189
|
+
|
|
190
|
+
**Note**: Updates are **optional**. The reference materials work fine with whatever version was cloned initially. Most users never need to update. Only update if you want the latest documentation.
|
|
191
|
+
|
|
192
|
+
**Easiest way to update**: Simply re-run the setup script from any project:
|
|
193
|
+
- **Windows**: `scripts\setup-ref-links.bat` or `.\scripts\setup-ref-links.ps1`
|
|
194
|
+
- **macOS/Linux**: `./scripts/setup-ref-links.sh`
|
|
195
|
+
|
|
196
|
+
The setup script will automatically pull the latest changes for all 6 core repos if they already exist.
|
|
197
|
+
|
|
198
|
+
**Manual update** (if you prefer): Update all references at once from your central location:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Navigate to the central location (adjust path as needed)
|
|
202
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
203
|
+
|
|
204
|
+
# Pull updates for all repos
|
|
205
|
+
cd obsidian-api && git pull && cd ..
|
|
206
|
+
cd obsidian-sample-plugin && git pull && cd ..
|
|
207
|
+
cd obsidian-developer-docs && git pull && cd ..
|
|
208
|
+
cd obsidian-plugin-docs && git pull && cd ..
|
|
209
|
+
cd obsidian-sample-theme && git pull && cd ..
|
|
210
|
+
cd eslint-plugin && git pull && cd ..
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
All plugin projects using symlinks will immediately see the updated content.
|
|
214
|
+
|
|
215
|
+
### Benefits
|
|
216
|
+
|
|
217
|
+
- **Single source of truth**: One clone that all projects reference
|
|
218
|
+
- **Easy updates**: One `git pull` updates all projects
|
|
219
|
+
- **Disk space efficient**: No duplicate clones
|
|
220
|
+
- **Works with Git**: Symlinks are transparent to Git operations
|
|
221
|
+
- **Flexibility**: Can also symlink to local projects you're developing
|
|
222
|
+
|
|
223
|
+
### Common Reference Repositories
|
|
224
|
+
|
|
225
|
+
**Core Obsidian Repositories (Always Relevant - Root Level)**:
|
|
226
|
+
These 6 projects should be symlinked in **every** Obsidian plugin/theme project:
|
|
227
|
+
- `obsidian-api`: Official Obsidian API documentation and type definitions
|
|
228
|
+
- `obsidian-sample-plugin`: Template plugin with best practices (contains `AGENTS.md` to sync from)
|
|
229
|
+
- `obsidian-developer-docs`: Source vault for docs.obsidian.md (official documentation)
|
|
230
|
+
- `obsidian-plugin-docs`: Plugin-specific documentation and guides
|
|
231
|
+
- `obsidian-sample-theme`: Theme template (useful for organizational patterns)
|
|
232
|
+
- `eslint-plugin`: ESLint rules for Obsidian plugins (catches common issues and enforces best practices)
|
|
233
|
+
|
|
234
|
+
**Project-Specific References (Optional - Organized in Subfolders)**:
|
|
235
|
+
These are only relevant to specific projects and should be documented in `project-context.md`:
|
|
236
|
+
- `plugins/`: Add community plugins here **only if they're relevant to this specific project**
|
|
237
|
+
- `themes/`: Add community themes here **only if they're relevant to this specific project**
|
|
238
|
+
|
|
239
|
+
**To add a community plugin or theme** (maintains single source of truth):
|
|
240
|
+
|
|
241
|
+
**Step 1**: Clone to central location:
|
|
242
|
+
```bash
|
|
243
|
+
# Navigate to central .ref location (adjust path as needed)
|
|
244
|
+
cd ../.ref/obsidian-dev/plugins # or cd ~/Development/.ref/obsidian-dev/plugins
|
|
245
|
+
git clone https://github.com/username/plugin-name.git plugin-name
|
|
246
|
+
|
|
247
|
+
# For a theme
|
|
248
|
+
cd ../.ref/obsidian-dev/themes # or cd ~/Development/.ref/obsidian-dev/themes
|
|
249
|
+
git clone https://github.com/username/theme-name.git theme-name
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**Step 2**: Create symlink in your project:
|
|
253
|
+
```bash
|
|
254
|
+
# From your project root
|
|
255
|
+
# Create subdirectories if needed
|
|
256
|
+
mkdir -p .ref/plugins .ref/themes
|
|
257
|
+
|
|
258
|
+
# Windows:
|
|
259
|
+
cmd /c mklink /J .ref\plugins\plugin-name ..\.ref\obsidian-dev\plugins\plugin-name
|
|
260
|
+
cmd /c mklink /J .ref\themes\theme-name ..\.ref\obsidian-dev\themes\theme-name
|
|
261
|
+
|
|
262
|
+
# macOS/Linux:
|
|
263
|
+
ln -s ../../.ref/obsidian-dev/plugins/plugin-name .ref/plugins/plugin-name
|
|
264
|
+
ln -s ../../.ref/obsidian-dev/themes/theme-name .ref/themes/theme-name
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Note**: See [sync-procedure.md](sync-procedure.md) for the standard procedure to keep `.agents` content synchronized with updates from these repositories.
|
|
268
|
+
|
|
269
|
+
## Adding Additional References
|
|
270
|
+
|
|
271
|
+
When you want to add more references (plugins, themes, or other projects), choose the method based on your use case:
|
|
272
|
+
|
|
273
|
+
### Option A: External Repository (Add to Global .ref/obsidian-dev)
|
|
274
|
+
|
|
275
|
+
**Use when**: Referencing an external repository (GitHub, GitLab, etc.) that you want to check for updates periodically.
|
|
276
|
+
|
|
277
|
+
**Important distinction**:
|
|
278
|
+
- **Core Obsidian projects** (the 6 always-relevant ones) → Always add to global `.ref/obsidian-dev` and symlink in **every** project
|
|
279
|
+
- **Project-specific plugins/themes** → Add to global `.ref/obsidian-dev` but **only symlink in projects that need them**. Document in `project-context.md`.
|
|
280
|
+
|
|
281
|
+
**Workflow**:
|
|
282
|
+
1. **Check if already exists**: If the repo is already in `../.ref/obsidian-dev/`, skip to step 2
|
|
283
|
+
2. **Clone to global location**: Clone to `../.ref/obsidian-dev/` (or `../.ref/obsidian-dev/plugins/` or `../.ref/obsidian-dev/themes/` as appropriate)
|
|
284
|
+
3. **Create symlink in project**: Create symlink in this project's `.ref/` folder pointing to the global location
|
|
285
|
+
4. **Document if project-specific**: If it's project-specific, document it in `project-context.md`
|
|
286
|
+
|
|
287
|
+
This maintains a single source of truth - one clone in the global location that projects can reference as needed.
|
|
288
|
+
|
|
289
|
+
**Step 1: Clone to central location** (your global `.ref/obsidian-dev` folder)
|
|
290
|
+
|
|
291
|
+
**IMPORTANT**: Clone the repo **directly** into the target folder. The result should be `../.ref/obsidian-dev/plugins/plugin-name/` (the actual repo), NOT `../.ref/obsidian-dev/plugins/.ref/plugin-name/`. The repo folder name should match the project name.
|
|
292
|
+
|
|
293
|
+
```bash
|
|
294
|
+
# Navigate to your central .ref location (e.g., C:\Users\david\Development\.ref\obsidian-dev)
|
|
295
|
+
# For a community plugin
|
|
296
|
+
cd ../.ref/obsidian-dev/plugins # or cd ~/Development/.ref/obsidian-dev/plugins
|
|
297
|
+
git clone https://github.com/username/plugin-name.git plugin-name
|
|
298
|
+
# Result: ../.ref/obsidian-dev/plugins/plugin-name/ (the actual repo folder)
|
|
299
|
+
|
|
300
|
+
# For a community theme
|
|
301
|
+
cd ../.ref/obsidian-dev/themes # or cd ~/Development/.ref/obsidian-dev/themes
|
|
302
|
+
git clone https://github.com/username/theme-name.git theme-name
|
|
303
|
+
# Result: ../.ref/obsidian-dev/themes/theme-name/ (the actual repo folder)
|
|
304
|
+
|
|
305
|
+
# For other external projects (root level of obsidian-dev)
|
|
306
|
+
cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
|
|
307
|
+
git clone https://github.com/username/repo-name.git repo-name
|
|
308
|
+
# Result: ../.ref/obsidian-dev/repo-name/ (the actual repo folder)
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Step 2: Create symlink in this project**
|
|
312
|
+
```bash
|
|
313
|
+
# From your project root
|
|
314
|
+
# Create subdirectories if needed
|
|
315
|
+
mkdir -p .ref/plugins .ref/themes
|
|
316
|
+
|
|
317
|
+
# Windows (adjust path to your central .ref/obsidian-dev location):
|
|
318
|
+
cmd /c mklink /J .ref\plugins\plugin-name ..\.ref\obsidian-dev\plugins\plugin-name
|
|
319
|
+
cmd /c mklink /J .ref\themes\theme-name ..\.ref\obsidian-dev\themes\theme-name
|
|
320
|
+
cmd /c mklink /J .ref\repo-name ..\.ref\obsidian-dev\repo-name
|
|
321
|
+
|
|
322
|
+
# macOS/Linux (adjust path to your central .ref/obsidian-dev location):
|
|
323
|
+
ln -s ../../.ref/obsidian-dev/plugins/plugin-name .ref/plugins/plugin-name
|
|
324
|
+
ln -s ../../.ref/obsidian-dev/themes/theme-name .ref/themes/theme-name
|
|
325
|
+
ln -s ../.ref/obsidian-dev/repo-name .ref/repo-name
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Benefits**:
|
|
329
|
+
- Single source of truth - one clone in central location
|
|
330
|
+
- Can check for updates with `git pull` in central location
|
|
331
|
+
- All projects using symlinks see updates immediately
|
|
332
|
+
- Full Git history available
|
|
333
|
+
- Disk space efficient
|
|
334
|
+
|
|
335
|
+
**To check for updates later**:
|
|
336
|
+
```bash
|
|
337
|
+
# Update in central location (adjust path as needed)
|
|
338
|
+
cd ../.ref/obsidian-dev/plugins/plugin-name # or cd ~/Development/.ref/obsidian-dev/plugins/plugin-name
|
|
339
|
+
git pull
|
|
340
|
+
|
|
341
|
+
# All projects with symlinks to this repo will immediately see the updates
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
### Option B: Local Project You're Developing (Symlink to Working Copy)
|
|
345
|
+
|
|
346
|
+
**Use when**: You're actively developing another project alongside this one and want to see changes in real-time. This should **NOT** be added to your global `.ref/obsidian-dev` - it should symlink directly to your working copy.
|
|
347
|
+
|
|
348
|
+
**Workflow**:
|
|
349
|
+
1. **Create symlink directly**: Create a symlink directly from this project's `.ref/` folder to your working copy (e.g., `../my-other-plugin`)
|
|
350
|
+
2. **Do NOT clone**: Do not clone this to the global `.ref/` location - it's project-specific
|
|
351
|
+
3. **Document**: Document it in `project-context.md` if it's relevant to this project
|
|
352
|
+
|
|
353
|
+
This references your active development work, not a reference copy. Changes are immediately visible.
|
|
354
|
+
|
|
355
|
+
```bash
|
|
356
|
+
# From your project root
|
|
357
|
+
# Create subdirectories if needed
|
|
358
|
+
mkdir -p .ref/plugins .ref/themes
|
|
359
|
+
|
|
360
|
+
# Windows (adjust path to your working copy):
|
|
361
|
+
# Example: If you're in Development/my-plugin and want to reference Development/my-other-plugin:
|
|
362
|
+
cmd /c mklink /J .ref\plugins\my-other-plugin ..\my-other-plugin
|
|
363
|
+
cmd /c mklink /J .ref\themes\my-theme ..\my-theme
|
|
364
|
+
cmd /c mklink /J .ref\project-name ..\project-name
|
|
365
|
+
|
|
366
|
+
# macOS/Linux (adjust path to your working copy):
|
|
367
|
+
ln -s ../my-other-plugin .ref/plugins/my-other-plugin
|
|
368
|
+
ln -s ../my-theme .ref/themes/my-theme
|
|
369
|
+
ln -s ../project-name .ref/project-name
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Note**:
|
|
373
|
+
- Adjust the relative path (`../`) based on your directory structure
|
|
374
|
+
- If your projects are in `Development/`, and you're in `Development/my-plugin`, use `../` to go up one level
|
|
375
|
+
- For absolute paths: `cmd /c mklink /J .ref\project-name C:\Users\david\Development\project-name` (Windows) or `ln -s ~/Development/project-name .ref/project-name` (Unix)
|
|
376
|
+
|
|
377
|
+
**Benefits**:
|
|
378
|
+
- References your active working copy (not a duplicate)
|
|
379
|
+
- Changes in your working copy are immediately visible
|
|
380
|
+
- Perfect for projects you're actively developing alongside this one
|
|
381
|
+
- No need to clone or copy - just symlink to where you're already working
|
|
382
|
+
|
|
383
|
+
**Note**: With symlinks, any changes you make to the original project are immediately visible in `.ref/project-name/` - no need to pull or sync. This is different from Option A, which clones to the central `.ref/obsidian-dev` location first.
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
### Quick Decision Guide
|
|
387
|
+
|
|
388
|
+
- **6 Core Obsidian projects** (obsidian-api, obsidian-sample-plugin, obsidian-developer-docs, obsidian-plugin-docs, obsidian-sample-theme, eslint-plugin) → **Always** clone to global `.ref/obsidian-dev` and symlink in **every** project
|
|
389
|
+
- **External repository** (GitHub, GitLab, etc.) that's project-specific → Use **Option A** - Clone to your **global/central `.ref/obsidian-dev` location**, then symlink **only in projects that need it**. Document in `project-context.md`.
|
|
390
|
+
- **Local project you're actively developing** → Use **Option B** - Symlink directly to your working copy (e.g., `../project-name`). **Do NOT** add to global `.ref/obsidian-dev` - this is project-specific. Document in `project-context.md`.
|
|
391
|
+
|
|
392
|
+
### Quick Workflow
|
|
393
|
+
|
|
394
|
+
1. **Decide which option** based on your use case (see above)
|
|
395
|
+
2. **Add to `.ref`** using the appropriate method:
|
|
396
|
+
- **Option A (External)**: Clone to your **global `.ref/obsidian-dev` location** (e.g., `C:\Users\david\Development\.ref\obsidian-dev`) first, then create symlink in this project's `.ref/`
|
|
397
|
+
- **Option B (Local)**: Create symlink directly from this project's `.ref/` to your working copy (e.g., `../project-name`)
|
|
398
|
+
- **Plugins/Themes**: Use `plugins/` or `themes/` subfolders for organization
|
|
399
|
+
3. **Reference in your work** - AI agents can now access it via:
|
|
400
|
+
- `.ref/plugins/plugin-name/` for plugins
|
|
401
|
+
- `.ref/themes/theme-name/` for themes
|
|
402
|
+
- `.ref/project-name/` for other projects
|
|
403
|
+
4. **Update as needed**:
|
|
404
|
+
- **Option A (External)**: `cd ../.ref/obsidian-dev/plugins/plugin-name && git pull` (updates in global location - all projects with symlinks see updates immediately)
|
|
405
|
+
- **Option B (Local)**: Changes automatically visible - no action needed (you're working directly on the source)
|
|
406
|
+
|
|
407
|
+
## Summary: Key Concepts
|
|
408
|
+
|
|
409
|
+
1. **`.ref` folder is gitignored** - Symlinks are not committed to the repository
|
|
410
|
+
2. **6 Core Obsidian projects** (obsidian-api, obsidian-sample-plugin, obsidian-developer-docs, obsidian-plugin-docs, obsidian-sample-theme, eslint-plugin) are **always relevant** for any Obsidian project → Clone to central location (e.g., `C:\Users\david\Development\.ref\obsidian-dev`), then symlink in **every** project
|
|
411
|
+
3. **Project-specific plugins/themes** are **only relevant** to specific projects → Document in `project-context.md`, symlink only in projects that need them
|
|
412
|
+
4. **Local projects** you're developing → Symlink directly to working copy (don't add to global `.ref/obsidian-dev`)
|
|
413
|
+
5. **External repos** → Clone to global `.ref/obsidian-dev` location first, then symlink in projects
|
|
414
|
+
6. **When someone clones this repo** → They need to set up their own symlinks (the `.ref` folder will be empty)
|
|
415
|
+
|
|
416
|
+
### Example Directory Structure
|
|
417
|
+
|
|
418
|
+
```
|
|
419
|
+
C:\Users\david\Development\
|
|
420
|
+
├── .ref\ # Global reference location (one-time setup)
|
|
421
|
+
│ └── obsidian-dev\ # Obsidian-specific references
|
|
422
|
+
│ ├── obsidian-api\ # Core (always relevant)
|
|
423
|
+
│ ├── obsidian-sample-plugin\ # Core (always relevant)
|
|
424
|
+
│ ├── obsidian-developer-docs\ # Core (always relevant)
|
|
425
|
+
│ ├── obsidian-plugin-docs\ # Core (always relevant)
|
|
426
|
+
│ ├── obsidian-sample-theme\ # Core (always relevant)
|
|
427
|
+
│ ├── eslint-plugin\ # Core (always relevant)
|
|
428
|
+
│ ├── plugins\ # Project-specific (only if needed)
|
|
429
|
+
│ │ └── some-community-plugin\
|
|
430
|
+
│ └── themes\ # Project-specific (only if needed)
|
|
431
|
+
│ └── some-community-theme\
|
|
432
|
+
│
|
|
433
|
+
└── obsidian-sample-plugin\ # Your project
|
|
434
|
+
└── .ref\ # Symlinks only (gitignored)
|
|
435
|
+
├── obsidian-api → ..\.ref\obsidian-dev\obsidian-api # Core (always)
|
|
436
|
+
├── obsidian-sample-plugin → ..\.ref\obsidian-dev\obsidian-sample-plugin # Core (always)
|
|
437
|
+
├── obsidian-developer-docs → ..\.ref\obsidian-dev\obsidian-developer-docs # Core (always)
|
|
438
|
+
├── obsidian-plugin-docs → ..\.ref\obsidian-dev\obsidian-plugin-docs # Core (always)
|
|
439
|
+
├── obsidian-sample-theme → ..\.ref\obsidian-dev\obsidian-sample-theme # Core (always)
|
|
440
|
+
├── eslint-plugin → ..\.ref\obsidian-dev\eslint-plugin # Core (always)
|
|
441
|
+
├── plugins\ # Project-specific
|
|
442
|
+
│ └── some-community-plugin → ..\.ref\obsidian-dev\plugins\some-community-plugin
|
|
443
|
+
└── my-other-plugin → ..\my-other-plugin # Local project symlink
|
|
444
|
+
```
|
|
445
|
+
|
|
446
|
+
### Notes
|
|
447
|
+
|
|
448
|
+
**Windows**:
|
|
449
|
+
- Directory junctions (`mklink /J`) are preferred over symbolic links (`mklink /D`) for directories
|
|
450
|
+
- Junctions require administrator privileges or Developer Mode enabled in Windows 10/11
|
|
451
|
+
- Use forward slashes in paths when possible, or backslashes for Windows-specific commands
|
|
452
|
+
|
|
453
|
+
**macOS/Linux**:
|
|
454
|
+
- Use `ln -s` to create symbolic links
|
|
455
|
+
- Ensure you have write permissions in the target directory
|
|
456
|
+
|
|
457
|
+
**Path Tips**:
|
|
458
|
+
- Use relative paths (e.g., `../.ref/obsidian-dev`) when possible for portability
|
|
459
|
+
- Adjust paths based on your directory structure
|
|
460
|
+
- If your central `.ref/obsidian-dev` is at a different location, use absolute paths (e.g., `~/Development/.ref/obsidian-dev` on Unix, or adjust relative paths accordingly)
|
|
461
|
+
|
|
462
|
+
**General**:
|
|
463
|
+
- The `.ref` folder should be added to `.gitignore` (see project `.gitignore`)
|
|
464
|
+
|
|
465
|
+
## .agents Folder (Symlink Architecture)
|
|
466
|
+
|
|
467
|
+
Similar to the `.ref` folder, the `.agents/` folder uses a **symlink architecture** to provide access to shared, general-purpose guidance files. This allows:
|
|
468
|
+
|
|
469
|
+
- **Single source of truth**: General `.agents` files are maintained in one central location (`../.ref/obsidian-dev/.agents/`)
|
|
470
|
+
- **Automatic updates**: Changes to central `.agents` files propagate to all projects automatically
|
|
471
|
+
- **Project-specific content**: Each project's `AGENTS.md` file remains project-specific and is not symlinked
|
|
472
|
+
- **No manual copying**: No need to manually copy `.agents` files to each project
|
|
473
|
+
|
|
474
|
+
### Architecture Overview
|
|
475
|
+
|
|
476
|
+
```
|
|
477
|
+
Central Location: ../.ref/obsidian-dev/.agents/
|
|
478
|
+
├── All general-purpose .agents files
|
|
479
|
+
└── (symlinked from central repository for active development)
|
|
480
|
+
|
|
481
|
+
Plugin Project
|
|
482
|
+
├── AGENTS.md (project-specific, replaces project-context.md)
|
|
483
|
+
└── .agents/ → symlink to ../.ref/obsidian-dev/.agents/
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### First Time Setup
|
|
487
|
+
|
|
488
|
+
**For the central repository** (where `.agents` files are maintained):
|
|
489
|
+
1. Run the setup script: `.\scripts\setup-agents-link.ps1` (Windows) or `./scripts/setup-agents-link.sh` (Unix)
|
|
490
|
+
2. This creates a symlink from `../.ref/obsidian-dev/.agents/` → your repo's `.agents/` directory
|
|
491
|
+
3. This allows you to edit `.agents` files in your dev repo and have them available centrally
|
|
492
|
+
|
|
493
|
+
**For plugin projects** (using the shared `.agents` files):
|
|
494
|
+
1. Run the setup script: `.\scripts\setup-agents-link.ps1` (Windows) or `./scripts/setup-agents-link.sh` (Unix)
|
|
495
|
+
2. The script detects you're in a plugin project (not the central repo)
|
|
496
|
+
3. It creates a symlink from `.agents/` → `../.ref/obsidian-dev/.agents/`
|
|
497
|
+
4. If `.agents/` already exists as a directory, it backs it up to `.agents.backup/`
|
|
498
|
+
|
|
499
|
+
### Setup Scripts
|
|
500
|
+
|
|
501
|
+
The setup scripts automatically:
|
|
502
|
+
- Detect if you're in the central repo (has actual `.agents/` directory) vs a plugin project
|
|
503
|
+
- Create appropriate symlinks based on context
|
|
504
|
+
- Handle Windows vs Unix symlink creation
|
|
505
|
+
- Backup existing `.agents/` directories if needed
|
|
506
|
+
|
|
507
|
+
**Windows**: `scripts\setup-agents-link.bat` or `.\scripts\setup-agents-link.ps1`
|
|
508
|
+
**macOS/Linux**: `./scripts/setup-agents-link.sh`
|
|
509
|
+
|
|
510
|
+
### How It Works
|
|
511
|
+
|
|
512
|
+
1. **Central repository**: Contains the actual `.agents/` directory with all general-purpose files
|
|
513
|
+
- When you edit files here, they're immediately available via the symlink
|
|
514
|
+
- The symlink from `../.ref/obsidian-dev/.agents/` → your repo ensures changes propagate
|
|
515
|
+
|
|
516
|
+
2. **Plugin projects**: Have `.agents/` as a symlink to the central location
|
|
517
|
+
- All general-purpose guidance files are accessed via the symlink
|
|
518
|
+
- Project-specific content is in `AGENTS.md` (not symlinked)
|
|
519
|
+
- Updates to central `.agents` files are immediately visible
|
|
520
|
+
|
|
521
|
+
3. **Project-specific overrides**: Use `.agents/.context/` directory (optional, advanced)
|
|
522
|
+
- Only create files that differ from general guidance
|
|
523
|
+
- Structure mirrors `.agents/` directory (e.g., `.context/build-workflow.md`)
|
|
524
|
+
|
|
525
|
+
### Benefits
|
|
526
|
+
|
|
527
|
+
- ✅ **Single source of truth**: General `.agents` files maintained in one location
|
|
528
|
+
- ✅ **Automatic propagation**: Changes to central files appear in all projects immediately
|
|
529
|
+
- ✅ **Project-specific content**: Each project's `AGENTS.md` stays project-specific
|
|
530
|
+
- ✅ **No manual copying**: No need to copy `.agents` files to each project
|
|
531
|
+
- ✅ **Consistent with `.ref` pattern**: Uses the same symlink architecture
|
|
532
|
+
|
|
533
|
+
### Troubleshooting
|
|
534
|
+
|
|
535
|
+
**If `.agents/` is missing or not a symlink**:
|
|
536
|
+
- Run the setup script: `scripts\setup-agents-link.bat` (Windows), `.\scripts\setup-agents-link.ps1` (PowerShell), or `./scripts/setup-agents-link.sh` (macOS/Linux)
|
|
537
|
+
- The script will create the symlink to `../.ref/obsidian-dev/.agents/`
|
|
538
|
+
|
|
539
|
+
**If symlink is broken**:
|
|
540
|
+
- Re-run the setup script - it will recreate the symlink
|
|
541
|
+
|
|
542
|
+
**If central location doesn't exist**:
|
|
543
|
+
- Run the setup script from the central repository first to create the central location
|
|
544
|
+
- Then run it from plugin projects to create the symlinks
|
|
545
|
+
|
|
546
|
+
**Note**: The `.agents/` folder may be hidden by default in some file explorers, but it exists in the project root. Use tools like `list_dir`, `glob_file_search`, or `read_file` to access `.agents` contents.
|
|
547
|
+
|
|
548
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Obsidian official documentation and resources
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Check periodically for new resources
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# References
|
|
8
|
+
|
|
9
|
+
## Official Repositories
|
|
10
|
+
- Obsidian sample plugin: https://github.com/obsidianmd/obsidian-sample-plugin
|
|
11
|
+
- Obsidian API: https://github.com/obsidianmd/obsidian-api
|
|
12
|
+
- Obsidian developer docs: https://github.com/obsidianmd/obsidian-developer-docs
|
|
13
|
+
- Obsidian plugin docs: https://github.com/obsidianmd/obsidian-plugin-docs
|
|
14
|
+
- Obsidian sample theme: https://github.com/obsidianmd/obsidian-sample-theme
|
|
15
|
+
|
|
16
|
+
## Official Documentation
|
|
17
|
+
- API documentation: https://docs.obsidian.md
|
|
18
|
+
- Developer policies: https://docs.obsidian.md/Developer+policies
|
|
19
|
+
- Plugin guidelines: https://docs.obsidian.md/Plugins/Releasing/Plugin+guidelines
|
|
20
|
+
- Style guide: https://help.obsidian.md/style-guide
|
|
21
|
+
|
|
22
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Source: Based on Obsidian style guide and UX guidelines
|
|
3
|
+
Last synced: See sync-status.json for authoritative sync dates
|
|
4
|
+
Update frequency: Check Obsidian style guide for updates
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
# UX & copy guidelines (for UI text, commands, settings)
|
|
8
|
+
|
|
9
|
+
- Prefer sentence case for headings, buttons, and titles.
|
|
10
|
+
- Use clear, action-oriented imperatives in step-by-step copy.
|
|
11
|
+
- Use **bold** to indicate literal UI labels. Prefer "select" for interactions.
|
|
12
|
+
- Use arrow notation for navigation: **Settings → Appearance → Themes**.
|
|
13
|
+
- Keep in-app strings short, consistent, and free of jargon.
|
|
14
|
+
|
|
15
|
+
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "obsidian-dev-skills",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Agent skills for Obsidian plugin and theme development",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"obsidian",
|
|
7
|
+
"plugin",
|
|
8
|
+
"theme",
|
|
9
|
+
"development",
|
|
10
|
+
"skills",
|
|
11
|
+
"ai",
|
|
12
|
+
"agent"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/davidvkimball/obsidian-dev-skills",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/davidvkimball/obsidian-dev-skills.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "David V. Kimball",
|
|
21
|
+
"files": [
|
|
22
|
+
"obsidian-dev/",
|
|
23
|
+
"obsidian-ops/",
|
|
24
|
+
"obsidian-ref/"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=16.0.0"
|
|
28
|
+
}
|
|
29
|
+
}
|