跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 devtools

Devtools

任何Json -resanders应用程序的检查小组 当用户想要调试基因UI,检查光谱树,运行时编辑状态,看到已发送动作,跟踪流补丁活性,浏览目录,或选择DOM元素以找到其光谱密钥时使用. 触发器包括"添加devtools","debug json-render","检查光谱","为什么这个元素不渲染","运行时查看状态"等,或请求为QQjson-render/devtools抓取动作日志.

8259 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

任何json-referse app软件的投放检查小组

何时用

用户想要调试基因用户界面,检查光谱树,在运行时编辑状态,看到发送的动作,跟踪流补丁活性,浏览目录,或者选择 DOM 元素来查找其光谱密钥. 触发器包括"添加devtools","debug json-render","检查光谱","wh"

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:@json-render/devtools、Install、React、Vue、Svelte、Solid。

文件分析

文件分析:这是一份仅含 SKILL.md 的指令型技能,代理激活后整份正文进入上下文。

官方 description(原文)

Drop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched actions, follow stream patches live, browse a catalog, or pick DOM elements to find their spec keys. Triggers include "add devtools", "debug json-render", "inspect the spec", "why is this element not rendering", "see the state at runtime", or requests to tap streams / capture action logs for `@json-render/devtools`.

@json-render/devtoolsInstallReactVueSvelteSolidDrop-in usageReactVueSvelteSolidControls

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
devtools
description
Drop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched actions, follow stream patches live, browse a catalog, or pick DOM elements to find their spec keys. Triggers include "add devtools", "debug json-render", "inspect the spec", "why is this element not rendering", "see the state at runtime", or requests to tap streams / capture action logs for `@json-render/devtools`.
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「devtools」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-49b8140d2c2182af-%E5%BC%80%E5%8F%91%E5%B7%A5%E5%85%B7.html
请存为 .cursor/skills/devtools/SKILL.md 或 .claude/skills/devtools/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/vercel-labs/json-render' --list

