From 02b7e31c66096acc5b9b924fef0c4c06fe459886 Mon Sep 17 00:00:00 2001 From: murashit Date: Mon, 1 Jun 2026 19:59:59 +0900 Subject: [PATCH] Add Obsidian dev validation skill --- .../skills/codex-panel-obsidian-dev/SKILL.md | 88 +++++++++++++++++++ .../agents/openai.yaml | 4 + 2 files changed, 92 insertions(+) create mode 100644 .agents/skills/codex-panel-obsidian-dev/SKILL.md create mode 100644 .agents/skills/codex-panel-obsidian-dev/agents/openai.yaml diff --git a/.agents/skills/codex-panel-obsidian-dev/SKILL.md b/.agents/skills/codex-panel-obsidian-dev/SKILL.md new file mode 100644 index 00000000..433e90c2 --- /dev/null +++ b/.agents/skills/codex-panel-obsidian-dev/SKILL.md @@ -0,0 +1,88 @@ +--- +name: codex-panel-obsidian-dev +description: Use when validating Codex Panel inside a live Obsidian app with the local `obsidian` CLI, including plugin reloads, command execution, DOM/CSS inspection, screenshots, captured console output, captured runtime errors, Electron devtools, CDP commands, or mobile emulation. +--- + +# Codex Panel Obsidian Dev + +Use this skill for live Obsidian checks after building Codex Panel or when investigating behavior that unit tests cannot observe. + +## Ground Rules + +- Work from the Codex Panel repository root. +- Treat `obsidian plugin:reload id=codex-panel`, `obsidian reload`, `obsidian restart`, `obsidian devtools`, `obsidian eval`, `obsidian dev:cdp`, and `obsidian dev:mobile` as state-changing or intrusive. Ask the user before running them. +- Prefer read-only inspection first: `plugin`, `commands`, `dev:errors`, `dev:dom`, `dev:css`, `dev:console`, `dev:screenshot`, `version`. +- If `dev:console` reports that the debugger is not attached, ask before running `obsidian dev:debug on`. +- Do not clear console or error buffers unless the user approves; clearing can destroy useful failure context. + +## Workflow + +1. Build the plugin when source changes need to be reflected in Obsidian: + + ```bash + npm run build + ``` + +2. Before reloading the live plugin, ask the user whether it is OK to reload their current Obsidian session. If approved: + + ```bash + obsidian plugin:reload id=codex-panel + ``` + +3. Open the relevant Codex Panel surface when needed: + + ```bash + obsidian command id=codex-panel:open-panel + obsidian command id=codex-panel:open-threads-view + ``` + +4. Inspect runtime health: + + ```bash + obsidian plugin id=codex-panel + obsidian dev:errors + obsidian dev:dom selector=.codex-panel total + obsidian dev:css selector=.codex-panel + obsidian dev:screenshot path=/codex-panel.png + ``` + +5. Use focused selectors for the behavior under test. Prefer stable Codex Panel classes such as `.codex-panel`, `.codex-panel__composer`, `.codex-panel-threads`, and `.codex-panel-chat-turn-diff`. + +## Common Checks + +- Confirm the loaded version and enabled state: + + ```bash + obsidian plugin id=codex-panel + ``` + +- List available Codex Panel commands: + + ```bash + obsidian commands filter=codex-panel + ``` + +- Count rendered elements: + + ```bash + obsidian dev:dom selector=.codex-panel__composer total + ``` + +- Inspect text, attributes, or computed styles: + + ```bash + obsidian dev:dom selector=.codex-panel__composer text + obsidian dev:dom selector=.codex-panel__composer attr=aria-label + obsidian dev:dom selector=.codex-panel__composer css=display + obsidian dev:css selector=.codex-panel__composer + ``` + +- Capture a screenshot for visual review: + + ```bash + obsidian dev:screenshot path=/codex-panel.png + ``` + +## Reporting + +Report the commands run, whether Obsidian was reloaded, key `dev:errors` or `dev:console` findings, and any screenshot path produced. If a command was skipped because it required user approval, state that plainly. diff --git a/.agents/skills/codex-panel-obsidian-dev/agents/openai.yaml b/.agents/skills/codex-panel-obsidian-dev/agents/openai.yaml new file mode 100644 index 00000000..94760f49 --- /dev/null +++ b/.agents/skills/codex-panel-obsidian-dev/agents/openai.yaml @@ -0,0 +1,4 @@ +interface: + display_name: "Codex Panel Obsidian Dev" + short_description: "Verify Codex Panel in live Obsidian" + default_prompt: "Use $codex-panel-obsidian-dev to reload and inspect Codex Panel in Obsidian."