plugin-testing
Skill for testing Obsidian plugin features in obsidian-plugin-template. Use for automated, manual, and integration test workflows specific to Obsidian plugins.
Best use case
plugin-testing is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Skill for testing Obsidian plugin features in obsidian-plugin-template. Use for automated, manual, and integration test workflows specific to Obsidian plugins.
Teams using plugin-testing should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plugin-testing/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How plugin-testing Compares
| Feature / Agent | plugin-testing | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Skill for testing Obsidian plugin features in obsidian-plugin-template. Use for automated, manual, and integration test workflows specific to Obsidian plugins.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Plugin Testing Skill — obsidian-plugin-template
> **Note:** Always prefer `bun` over other package managers if possible. Use `bun` for all commands unless you have a specific reason to use another package manager.
Use this skill to guide both automated and manual testing of Obsidian plugin features. Ensure all tests reflect real plugin usage and production-like conditions.
## Key Testing Principles
- Always build the plugin before testing (`bun run build`).
- Use the install script to deploy to a test vault (`bun run obsidian:install <vault>` preferred).
- Helpful scripts for testing:
- `bun run build` — build before running tests or manual testing
- `bun run obsidian:install <vault>` — install the built plugin into a test vault
- `bun run format` — format code before testing if needed
- `bun run check` — run lint & formatting checks
- Test settings UI for load, save, and persistence.
- Validate localization for all supported languages.
- Confirm plugin lifecycle events (load/unload) work as expected.
## Test File Conventions
- `*.spec.{ts,js,mjs}` — **Unit tests (BDD-style)**: focus on behaviour and small, isolated units. Prefer tests that are fast and hermetic.
- `*.test.{ts,js,mjs}` — **Integration tests (TDD-style)**: focus on integration between components or with the environment; keep them well documented and isolated.
Run unit-only suites with the Vitest CLI:
```shell
bun x vitest run "tests/**/*.spec.{js,ts,mjs}" --coverage
```
And integration-only suites with:
```shell
bun x vitest run "tests/**/*.test.{js,ts,mjs}" --coverage
```
## Test File Structure
- Follow a **one test file per source file** rule: mirrors the source directory tree under `tests/` (for both `*.spec.*` and `*.test.*`). Prefer a single test file per source (either a `*.spec.*` unit test or a `*.test.*` integration test). If a source requires both unit and integration coverage, having both a `*.spec.*` and a `*.test.*` file is acceptable — treat them together as the logical "one test file" for that source and keep their locations aligned for discoverability.
- Keep names aligned with source files for discoverability: `src/path/to/module.js` -> `tests/unit/path/to/module.spec.js`.
- If a test file would become unreasonably large, splitting is allowed but should be a rare exception; include a brief header comment explaining the reason and the mapping across split files.
For the full list and usage of scripts, see the **Scripts (package.json)** section in `AGENTS.md`.
## Example Test Workflow
1. **Build:**
- Run: `bun run build`
2. **Install:**
- Run: `bun run obsidian:install <vault directory>`.
3. **Settings UI:**
- Open plugin settings in Obsidian
- Change and save settings; reload plugin and verify persistence
4. **Localization:**
- Switch Obsidian language; verify all UI text updates accordingly
5. **Lifecycle:**
- Reload or disable/enable the plugin; ensure all managers register/unload cleanly
## References
- See [src/main.ts](../../../src/main.ts) for plugin entry and lifecycle
- For integration, ensure settings and localization are loaded as in productionRelated Skills
javascript-testing-patterns
Comprehensive guide for implementing robust testing strategies in JavaScript/TypeScript applications using modern testing frameworks and best practices.
e2e-testing-patterns
Build reliable, fast, and maintainable end-to-end test suites that provide confidence to ship code quickly and catch regressions before users do.
evalview-agent-testing
Regression testing for AI agents using EvalView. Snapshot agent behavior, detect regressions in tool calls and output quality, and block broken agents before production.
wordpress-plugin-development
WordPress plugin development workflow covering plugin architecture, hooks, admin interfaces, REST API, security best practices, and WordPress 7.0 features: Real-Time Collaboration, AI Connectors, Abilities API, DataViews, and PHP-only blocks.
wordpress-penetration-testing
Assess WordPress installations for common vulnerabilities and WordPress 7.0 attack surfaces.
webapp-testing
To test local web applications, write native Python Playwright scripts.
web3-testing
Master comprehensive testing strategies for smart contracts using Hardhat, Foundry, and advanced testing patterns.
web-security-testing
Web application security testing workflow for OWASP Top 10 vulnerabilities including injection, XSS, authentication flaws, and access control issues.
unit-testing-test-generate
Generate comprehensive, maintainable unit tests across languages with strong coverage and edge case focus.
testing-qa
Comprehensive testing and QA workflow covering unit testing, integration testing, E2E testing, browser automation, and quality assurance.
testing-patterns
Jest testing patterns, factory functions, mocking strategies, and TDD workflow. Use when writing unit tests, creating test factories, or following TDD red-green-refactor cycle.
temporal-python-testing
Comprehensive testing approaches for Temporal workflows using pytest, progressive disclosure resources for specific testing scenarios.