d3k
Bootstrap d3k in standalone AI apps (Codex, Cursor, Claude Code): detect/install dev3000, start d3k as the runtime, and use unified logs plus CDP browser control instead of running npm/bun dev directly.
What this skill does
# d3k Standalone Bootstrap
Use this skill when working in a standalone AI app and you need reliable local web debugging with browser + server context.
## Why d3k-first
- `d3k` captures server logs, browser console, network events, and screenshots in one timeline.
- `d3k` exposes a stable CDP endpoint so the agent can control the same browser session being monitored.
- Running `npm run dev` or `bun run dev` directly omits this unified telemetry and usually leads to weaker diagnoses.
## Bootstrap Workflow
1. Confirm whether `d3k` is installed:
```bash
command -v d3k >/dev/null && d3k --version
```
2. If `d3k` is missing, install dev3000 globally (prefer Bun):
```bash
bun install -g dev3000
```
Fallback if Bun is unavailable:
```bash
npm install -g dev3000
```
3. Start d3k as the runtime (preferred default in agent shells):
```bash
d3k --no-agent --no-tui -t
```
4. Keep d3k running while editing code. Do not start a second dev server with `npm/bun dev`.
## Codex Fresh Browser/Profile Startup
Use this workflow when the user asks Codex to start d3k with a fresh browser/profile.
1. Close any stale `agent-browser` daemon before launching with `--profile`. Otherwise `agent-browser` will reuse the existing daemon and print `--profile ignored`.
```bash
d3k agent-browser close --all
```
2. Start the app through d3k in `servers-only` mode and keep that command running. In Codex, this is more reliable than asking d3k to launch the browser itself when a fresh profile is required.
```bash
d3k --no-agent --no-skills --servers-only --command "npm run dev -- -H 127.0.0.1 -p 3000" --port 3000 --startup-timeout 90 --no-tui
```
Adjust the package-manager command and port for the project. Prefer `--command` over `--script` when passing framework flags. For npm scripts, put flags after `--`; otherwise tools like Next.js can interpret the port as a project directory.
3. Verify the server before opening more browser windows:
```bash
curl -I http://127.0.0.1:3000
```
4. Open the fresh profile as a separate browser step:
```bash
d3k agent-browser --profile /tmp/d3k-fresh-profile --headed open http://127.0.0.1:3000
```
5. Sanity-check the opened page:
```bash
d3k agent-browser get title
d3k agent-browser snapshot -i
d3k errors
```
Practical rules:
- Prefer `127.0.0.1` for this workflow. If `localhost` hangs or flips between IPv4/IPv6 behavior, do not keep retrying browser launches.
- If `curl -I` hangs, the server is wedged even if the port appears occupied; restart the d3k server process before opening a browser.
- In `servers-only` mode there is no d3k-monitored CDP browser. Use regular `d3k agent-browser` commands, not `d3k cdp-port`.
- In sandboxed agent environments, rerun local-network checks and `agent-browser` opens outside the sandbox when sandbox networking blocks access to `127.0.0.1`.
## Debugging Commands
Use these first before ad-hoc log scraping:
```bash
d3k errors --context
d3k logs -n 200
d3k logs --type browser
d3k logs --type server
```
## CDP Browser Control
Use the already-monitored browser session instead of launching a separate automation browser.
```bash
d3k agent-browser open http://localhost:3000
d3k agent-browser snapshot -i
d3k agent-browser click @e2
d3k agent-browser screenshot /tmp/d3k-current.png
```
`d3k agent-browser` auto-connects to the active session's browser via CDP. To target a different browser, run `d3k agent-browser connect <port>` first.
## Browser Tool Choice
Use the browser tool that matches the task instead of treating them as interchangeable:
- `agent-browser`
- Default choice.
- Best for generic web apps and for driving the exact headed browser session that d3k is already monitoring via CDP.
- Use it when you need `snapshot`, ref-based `click`, `fill`, or to reproduce what the user sees in the monitored tab.
- `next-browser`
- Next.js-specific tool.
- Best for React/Next introspection: `tree`, `errors`, `logs`, `routes`, `project`, PPR inspection, and related Next dev-server signals.
- It is not a drop-in replacement for `agent-browser`: no accessibility `snapshot`, no ref-based `click`, and no `fill`.
- It launches its own daemon/browser flow and does not use the d3k session's CDP port.
Practical rule:
- Need to drive the same browser d3k is monitoring: use `agent-browser`.
- Need Next.js component tree or Next-specific diagnostics: use `next-browser`.
Examples:
```bash
# Same monitored browser session
d3k agent-browser snapshot -i
d3k agent-browser click @e2
# Next.js-specific inspection
d3k next-browser open http://localhost:3000
d3k next-browser tree
d3k next-browser errors
d3k next-browser logs
```
## Artifacts to Read
- `~/.d3k/{project}/d3k.log`
- `~/.d3k/{project}/logs/`
- `~/.d3k/{project}/screenshots/`
- `~/.d3k/{project}/session.json`
## Operating Rules
- Prefer headed mode for interactive debugging.
- Use `--headless` only for CI or when explicitly requested.
- Use `--servers-only` only when browser monitoring is intentionally disabled.
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.