open-knowledge-bug-report

$npx mdskill add inkeep/open-knowledge/open-knowledge-bug-report

Captures a structured diagnostic bundle when a user reports an OpenKnowledge bug.

  • User reports a problem with OpenKnowledge or asks for debugging help.
  • Uses the ok bug-report CLI command with --no-reveal flag.
  • Gathers logs, system info, lock directory contents, and recent IPC errors.
  • Writes a redacted zip archive to ~/.ok/bug-reports/ and prints the path.

SKILL.md

.github/skills/open-knowledge-bug-reportView on GitHub ↗
---
name: open-knowledge-bug-report
description: "Use when the user reports a problem with OpenKnowledge, asks for help debugging OK, or wants to file a bug report. This skill guides the agent to capture diagnostic information via the ok bug-report CLI command."
compatibility: "Any MCP host (Claude Code, Cursor, Codex, Windsurf) with OpenKnowledge MCP server registered."
metadata:
  version: "0.6.0"
  author: "Inkeep"
  repository: "https://github.com/inkeep/open-knowledge"
---

# Bug Report — agent guidance

When a user reports a problem with OpenKnowledge or asks for debugging help, use the `ok bug-report` command to capture a structured diagnostic bundle.

## Quick path

```bash
ok bug-report --no-reveal
```

The `--no-reveal` flag suppresses the Finder reveal (use it when running as an agent — you want the file path, not a Finder window).

## What the command does

1. Gathers all structured log files from `~/.ok/logs/` (NDJSON format, pino)
2. When invoked inside an OK project directory, filters logs to that project's records
3. Collects system info: OK version, Node/Bun versions, macOS version, locale, timezone, free disk space
4. Collects lock directory contents (server.lock, spawn-error-log) when a project context exists
5. Extracts recent IPC error records from desktop logs
6. Runs an auto-redaction pass over all content (home paths, API tokens, credentials are scrubbed)
7. Writes `~/.ok/bug-reports/<timestamp>-bugreport.zip`
8. Prints the bundle path to stdout

## What's in the bundle

```
<timestamp>-bugreport.zip
├── MANIFEST.json       — what's inside, redaction audit report
├── sysinfo.json        — versions, locale, disk, build channel
├── README.md           — what's safe to share, discipline version
├── logs/               — NDJSON log files (auto-redacted)
├── lockdir/            — server.lock, spawn-error-log (if project)
└── recent-ipc-errors.json — last 50 structured IPC errors
```

## Agent workflow

1. Run `ok bug-report --no-reveal` in the user's project directory (or home if no project)
2. Read the path from stdout
3. Unzip to a temp directory: `unzip -o <path> -d /tmp/ok-diag-<timestamp>/`
4. Read `MANIFEST.json` — check the `redactions` array (if non-empty, some content was scrubbed)
5. Read `sysinfo.json` — check versions, disk space, build channel
6. Grep the log files for errors: `grep '"level":50' logs/*.log | head -20` (level 50 = error in pino)
7. Read `recent-ipc-errors.json` for IPC-layer failures
8. Report findings to the user with actionable next steps

## If the command is not available

The `ok bug-report` command ships with `@inkeep/open-knowledge` >= 0.7.0. If the user's version is older:

1. Check version: `ok --version`
2. If < 0.7.0: suggest `npm install -g @inkeep/open-knowledge@latest` to update
3. Fallback: manually inspect `~/.ok/logs/` for recent `.log` files (NDJSON format, greppable)

## Privacy

The bundle auto-redacts:
- macOS home paths (`/Users/<name>/` → `~/`)
- GitHub PAT prefixes (`ghp_`, `gho_`, `ghu_`, `ghs_`, `ghr_`)
- AWS access keys, Anthropic tokens, OpenAI tokens
- Bearer authorization headers

The `MANIFEST.json` `redactions` array lists every file and pattern that was scrubbed. The bundle is safe for the user to attach to a GitHub issue.

More from inkeep/open-knowledge

