Skip to content
Skills Library
Programming · Analysis

dev-tools

/dev-tools

Obsidian plugin/theme dev: DevTools, CDP, JS eval, console/error buffers, CSS/DOM inspection, mobile emulation, screenshots. Use when debugging the app.

Licence
MIT
Last repository change
24.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Obsidian plugin/theme dev: DevTools, CDP, JS eval, console/error buffers, CSS/DOM inspection, mobile emulation, screenshots. Use when debugging the app.

Original author description

Obsidian plugin/theme dev: DevTools, CDP, JS eval, console/error buffers, CSS/DOM inspection, mobile emulation, screenshots. Use when debugging the app.

How it works

  1. When to Use This Skill
  2. Prerequisites
  3. DevTools Window
  4. Eval JavaScript
  5. Captured Console & Errors
  6. CSS Inspection
  7. DOM Query
  8. Chrome DevTools Protocol (CDP)
  9. Screenshots & Mobile Emulation
  10. Common Patterns
Original SKILL.md headings · 188 lines, 711 words
SKILL.md preview
---
created: 2026-04-30
modified: 2026-09-22
reviewed: 2026-09-22
name: dev-tools
description: "Obsidian plugin/theme dev: DevTools, CDP, JS eval, console/error buffers, CSS/DOM inspection, mobile emulation, screenshots. Use when debugging the app."
user-invocable: false
allowed-tools: Bash(obsidian *), Read, Grep, Glob
---

# Obsidian Developer Tools

## When to Use This Skill

| Use this skill when... | Use the alternative instead when... |
|---|---|
| Developing or debugging a community plugin / theme | Enabling or disabling plugins as a user — use `plugins-themes` |
| Running JavaScript against the live `app` API | Triggering an Obsidian command — use `command-palette` |
| Inspecting CSS or DOM in the running app | Switching themes or snippets in normal use — use `plugins-themes` |
| Capturing console errors during agent-run plugin tests | Reading note content — use `vault-files` |

These commands are **for development and diagnostics**. They expose the same
surface as the in-app DevTools window plus a captured buffer of console
output and JavaScript errors that survives between calls — the leverage
point for agentic plugin testing.

## Prerequisites

- Obsidian desktop 1.12.7+ installer with CLI enabled
- Obsidian must be running
- For `dev:debug` and `dev:cdp`: Chrome DevTools Protocol available
  (Electron-based Obsidian — true on desktop)

## DevTools Window

```bash
# Toggle the in-app DevTools panel
obsidian devtools
```

## Eval JavaScript

```bash
# Read state from the live app
obsidian eval code="app.vault.getFiles().length"
obsidian eval code="app.workspace.getActiveFile()?.path"

# Drive the app — anything you could type in the DevTools console
obsidian eval code="app.commands.executeCommandById('editor:toggle-bold')"

# Multi-statement: wrap in an IIFE
obsidian eval code="(()=>{const f=app.vault.getFiles();return f.filter(x=>x.extension==='md').length})()"
```

`eval` returns the expression's value (or last statement's value in an IIFE)
serialised to text. Use `JSON.stringify(...)` inside the expression for
structured output you can parse downstream.

## Captured Console & Errors

The CLI maintains rolling buffers of `console.*` calls and JavaScript errors
from the running app — invaluable for agent-driven plugin testing where the
agent doesn't have the DevTools window open.

```bash
# Recent console messages (default limit 50)
obsidian dev:console
obsidian dev:console limit=200
obsidian dev:console level=error
obsidian dev:console level=warn

# Clear the console buffer (e.g. before a test run)
obsidian dev:console clear

# Captured JS errors
obsidian dev:errors
obsidian dev:errors clear
```

Typical agent loop:

```bash
obsidian dev:errors clear
obsidian dev:console clear
obsidian plugin:reload id=my-plugin
obsidian command id=my-plugin:run-test
obsidian dev:errors        # any uncaught exceptions?
obsidian dev:console level=error
```

## CSS Inspection

```bash
# All CSS rules matching a selector, with source location
obsidian dev:css selector=".workspace-leaf"

# Filter to one property
obsidian dev:css selector=".workspace-leaf" prop=background-color
```

Useful for tracking down which snippet or theme is winning a cascade.

## DOM Query

