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.
@@ -0,0 +1,381 @@
1
+ <!--
2
+ Source: Project-specific procedure
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Update as sync process evolves
5
+ Applicability: Both
6
+ -->
7
+
8
+ # Sync Procedure: Keeping .agents Up to Date
9
+
10
+ **Sync Tracking**: All sync dates are tracked centrally in [sync-status.json](sync-status.json). Always update this file with the actual current date when syncing (use `Get-Date -Format "yyyy-MM-dd"` to get the date - never use placeholder dates).
11
+
12
+ This document outlines the standard procedure for keeping the `.agents` directory content synchronized with the latest updates from the 6 core Obsidian repositories:
13
+ - [Obsidian API](https://github.com/obsidianmd/obsidian-api) - Official API documentation and type definitions
14
+ - [Obsidian Sample Plugin](https://github.com/obsidianmd/obsidian-sample-plugin) - Template plugin with best practices
15
+ - [Obsidian Developer Docs](https://github.com/obsidianmd/obsidian-developer-docs) - Source vault for docs.obsidian.md
16
+ - [Obsidian Plugin Docs](https://github.com/obsidianmd/obsidian-plugin-docs) - Plugin-specific documentation
17
+ - [Obsidian Sample Theme](https://github.com/obsidianmd/obsidian-sample-theme) - Theme template (for reference patterns)
18
+ - [ESLint Plugin](https://github.com/obsidianmd/eslint-plugin) - ESLint rules for Obsidian plugins
19
+
20
+ ## Prerequisites
21
+
22
+ 1. **Set up reference repositories** (see [ref-instructions.md](ref-instructions.md)):
23
+ - The 6 core Obsidian projects should be available in `.ref/` (either as symlinks to a central location or as local clones):
24
+ - `obsidian-api/` - API documentation
25
+ - `obsidian-sample-plugin/` - Sample plugin template
26
+ - `obsidian-developer-docs/` - Developer documentation
27
+ - `obsidian-plugin-docs/` - Plugin-specific docs
28
+ - `obsidian-sample-theme/` - Theme template
29
+ - `eslint-plugin/` - ESLint rules
30
+ - **Important**: If using symlinks (recommended), they typically point to a central location like `..\.ref\obsidian-dev` (one level up from project root) or `~/Development/.ref/obsidian-dev`
31
+
32
+ ## Sync Workflow
33
+
34
+ **Before starting**: Get the current date for tracking (always use actual date, never placeholder):
35
+ ```powershell
36
+ $syncDate = Get-Date -Format "yyyy-MM-dd"
37
+ Write-Host "Sync date: $syncDate"
38
+ ```
39
+
40
+ ### Step 1: Determine Your .ref Setup
41
+
42
+ **CRITICAL**: Before updating repos, you need to determine whether `.ref` contains symlinks or actual repos. Git operations must be performed on the **actual target location**, not on symlinks.
43
+
44
+ #### Check if .ref Contains Symlinks
45
+
46
+ **Windows (PowerShell)**:
47
+ ```powershell
48
+ # Check if a specific repo is a symlink
49
+ $item = Get-Item .ref/obsidian-api
50
+ if ($item.LinkType -eq "Junction" -or $item.LinkType -eq "SymbolicLink") {
51
+ Write-Host "Symlink detected - target: $($item.Target)"
52
+ # Navigate to the actual target location
53
+ cd $item.Target
54
+ } else {
55
+ Write-Host "Regular directory - can use .ref/obsidian-api directly"
56
+ cd .ref/obsidian-api
57
+ }
58
+ ```
59
+
60
+ **macOS/Linux**:
61
+ ```bash
62
+ # Check if a specific repo is a symlink
63
+ if [ -L .ref/obsidian-api ]; then
64
+ echo "Symlink detected - target: $(readlink .ref/obsidian-api)"
65
+ # Navigate to the actual target location
66
+ cd "$(readlink -f .ref/obsidian-api)"
67
+ else
68
+ echo "Regular directory - can use .ref/obsidian-api directly"
69
+ cd .ref/obsidian-api
70
+ fi
71
+ ```
72
+
73
+ **Quick Check**: If `.ref` contains symlinks, they typically point to `..\.ref\obsidian-dev` (one level up from project root) or a central location like `~/Development/.ref/obsidian-dev` or `C:\Users\YourName\Development\.ref\obsidian-dev`.
74
+
75
+ ### Step 2: Update Reference Repositories
76
+
77
+ Once you know your setup, update the repos:
78
+
79
+ #### Option A: If Using Symlinks to Central Location
80
+
81
+ **Windows (PowerShell)**:
82
+ ```powershell
83
+ # First, check where symlinks point (usually ..\.ref\obsidian-dev)
84
+ $target = (Get-Item .ref/obsidian-api).Target
85
+ Write-Host "Symlinks point to: $target"
86
+
87
+ # Navigate to central location and update all repos
88
+ cd ..\.ref\obsidian-dev # Adjust path if your central .ref is elsewhere
89
+ cd obsidian-api; git pull; cd ..
90
+ cd obsidian-sample-plugin; git pull; cd ..
91
+ cd obsidian-developer-docs; git pull; cd ..
92
+ cd obsidian-plugin-docs; git pull; cd ..
93
+ cd obsidian-sample-theme; git pull; cd ..
94
+ cd eslint-plugin; git pull; cd ..
95
+ ```
96
+
97
+ **macOS/Linux**:
98
+ ```bash
99
+ # First, check where symlinks point (usually ../.ref/obsidian-dev)
100
+ TARGET=$(readlink -f .ref/obsidian-api | sed 's|/obsidian-api$||')
101
+ echo "Symlinks point to: $TARGET"
102
+
103
+ # Navigate to central location and update all repos
104
+ cd "$TARGET" # or cd ../.ref/obsidian-dev if that's your central location
105
+ cd obsidian-api && git pull && cd ..
106
+ cd obsidian-sample-plugin && git pull && cd ..
107
+ cd obsidian-developer-docs && git pull && cd ..
108
+ cd obsidian-plugin-docs && git pull && cd ..
109
+ cd obsidian-sample-theme && git pull && cd ..
110
+ cd eslint-plugin && git pull && cd ..
111
+ ```
112
+
113
+ #### Option B: If Using Local Clones (No Symlinks)
114
+
115
+ If `.ref` contains actual repos (not symlinks), update from project root:
116
+
117
+ **Windows (PowerShell)**:
118
+ ```powershell
119
+ # Always start from project root for each command
120
+ cd C:\path\to\your\obsidian-project
121
+ cd .ref/obsidian-api; git pull
122
+ cd C:\path\to\your\obsidian-project
123
+ cd .ref/obsidian-sample-plugin; git pull
124
+ cd C:\path\to\your\obsidian-project
125
+ cd .ref/obsidian-developer-docs; git pull
126
+ cd C:\path\to\your\obsidian-project
127
+ cd .ref/obsidian-plugin-docs; git pull
128
+ cd C:\path\to\your\obsidian-project
129
+ cd .ref/obsidian-sample-theme; git pull
130
+ cd C:\path\to\your\obsidian-project
131
+ cd .ref/eslint-plugin; git pull
132
+ ```
133
+
134
+ **macOS/Linux**:
135
+ ```bash
136
+ # Always start from project root for each command
137
+ cd .ref/obsidian-api && git pull && cd ../..
138
+ cd .ref/obsidian-sample-plugin && git pull && cd ../..
139
+ cd .ref/obsidian-developer-docs && git pull && cd ../..
140
+ cd .ref/obsidian-plugin-docs && git pull && cd ../..
141
+ cd .ref/obsidian-sample-theme && git pull && cd ../..
142
+ cd .ref/eslint-plugin && git pull && cd ../..
143
+ ```
144
+
145
+ **Important**: When using local clones, always navigate back to project root between commands to avoid path accumulation errors.
146
+
147
+ ### Step 3: Review Changes
148
+
149
+ Check what's changed in the reference repos. **Remember**: If using symlinks, navigate to the actual target location (usually `..\.ref\obsidian-dev`), not the symlink.
150
+
151
+ **Windows (PowerShell)** - If using symlinks:
152
+ ```powershell
153
+ # Navigate to central location first
154
+ cd ..\.ref\obsidian-dev # Adjust if your central .ref is elsewhere
155
+
156
+ # Check recent commits in obsidian-api
157
+ cd obsidian-api
158
+ git log --oneline -10
159
+ cd ..
160
+
161
+ # Check recent commits in obsidian-sample-plugin
162
+ cd obsidian-sample-plugin
163
+ git log --oneline -10
164
+ git diff HEAD~1 HEAD -- AGENTS.md # Check if AGENTS.md changed
165
+ cd ..
166
+
167
+ # Check developer docs changes
168
+ cd obsidian-developer-docs
169
+ git log --oneline -10
170
+ cd ..
171
+
172
+ # Check plugin docs changes
173
+ cd obsidian-plugin-docs
174
+ git log --oneline -10
175
+ cd ..
176
+ ```
177
+
178
+ **Windows (PowerShell)** - If using local clones:
179
+ ```powershell
180
+ # Always start from project root for each command
181
+ cd C:\path\to\your\obsidian-project
182
+ cd .ref\obsidian-api
183
+ git log --oneline -10
184
+ cd C:\path\to\your\obsidian-project
185
+ cd .ref\obsidian-sample-plugin
186
+ git log --oneline -10
187
+ git diff HEAD~1 HEAD -- AGENTS.md
188
+ ```
189
+
190
+ **macOS/Linux** - If using symlinks:
191
+ ```bash
192
+ # Navigate to central location first
193
+ cd ../.ref/obsidian-dev # or cd ~/Development/.ref/obsidian-dev
194
+
195
+ # Check recent commits
196
+ cd obsidian-api && git log --oneline -10 && cd ..
197
+ cd obsidian-sample-plugin && git log --oneline -10 && git diff HEAD~1 HEAD -- AGENTS.md && cd ..
198
+ cd obsidian-developer-docs && git log --oneline -10 && cd ..
199
+ cd obsidian-plugin-docs && git log --oneline -10 && cd ..
200
+ ```
201
+
202
+ ### Step 4: Identify Files to Update
203
+
204
+ Based on the changes, identify which `.agents` files need updates:
205
+
206
+ - **Sample Plugin changes** → Check these files:
207
+ - `environment.md` - Build tooling, npm scripts
208
+ - `file-conventions.md` - File structure recommendations
209
+ - `common-tasks.md` - Code examples
210
+ - `testing.md` - Installation procedures
211
+ - `versioning-releases.md` - Release workflow
212
+ - `coding-conventions.md` - TypeScript patterns
213
+
214
+ - **API changes** → Check these files:
215
+ - `project-overview.md` - API usage patterns
216
+ - `commands-settings.md` - Command API changes
217
+ - `common-tasks.md` - API usage examples
218
+ - `references.md` - API documentation links
219
+
220
+ - **Developer Docs changes** → Check:
221
+ - `security-privacy.md` - Policy updates
222
+ - `manifest.md` - Manifest requirements
223
+ - `ux-copy.md` - Style guide updates
224
+ - `commands-settings.md` - Command documentation
225
+ - `testing.md` - Testing procedures
226
+ - `versioning-releases.md` - Release guidelines
227
+ - Review `en/` directory for new or updated documentation
228
+
229
+ - **Plugin Docs changes** → Check:
230
+ - `project-overview.md` - Plugin architecture
231
+ - `common-tasks.md` - Plugin-specific patterns
232
+ - `troubleshooting.md` - Common plugin issues
233
+ - Any plugin-specific best practices
234
+
235
+ - **Sample Theme changes** (optional reference):
236
+ - `file-conventions.md` - File organization patterns
237
+ - `versioning-releases.md` - Release workflow similarities
238
+
239
+ ### Step 5: Update .agents Files
240
+
241
+ For each file that needs updating:
242
+
243
+ 1. **Read the source material**:
244
+ - Compare `.ref/obsidian-sample-plugin/AGENTS.md` with current `.agents` files
245
+ - Review `.ref/obsidian-api/` for API documentation changes
246
+ - Review `.ref/obsidian-developer-docs/en/` for official documentation updates
247
+ - Check `.ref/obsidian-plugin-docs/` for plugin-specific guidance
248
+ - Optionally reference `.ref/obsidian-sample-theme/` for organizational patterns
249
+
250
+ 2. **Update the content**:
251
+ - Copy relevant sections from source
252
+ - Adapt to match the topic-based structure
253
+ - Preserve any project-specific additions
254
+
255
+ 3. **Update the sync status**:
256
+
257
+ **Easy way** (recommended): Use the helper script:
258
+ ```bash
259
+ node scripts/update-sync-status.mjs "Description of what was synced"
260
+ ```
261
+
262
+ **Manual way**: Edit `.agent/sync-status.json` directly:
263
+ ```powershell
264
+ # Get the current date
265
+ $syncDate = Get-Date -Format "yyyy-MM-dd"
266
+
267
+ # Update the central sync-status.json file
268
+ # Edit .agent/sync-status.json and update:
269
+ # - "lastFullSync" to the current date
270
+ # - "lastSyncSource" to describe what was synced
271
+ # - Update relevant source repo dates in "sourceRepos"
272
+ ```
273
+
274
+ **Important**: Always use the actual current date from `Get-Date -Format "yyyy-MM-dd"`, never use placeholder dates.
275
+
276
+ 4. **Note**: Individual file headers still have "Last synced" dates, but the authoritative source is `.agent/sync-status.json`. When syncing, update the central file rather than individual file headers.
277
+
278
+ ### Step 6: Verify and Test
279
+
280
+ - Review updated files for accuracy
281
+ - Ensure links still work
282
+ - Check that code examples are still valid
283
+ - Verify formatting is consistent
284
+
285
+ ## Quick Sync Checklist
286
+
287
+ - [ ] **Determine setup**: Check if `.ref` contains symlinks or actual repos
288
+ - [ ] **If symlinks**: Identify central location (usually `..\.ref\obsidian-dev` or `~/Development/.ref/obsidian-dev`)
289
+ - [ ] **If local clones**: Note that you must navigate from project root for each command
290
+ - [ ] Pull latest from `obsidian-api` repo (from actual target location, not symlink)
291
+ - [ ] Pull latest from `obsidian-sample-plugin` repo
292
+ - [ ] Pull latest from `obsidian-developer-docs` repo
293
+ - [ ] Pull latest from `obsidian-plugin-docs` repo
294
+ - [ ] Pull latest from `obsidian-sample-theme` repo
295
+ - [ ] Pull latest from `eslint-plugin` repo
296
+ - [ ] Review `AGENTS.md` in sample plugin for changes
297
+ - [ ] Review API documentation for breaking changes
298
+ - [ ] Review developer docs for policy/guideline updates
299
+ - [ ] Review plugin docs for best practices
300
+ - [ ] Update relevant `.agent/skills/**/*.md` files
301
+ - [ ] **Update `.agent/sync-status.json` with actual current date** (use `Get-Date -Format "yyyy-MM-dd"` - never use placeholder dates)
302
+ - [ ] Review and commit changes
303
+
304
+ ## Troubleshooting
305
+
306
+ ### "Cannot find path" errors when running git commands
307
+
308
+ **Problem**: You're trying to run git commands on a symlink, or paths are accumulating incorrectly.
309
+
310
+ **Solution**:
311
+ 1. Check if `.ref` contains symlinks: `Get-Item .ref/obsidian-api | Select-Object LinkType, Target` (Windows) or `ls -la .ref/obsidian-api` (Unix)
312
+ 2. If symlinks, navigate to the **actual target location** (usually `..\.ref\obsidian-dev`) before running git commands
313
+ 3. If local clones, always start from project root for each command
314
+
315
+ ### "Already up to date" but you want to verify
316
+
317
+ **Solution**: Use `git fetch` first to check for updates without merging:
318
+ ```bash
319
+ git fetch
320
+ git log HEAD..origin/main --oneline # Shows what's new
321
+ ```
322
+
323
+ ### Verify Your Setup (Symlinks vs. Local Clones)
324
+
325
+ **Windows**:
326
+ ```powershell
327
+ Get-Item .ref/obsidian-api | Select-Object LinkType, Target
328
+ # If LinkType shows "Junction" or "SymbolicLink", you're using symlinks
329
+ # If LinkType is empty/null, it's a regular directory
330
+ ```
331
+
332
+ **macOS/Linux**:
333
+ ```bash
334
+ ls -la .ref/obsidian-api
335
+ # If it shows "->" with a path, it's a symlink
336
+ # If it shows "d" (directory) without "->", it's a regular directory
337
+ ```
338
+
339
+ ## Frequency Recommendations
340
+
341
+ - **Monthly**: Review for major updates
342
+ - **After Obsidian releases**: Check for API changes
343
+ - **When starting new features**: Verify current best practices
344
+ - **Before releases**: Ensure guidelines are current
345
+
346
+ ## Automation Ideas (Future)
347
+
348
+ Consider creating a script to:
349
+ - Automatically check for updates in reference repos
350
+ - Compare `AGENTS.md` from sample plugin with current `.agents` structure
351
+ - Generate a diff report of what changed
352
+ - Remind to update "Last synced" dates
353
+
354
+ ## Updating Sync Status
355
+
356
+ After completing a sync, update `.agent/sync-status.json`:
357
+
358
+ **Easy way** (recommended): Use the helper script:
359
+ ```bash
360
+ node scripts/update-sync-status.mjs "Description of what was synced"
361
+ ```
362
+
363
+ **Manual way**: Edit the file directly:
364
+ ```powershell
365
+ # Get actual current date (CRITICAL: never use placeholder!)
366
+ $syncDate = Get-Date -Format "yyyy-MM-dd"
367
+
368
+ # Update sync-status.json with:
369
+ # - "lastFullSync": "$syncDate"
370
+ # - "lastSyncSource": "Description of what was synced"
371
+ # - Update relevant dates in "sourceRepos" section for repos that were checked/synced
372
+ ```
373
+
374
+ **Critical**: Always use the actual date from `Get-Date -Format "yyyy-MM-dd"`. Never use placeholder dates like "YYYY-MM-DD" or hardcoded dates. The sync-status.json file is the authoritative source for all sync dates.
375
+
376
+ ## Notes
377
+
378
+ - Not all changes need to be synced immediately - focus on breaking changes and new best practices
379
+ - Some content may be project-specific and shouldn't be overwritten
380
+ - Always review changes before committing to ensure they make sense for your project
381
+ - **Always update sync-status.json with the actual current date** - this is the authoritative source for sync dates
@@ -0,0 +1,17 @@
1
+ <!--
2
+ Source: Based on Obsidian Sample Theme
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Check Obsidian Sample Theme repo for updates
5
+ -->
6
+
7
+ # Testing
8
+
9
+ - Manual install for testing: copy `manifest.json` and `theme.css` to:
10
+ ```
11
+ <Vault>/.obsidian/themes/<theme-name>/
12
+ ```
13
+ - Reload Obsidian and select the theme in **Settings → Appearance → Themes**.
14
+
15
+ **Platform testing**: Before release, test on all applicable platforms (Windows, macOS, Linux, Android, iOS). See [release-readiness.md](release-readiness.md) for the complete testing checklist.
16
+
17
+
@@ -0,0 +1,114 @@
1
+ <!--
2
+ Source: Based on Obsidian community troubleshooting
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Update as common issues are identified
5
+ -->
6
+
7
+ # Troubleshooting
8
+
9
+ **Source**: Based on common errors from developer docs, community patterns, and best practices.
10
+
11
+ - **Theme doesn't appear**: Ensure `manifest.json` and `theme.css` are at the top level of the theme folder under `<Vault>/.obsidian/themes/<theme-name>/`.
12
+ - **Theme not applying**: Check that `manifest.json` has correct `name` field matching the folder name.
13
+ - **CSS not loading**: Verify `theme.css` exists and is properly formatted.
14
+ - **SCSS compilation issues**: If using SCSS, ensure build process runs and outputs `theme.css`.
15
+ - **Mobile display issues**: Test CSS on mobile devices and check for viewport-specific styles.
16
+
17
+ ## AI Agent Issues
18
+
19
+ ### .ref Folder Not Found
20
+
21
+ **Problem**: AI agent can't find `.ref` folder when searching.
22
+
23
+ **Solution**:
24
+ - The `.ref` folder is gitignored and may be hidden
25
+ - Use `list_dir` with the project root to see hidden directories
26
+ - Use `glob_file_search` with pattern `.ref/**` to search recursively
27
+ - Try direct paths like `.ref/obsidian-api/README.md`
28
+ - See [ref-instructions.md](ref-instructions.md) for detailed search strategies
29
+
30
+ **For AI agents**: When user asks about `.ref`, actively search using multiple methods. Don't assume it doesn't exist if first search fails.
31
+
32
+ ## Common Error Messages
33
+
34
+ ### CSS Errors
35
+
36
+ - **"Invalid property value"**: Check CSS syntax, ensure all values are properly formatted.
37
+ - **"Unknown property"**: Verify CSS property names are correct and supported by Obsidian's rendering engine.
38
+ - **"Selector not working"**: Check CSS selector specificity and ensure you're targeting the correct Obsidian elements.
39
+
40
+ ### SCSS Compilation Errors
41
+
42
+ - **"File to import not found"**: Check `@import` paths are correct relative to SCSS files.
43
+ - **"Undefined variable"**: Ensure all SCSS variables are defined before use.
44
+ - **"Syntax error"**: Verify SCSS syntax is correct (semicolons, brackets, etc.).
45
+
46
+ ### Build Errors
47
+
48
+ - **"Command not found"**: Ensure build tools (Grunt, npm, sass) are installed.
49
+ - **"Build failed"**: Check build configuration files (`Gruntfile.js`, `package.json` scripts).
50
+ - **"Output file missing"**: Verify build process completed and `theme.css` was generated.
51
+
52
+ ## Debugging Techniques
53
+
54
+ ### Browser Console
55
+
56
+ Open browser console (Help → Toggle Developer Tools) to check for:
57
+ - CSS parsing errors
58
+ - Missing CSS variables
59
+ - Conflicting styles
60
+
61
+ ### Inspect Theme CSS
62
+
63
+ In browser console, inspect the theme's CSS:
64
+ ```javascript
65
+ // Check if theme CSS is loaded
66
+ document.querySelector('style[data-theme="your-theme-name"]')
67
+ ```
68
+
69
+ ### Verify CSS Variables
70
+
71
+ Check that Obsidian CSS variables are being used correctly:
72
+ ```css
73
+ /* Use Obsidian's built-in variables */
74
+ color: var(--text-normal);
75
+ background: var(--background-primary);
76
+ ```
77
+
78
+ ### Check Manifest
79
+
80
+ Verify `manifest.json` has correct `name` field matching the theme folder name.
81
+
82
+ ## SCSS Build Issues (Detailed)
83
+
84
+ ### SCSS Not Compiling
85
+
86
+ **Causes**:
87
+ 1. Build command not run
88
+ 2. Build tool not installed
89
+ 3. Incorrect build configuration
90
+
91
+ **Solution**:
92
+ 1. Run build command (`npx grunt build` or `npm run build`)
93
+ 2. Verify `Gruntfile.js` or `package.json` scripts are correct
94
+ 3. Check that `theme.css` is generated in root directory
95
+
96
+ ### SCSS Import Errors
97
+
98
+ **Problem**: `@import` statements fail.
99
+
100
+ **Solution**:
101
+ 1. Check file paths are correct relative to importing file
102
+ 2. Verify all imported files exist
103
+ 3. Use relative paths: `@import "../variables.scss";`
104
+
105
+ ### CSS Output Issues
106
+
107
+ **Problem**: Compiled CSS doesn't match expected output.
108
+
109
+ **Solution**:
110
+ 1. Check SCSS source files for syntax errors
111
+ 2. Verify build process completes without errors
112
+ 3. Inspect generated `theme.css` for issues
113
+
114
+
@@ -0,0 +1,16 @@
1
+ <!--
2
+ Source: Based on Obsidian Sample Theme
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Check Obsidian Sample Theme repo for updates
5
+ -->
6
+
7
+ # Versioning & releases
8
+
9
+ **Before releasing**: Use the comprehensive [release-readiness.md](release-readiness.md) checklist to verify your theme is ready for release.
10
+
11
+ - Bump `version` in `manifest.json` (SemVer).
12
+ - Create a GitHub release whose tag exactly matches `manifest.json`'s `version`. Do not use a leading `v`.
13
+ - Attach `manifest.json` and `theme.css` to the release as individual assets.
14
+ - After the initial release, follow the process to add/update your theme in the community catalog as required.
15
+
16
+
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: obsidian-ref
3
+ description: Technical references, manifest rules, file formats, and UX guidelines for Obsidian. Load when checking API details, manifest requirements, or UI/UX standards.
4
+ ---
5
+
6
+ # Obsidian Reference Skill
7
+
8
+ This skill provides comprehensive technical references and standards for the Obsidian ecosystem.
9
+
10
+ ## Purpose
11
+
12
+ To provide a central source of truth for API usage, file formats, and design standards.
13
+
14
+ ## When to Use
15
+
16
+ Load this skill when:
17
+ - Verifying `manifest.json` requirements.
18
+ - Checking Obsidian API details or documentation.
19
+ - Working with Obsidian-specific file formats (Markdown, Canvas).
20
+ - Reviewing UI text or UX patterns for consistency.
21
+
22
+ ## Core Rules
23
+
24
+ - **API Authority**: The `obsidian.d.ts` file in the reference materials is the authoritative source for API details.
25
+ - **Terminology Consistency**: Follow the "properties" and "Markdown" naming conventions strictly.
26
+ - **Mobile First**: Consider mobile compatibility for all UI and file-handling features.
27
+
28
+ ## Bundled Resources
29
+
30
+ - `references/manifest.md`: Detailed rules for `manifest.json`.
31
+ - `references/obsidian-file-formats.md`: Specifications for Markdown, Properties, and Canvas.
32
+ - `references/ux-copy.md`: UI text conventions and UX best practices.
33
+ - `references/references.md`: External links and primary source locations.
34
+ - `references/mobile.md`: Considerations for mobile compatibility.
35
+ - `references/performance.md`: Best practices for performance.
@@ -0,0 +1,52 @@
1
+ <!--
2
+ Source: Based on Obsidian Sample Theme
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Check Obsidian Sample Theme repo for updates
5
+ -->
6
+
7
+ # Environment & tooling
8
+
9
+ - **Optional**: Node.js and npm if using SCSS/Sass preprocessors or build tools.
10
+ - **Simple themes**: Can be developed with just CSS and `manifest.json` (no build tools required).
11
+ - **SCSS themes**: Use Sass/SCSS compiler (e.g., `sass`, `node-sass`, or build tools like Vite).
12
+ - No TypeScript or bundler required for basic themes.
13
+
14
+ ## Simple Theme Setup
15
+
16
+ No build tools needed - just edit `theme.css` directly.
17
+
18
+ ## SCSS Theme Setup
19
+
20
+ ```bash
21
+ npm install -D sass
22
+ npm run build # Compile SCSS to CSS
23
+ ```
24
+
25
+ ## Theme Build Tools (Optional)
26
+
27
+ Simple themes with just CSS don't need build tools. More complex themes might use Grunt, npm scripts, or other build tools for tasks like SCSS compilation, minification, or preprocessing:
28
+
29
+ ```bash
30
+ # For themes using Grunt
31
+ npx grunt build
32
+
33
+ # For themes using npm scripts
34
+ npm run build
35
+ ```
36
+
37
+ Only use build commands if your theme has a `Gruntfile.js`, `package.json` with build scripts, or other build configuration files.
38
+
39
+ ## Linting (Optional)
40
+
41
+ - Use `stylelint` for CSS/SCSS linting: `npm install -D stylelint`
42
+ - Configure stylelint for Obsidian theme conventions
43
+ - **Quick Setup**: Run `node scripts/setup-stylelint.mjs` to set up Stylelint with helpful success messages
44
+ - **Run Stylelint**:
45
+ ```bash
46
+ npm run lint # Uses lint-wrapper.mjs for helpful success messages
47
+ npm run lint:fix # Auto-fix issues where possible
48
+ ```
49
+
50
+ **Note**: The setup script automatically creates `scripts/lint-wrapper.mjs` which adds helpful success messages when linting passes. The wrapper is included in the template and copied during setup.
51
+
52
+
@@ -0,0 +1,65 @@
1
+ <!--
2
+ Source: Based on Obsidian Sample Theme
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Check Obsidian Sample Theme repo for updates
5
+ -->
6
+
7
+ # File & folder conventions
8
+
9
+ - **Organize CSS/SCSS into logical files**: Split styles into separate files for maintainability.
10
+ - **Theme structure patterns**:
11
+ - **Simple CSS theme** (recommended for simple themes): `theme.css` in project root, no build step required
12
+ - **Complex theme with build tools** (for themes using SCSS, Grunt, etc.): `src/scss/` directory with SCSS source files that compile to `theme.css`
13
+ - **CRITICAL**: Never have both `theme.css` as source AND `src/scss/` - choose one pattern
14
+
15
+ ### Simple CSS Theme Structure
16
+
17
+ **Recommended for simple themes** (like the sample theme template):
18
+ ```
19
+ theme.css # ✅ Source CSS file (edit directly)
20
+ manifest.json
21
+ package.json
22
+ ```
23
+
24
+ - No build step required - just edit `theme.css` directly
25
+ - Changes take effect when Obsidian reloads the theme
26
+ - Perfect for learning and simple themes
27
+
28
+ ### Complex Theme Structure (SCSS + Build Tools)
29
+
30
+ **For themes using SCSS, Grunt, npm scripts, or other build tools**:
31
+ ```
32
+ src/
33
+ scss/ # ✅ SCSS source files
34
+ index.scss
35
+ variables.scss
36
+ components/
37
+ css/ # Compiled CSS (intermediate, not committed)
38
+ main.css
39
+ theme.css # ✅ Final compiled output (committed)
40
+ Gruntfile.js # Build configuration (if using Grunt)
41
+ manifest.json
42
+ package.json
43
+ ```
44
+
45
+ - Source files in `src/scss/` are compiled to `theme.css`
46
+ - Build tools (Grunt, npm scripts, etc.) handle compilation
47
+ - Run build command after making changes (see [build-workflow.md](build-workflow.md))
48
+ - **Example**: The `obsidian-oxygen` theme uses this pattern with Grunt
49
+
50
+ ### Wrong Structure (Common Mistakes)
51
+
52
+ ```
53
+ theme.css # ❌ DON'T have both
54
+ src/
55
+ scss/ # ❌ This causes confusion about which is the source
56
+ index.scss
57
+ ```
58
+
59
+ **Best practice**: Choose one pattern and stick with it. Simple themes should use `theme.css` directly. Complex themes should use `src/scss/` and compile to `theme.css`.
60
+
61
+ - **Do not commit build artifacts**: Never commit `node_modules/`, intermediate compiled CSS files (like `src/css/main.css`), or other generated files. Only commit `theme.css` (the final output).
62
+ - Keep themes lightweight. Avoid complex build processes unless necessary.
63
+ - Release artifacts: `manifest.json` and `theme.css` must be at the top level of the theme folder in the vault.
64
+
65
+