SkillDescription
open-knowledgeAuthoritative agent-runtime contract for working inside an OpenKnowledge project — a markdown-CRDT knowledge base exposed over MCP. Use whenever reading, listing, searching, editing, or linting any `.md` or `.mdx` file in the project, and before any `mcp__open-knowledge__*` tool call (`exec`, `search`, `write`, `edit`, `lint`, and the rest). Installed by `ok init`, so its presence means this is an OpenKnowledge project and it governs every markdown file here. Covers the read/write tool surface, grounding and linking rules, folder/template conventions, the live browser preview, and the rule that OK's MCP tools — never native file tools — handle in-scope markdown.
open-knowledge-discoveryRead when the user asks what OpenKnowledge is, wants to install it on a repository, wants to share an OpenKnowledge project with collaborators, or asks how `ok init` / `ok cowork` / OK Desktop set up a project. Do NOT load to perform OpenKnowledge reads/writes — the runtime guidance for editing markdown inside an initialized OK project ships as a separate project-local skill at `.claude/skills/open-knowledge/` whenever `ok init` runs. If the user appears to be editing markdown inside a `.ok/` project and this is the only OK skill loaded, advise them to re-run `ok init` to install the project-local skill.
open-knowledge-pack-codebase-wikiHow to work in a Codebase Wiki project (the `codebase-wiki` starter pack): an agent-authored, source-grounded wiki of the surrounding codebase. Read when the project has a `wiki/` knowledge base with `architecture/`, `modules/`, `flows/`, `concepts/`, and `guides/` sections plus `wiki/OVERVIEW.md`. Carries the per-folder rules and freshness + log discipline, summarizes the audience/depth knobs and source-reference convention, and points to the `workflow({ kind: 'wiki' })` guide for the full generate/refresh procedure. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-entity-vaultHow to work in a Personal CRM project (the `entity-vault` starter pack, GBrain-compatible): a typed-entity vault of people, companies, meetings, and concepts, each a dossier with a rewritable summary plus an append-only timeline. Read when the project has these folders. Carries the dossier convention and entity-extraction behaviors so that guidance does not live inside template bodies or folder descriptions. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-knowledge-baseHow to work in a Knowledge Base project (the `knowledge-base` starter pack). Read when the project has the three-layer source-grounded layout — `external-sources/` → `research/` → `articles/` — wired to the `workflow` MCP tool's ingest / research / consolidate kinds. Carries the pack's workflow, per-folder rules, status flows, and log discipline so this guidance does NOT live inside template bodies or log.md. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-okfHow to work in an OKF starter project (the `okf` starter pack): a knowledge base that is conformant with Google's Open Knowledge Format (OKF) from commit one — `concepts/`, `references/`, `notes/`, a reserved `index.md` navigation hub, and a reserved `log.md` change history. Read when the project has these folders + reserved files. Carries the OKF conventions (non-empty `type` on every non-reserved doc; reserved files carry no frontmatter) as guidance, not enforcement. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-plain-notesHow to work in a Plain Notes project (the `plain-notes` starter pack): a flat notes/ folder plus a daily/ journal. The 'I just want to write' layout. Read when the project has these folders. Carries the linking habit and daily-entry behavior so templates and folder descriptions stay minimal. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-software-lifecycleHow to work in a Software Lifecycle project (the `software-lifecycle` starter pack): proposals → decisions → specs → postmortems, plus guides. Read when the project has these folders. Carries the doc lifecycle, status flows, and per-folder agent behaviors so that guidance does not live inside template bodies or folder descriptions. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-worldbuildingHow to work in a Worldbuilding project (the `worldbuilding` starter pack): a fiction encyclopedia of characters, settings, themes, factions, and lore. Read when the project has these folders. Carries the auto-stub and consistency behaviors so that guidance does not live inside template bodies or folder descriptions. Complements the platform `open-knowledge` skill; does not replace it.
open-knowledge-pack-writing-pipelineHow to work in a Writing Pipeline project (the `writing-pipeline` starter pack): a three-stage drafting flow, ideas → drafts → published. Read when the project has these folders. Carries the stage flow and review behaviors so that guidance does not live inside template bodies or folder descriptions. Complements the platform `open-knowledge` skill; does not replace it.