```bash
# First match — full outerHTML
obsidian dev:dom selector=".nav-folder-title"

# Inner HTML only
obsidian dev:dom selector=".nav-folder-title" inner

# Just the text content
obsidian dev:dom selector=".nav-folder-title" text

# All matches (not just the first)
obsidian dev:dom selector=".nav-folder-title" all

# Element count
obsidian dev:dom selector=".nav-folder-title" total

# Read an attribute or computed CSS prop
obsidian dev:dom selector=".workspace-leaf.mod-active" attr=data-type
obsidian dev:dom selector=".workspace-leaf.mod-active" css=display
```

## Chrome DevTools Protocol (CDP)

```bash
# Attach the CDP debugger
obsidian dev:debug on
obsidian dev:debug off

# Run an arbitrary CDP method
obsidian dev:cdp method=Page.captureScreenshot
obsidian dev:cdp method=Runtime.evaluate params='{"expression":"location.href"}'
```

CDP is the right tool when `eval` is too coarse — anything you'd reach for
in `chrome://inspect`.

## Screenshots & Mobile Emulation

```bash
# Capture the running window
obsidian dev:screenshot path=/tmp/state.png

# Toggle mobile emulation (responsive testing without leaving desktop)
obsidian dev:mobile on
obsidian dev:mobile off
```

## Common Patterns

### Plugin reload-test loop

```bash
obsidian dev:console clear
obsidian dev:errors clear
obsidian plugin:reload id=my-plugin
obsidian command id=my-plugin:run-tests
errors=$(obsidian dev:errors)
[ -z "$errors" ] && echo "PASS" || { echo "FAIL"; echo "$errors"; }
```

### Theme regression screenshots

```bash
for theme in Default Minimal Things; do
  obsidian theme:set name="$theme"
  obsidian dev:screenshot path="/tmp/theme-$theme.png"
done
```

### Probe the active workspace

```bash
obsidian eval code="JSON.stringify({file: app.workspace.getActiveFile()?.path, view: app.workspace.activeLeaf?.view?.getViewType()})"
```

## Agentic Optimizations

| Context | Command |
|---------|---------|
| Run JS, parseable output | `obsidian eval code="JSON.stringify(...)"` |
| Errors since last check | `obsidian dev:errors` |
| Reset error buffer | `obsidian dev:errors clear` |
| Console (errors only) | `obsidian dev:console level=error` |
| DOM element count | `obsidian dev:dom selector=X total` |
| Screenshot for diff | `obsidian dev:screenshot path=/tmp/X.png` |
| CSS source for property | `obsidian dev:css selector=X prop=Y` |

## Related Skills

- **plugins-themes** — Plugin/theme lifecycle (install/enable/reload/disable)
- **command-palette** — Trigger commands the plugin registers
- **workspaces** — Set up the editor state before running diagnostics

Versions

The database has no other skills named dev-tools.

Database snapshot: 13.11.2026 · package version bf51a86d64a0 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90browser-testing-with-devtools
    Chrome DevTools for live runtime data: DOM inspection, console logs, network traces, performance profiling. Use when building or debugging anything in a browser.
  • 90browser-testing-with-devtools
    Chrome DevTools for live runtime data - DOM inspection, console logs, network traces, performance profiling. Use when building or debugging anything that runs in a browser.
  • 95octocode-chrome-devtools
    Use when a live page needs Chrome DevTools/CDP evidence: network failures, console errors, performance, DOM/CSS actionability, screenshots/PDF, cookies/storage, click/fill/search, HAR, or auth-gated pages. Phrases like debug in Chrome, live page health, CDP snapshot, cookie…
  • 100mcp-server-chrome-devtools
    Use this skill when installing, configuring, and executing tools with the live DOM inspection, console logs, and network telemetry DevTools MCP server.
  • 100browser-testing-with-devtools
    Real browser testing via Chrome DevTools MCP — DOM inspection, console analysis, network requests, performance profiling. Use when debugging anything browser-rendered. Requires the chrome-devtools MCP server.
  • 100browser-testing-with-devtools
    Real browser testing via Chrome DevTools MCP — DOM inspection, console analysis, network requests, performance profiling. Use when debugging anything browser-rendered. Requires the chrome-devtools MCP server.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.