obsidian-dev-skills 1.0.0 → 1.0.1

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,35 @@
1
+ ---
2
+ name: obsidian-dev
3
+ description: Development patterns for Obsidian. Load when implementing features or following coding conventions.
4
+ ---
5
+
6
+ # Obsidian Development Skill
7
+
8
+ This skill provides patterns and rules for developing Obsidian plugins and themes.
9
+
10
+ ## Purpose
11
+
12
+ To ensure consistent development across plugins and themes, proper code organization, and adherence to Obsidian's development patterns.
13
+
14
+ ## When to Use
15
+
16
+ Load this skill when:
17
+ - Implementing new features
18
+ - Following coding conventions
19
+ - Debugging issues
20
+ - Managing project structure
21
+
22
+ ## Core Rules
23
+
24
+ - Follow established patterns for your project type (plugin/theme)
25
+ - Use appropriate tools and conventions
26
+ - Test thoroughly across different environments
27
+ - Document important decisions and patterns
28
+
29
+ ## Bundled Resources
30
+
31
+ - `references/agent-dos-donts.md`: Critical development guidelines
32
+ - `references/code-patterns.md`: Implementation patterns and examples
33
+ - `references/coding-conventions.md`: Code style and organization
34
+ - `references/commands-settings.md`: Command and settings patterns
35
+ - `references/common-tasks.md`: Frequently needed operations
@@ -0,0 +1,57 @@
1
+ <!--
2
+ Source: Based on Obsidian community best practices
3
+ Last synced: See sync-status.json for authoritative sync dates
4
+ Update frequency: Review periodically for AI agent-specific guidance
5
+ -->
6
+
7
+ # Agent do/don't
8
+
9
+ ## Do
10
+ - **.ref folder setup**: When user asks to add a reference, check if it already exists first. For external repos:
11
+ - **Clone directly** into the target folder: `../.ref/obsidian-dev/plugins/<name>/` (for plugins), `../.ref/obsidian-dev/themes/<name>/` (for themes), or `../.ref/obsidian-dev/<name>/` (for other projects)
12
+ - **DO NOT** create a `.ref` subfolder inside the plugins/themes folder - clone the repo directly there
13
+ - Then create symlink in project's `.ref/` folder pointing to the global location
14
+ - For local projects, symlink directly in project's `.ref/` (don't clone to global)
15
+ - See [ref-instructions.md](ref-instructions.md) for details.
16
+ - Add commands with stable IDs (don't rename once released).
17
+ - Provide defaults and validation in settings.
18
+ - Write idempotent code paths so reload/unload doesn't leak listeners or intervals.
19
+ - Use `this.register*` helpers for everything that needs cleanup.
20
+ - **Always run `pnpm build` after making changes** to catch build errors early. Only check for pnpm installation if the build fails. See [build-workflow.md](build-workflow.md) for details.
21
+ - **Summarize commands**: When user requests "Summarize" or "Summarize for release", follow the workflow in [summarize-commands.md](summarize-commands.md). Always read actual file changes, not just chat history.
22
+ - **Release preparation**: When user asks "is my plugin ready for release?" or similar, use [release-readiness.md](release-readiness.md) checklist. Run automated checks where possible, ask user interactively for items requiring their input (like platform testing).
23
+
24
+ ## Don't
25
+ - Introduce network calls without an obvious user-facing reason and documentation.
26
+ - Ship features that require cloud services without clear disclosure and explicit opt-in.
27
+ - Store or transmit vault contents unless essential and consented.
28
+ - **File structure**: Never have `main.ts` in both root AND `src/` - this causes build confusion. For simple plugins, `main.ts` in root is acceptable. For plugins with multiple files, place `main.ts` in `src/` (recommended). See [file-conventions.md](file-conventions.md) and [common-pitfalls.md](common-pitfalls.md#maints-file-location).
29
+ - **Git operations**: Never automatically commit, push, or perform any git operations. All git operations must be left to the user.
30
+ - **Git updates**: When checking for updates to repos in `.ref`, you can use read-only commands like `git fetch` and `git log` to check what's new, but **never automatically pull** - always ask the user first. See [ref-instructions.md](ref-instructions.md) for how to check for updates.
31
+
32
+ ## Fixing Linting Errors
33
+
34
+ **DO**:
35
+ - Read the error message carefully - note the exact line and column
36
+ - Understand what the error is actually complaining about
37
+ - Check the [linting-fixes-guide.md](linting-fixes-guide.md) for the specific error type
38
+ - Fix the root cause, not the symptom
39
+ - Test with `pnpm lint` after each fix
40
+ - Verify `pnpm build` still works
41
+
42
+ **DON'T**:
43
+ - Add eslint-disable comments without understanding why
44
+ - Put disable comments on the wrong line
45
+ - Try the same fix multiple times without understanding why it failed
46
+ - Suppress errors as a shortcut
47
+ - Assume the error location matches where you think the problem is
48
+ - Skip reading the documentation for the specific error type
49
+
50
+ **When Stuck**:
51
+ 1. Read the error message - what line/column is it complaining about?
52
+ 2. Check [linting-fixes-guide.md](linting-fixes-guide.md) for that specific error type
53
+ 3. Understand the type signature - what does the function expect?
54
+ 4. Fix the actual type mismatch, not just suppress the warning
55
+ 5. If you've tried the same thing 3 times, stop and re-read the error message
56
+
57
+