npx skills add 'https://github.com/vercel-labs/json-render' --skill 'devtools'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- name: devtools description: Drop-in inspector panel for any json-render app. Use when the user wants to debug a generative UI, inspect the spec tree, edit state at runtime, see dispatched actions, follow stream patches live, browse a catalog, or pick DOM elements to find their spec keys. Triggers include "add devtools", "debug json-render", "inspect the spec", "why is this element not rendering", "see the state at runtime", or requests to tap streams / capture action logs for `@json-render/devtools`. --- # @json-render/devtools A floating inspector panel for json-render apps. Framework-agnostic core + per-framework adapters (React, Vue, Svelte, Solid). Production-safe: the component renders `null` when `NODE_ENV === "production"`. ## Install Install the core package plus the adapter that matches the host app's renderer. ```bash # React npm install @json-render/devtools @json-render/devtools-react # Vue npm install @json-render/devtools @json-render/devtools-vue # Svelte npm install @json-render/devtools @json-render/devtools-svelte # Solid npm install @json-render/devtools @json-render/devtools-solid ``` ## Drop-in usage Place `` anywhere inside the existing `` (or framework equivalent). No other wiring required. ### React ```tsx import { JsonRenderDevtools } from "@json-render/devtools-react"; ; ``` ### Vue ```vue ``` ### Svelte ```svelte ``` ### Solid ```tsx import { JsonRenderDevtools } from "@json-render/devtools-solid"; ; ``` ## Controls - Floating toggle appears bottom-right. - Hotkey: `Ctrl`/`Cmd` + `Shift` + `J` (configurable via `hotkey` prop). - Drawer is resizable; height persists to localStorage. ## Props - `spec` (`Spec | null`) — current spec. - `catalog` (`Catalog | null`) — catalog definition; required for the Catalog panel. - `messages` (`UIMessage[]`) — AI SDK `useChat` messages; scanned for spec data parts. - `initialOpen` (`boolean`) — start open. - `position` (`"bottom-right" | "bottom-left" | "right"`) — dock + toggle corner. `"bottom-*"` docks at the bottom; `"right"` docks at the right edge full-height (recommended for app-shells that already use `100vh` or fixed bottom bars). - `hotkey` (`string | false`) — `"mod+shift+j"` by default. - `bufferSize` (`number`) — event ring-buffer cap, default 500. - `reserveSpace` (`boolean`, default `true`) — when true the panel pushes the host app by applying `padding-bottom` / `padding-right` on `body`. Set to `false` to keep the panel as a pure overlay. - `allowDockToggle` (`boolean`, default `true`) — show a toolbar button so the user can flip the panel between bottom-dock and right-dock. User choice persists to `localStorage` and overrides `position` on subsequent mounts. Pass `false` to lock the dock to `position`. - `onEvent` (`(DevtoolsEvent) => void`) — optional tap. ## Panels - **Spec** — element tree rooted at `spec.root`; props/visibility/events/watchers detail; integrated `validateSpec` warnings. - **State** — every JSON Pointer path with inline edit via `store.set`. - **Actions** — dispatched actions timeline (name, params, result/error, duration). - **Stream** — spec patches, text chunks, token usage, lifecycle markers grouped by generation. - **Catalog** — components + actions declared in the catalog with prop chips. ## Picker (toolbar) The element picker is a toolbar button in the panel header (Chrome-DevTools-style), not a tab. Click it to activate pick mode, then click any rendered element in the page — selection jumps to the Spec tab with that element focused. `Esc` cancels. ## Reserved space & docking The panel can dock at the bottom or the right edge, and by default the user can flip between the two with a toolbar button (the choice persists to `localStorage`). Set `allowDockToggle={false}` if the host app only works with one dock — the button is hidden and the dock is locked to `position`. Pick an initial dock that fits your layout: - **Bottom dock (default)** — works best for docs / marketing / content-flow sites and for app shells built with a `height: 100%` chain (`html { height: 100% }` → `body { height: 100% }` → `.app { height: 100% }`). The panel writes its height to `--jr-devtools-offset-bottom` and applies matching `padding-bottom` to `body`, so non-fixed content naturally makes room. - **Right dock** (`position="right"`) — recommended for app-shell layouts that use `100vh` or `position: fixed; bottom: 0`. Right docking sidesteps the bottom edge entirely and writes its width to `--jr-devtools-offset-right` instead. Apps that use `100vh`, `position: fixed`, or `position: sticky` can opt specific elements in with the published CSS custom properties: ```css .composer { bottom: var(--jr-devtools-offset-bottom, 0); } .sidebar { right: var(--jr-devtools-offset-right, 0); } .app-shell { height: calc(100vh - var(--jr-devtools-offset-bottom, 0)); } ``` If the automatic body padding causes problems with a particular layout, pass `reserveSpace={false}` to make the panel a pure overlay — the CSS custom properties are still published so you can reserve space manually. (`--jr-devtools-offset` is kept as a back-compat alias for whichever edge is currently active.) ## Multiple renderers on one page (e.g. a chat) A single `` can inspect many `` instances at once — a chat where each assistant message renders its own spec, a dashboard made of several independent widgets, etc. The recipe: 1. **One top-level ``** so every renderer shares one state store and one action dispatcher. Devtools lives inside this provider and sees everything through it. 2. **Per-renderer specs, shared state** — each assistant message renders `` directly, not wrapped in its own `StateProvider`. State paths from different messages must not collide. 3. **Namespace state per turn** — when the source is an AI stream, hand the agent a unique `messageId` and require every element key (`-root`) and state path (`//count`) to be prefixed with it. 4. **Pass `spec={latest}` + `messages={all}`** — `spec` drives the Spec panel (usually the newest assistant message's spec), while `messages` feeds the Stream panel with patches from every turn. 5. **Actions and the picker are already global** — `registerActionObserver` captures dispatches from any `ActionProvider` in the tree, and `data-jr-key` is written by the renderer itself, so Pick works across every rendered element regardless of which message produced it. See `examples/devtools` for a full AI chat wired this way. ## Imperative API (React only) ```tsx import { useJsonRenderDevtools } from "@json-render/devtools-react"; const devtools = useJsonRenderDevtools(); devtools?.open(); devtools?.toggle(); devtools?.recordEvent({ kind: "stream-text", at: Date.now(), text: "hi" }); ``` Returns `null` in production or before the component mounts. ## Server-side stream tap Capture spec patches at the API route so events persist server-side or flow into your own telemetry. ```ts import { tapJsonRenderStream, createEventStore } from "@json-render/devtools"; import { pipeJsonRender } from "@json-render/core"; const events = createEventStore({ bufferSize: 1000 }); const tapped = tapJsonRenderStream(result.toUIMessageStream(), events); writer.merge(pipeJsonRender(tapped)); ``` YAML equivalent: `tapYamlStream`. ## Under the hood - **Shadow-DOM isolated panel** — the panel's styles never leak into the host app and vice versa. - **Ring-buffered event store** — capped log of devtools events (state changes, action dispatches, stream patches, etc.). - **Action observer registry** — each framework's `ActionProvider` reports via `notifyActionDispatch` / `notifyActionSettle` in `@json-render/core`; devtools subscribes via `registerActionObserver`. - **Picker element tagging** — while devtools is mounted, `ElementRenderer` wraps each rendered element in `` so the picker can map DOM → spec key. No layout impact.

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…