/cogni-workspace:cogni-issuesfrom cogni-workspace
Files and tracks GitHub issues (bugs, features, change requests, questions) against insight-wave plugins via the gh CLI. Consults user, resolves plugin repository, drafts from templates, creates with labels, and tracks locally.
Ships in cogni-workspace. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Manage the lifecycle of GitHub issues for insight-wave ecosystem plugins: consult with the
user to understand the problem clearly, resolve which repository the plugin belongs to,
draft issues from templates, create them via gh issue create, and track them locally.
All GitHub operations use the gh CLI — atomic, scriptable, and the same transport
the rest of the cogni-service pipeline uses. The user must have gh installed and
authenticated (gh auth login) before this skill runs.
The reliability win over a browser-automation transport is concrete: labels are applied in the same API call that creates the issue (no "best-effort fallback" that silently drops type signals), the flow runs equally well from a remote routine, and the skill has no MCP-server dependency.
Read the workspace language from .workspace-config.json in the workspace root
(language field — "en" or "de") as the default interaction language. If the
user's message is in a different language, prefer the user's language (message
detection overrides the workspace setting — someone writing in German wants a
German response even if the workspace is set to English).
If .workspace-config.json is missing, fall back to detecting the user's language
from their message. If still unclear, default to English.
Conduct the entire interaction in the chosen language — consultation questions, acknowledgments, draft body, and confirmation prompts.
Exceptions where English stays:
[Bug], [Feature], [Change], [Question] — conventions for
GitHub label automation and cross-team readability.The skill scripts live at ${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/.
CLAUDE_PLUGIN_ROOT points to the cogni-workspace plugin directory. If the scripts
cannot be found, report the missing path to the user — never guess paths.
All GitHub operations route through scripts/gh-issues-helper.sh. JSON on stdout,
errors on stderr. This table and the script's usage() describe the same surface — update both when adding or renaming a subcommand.
| Operation | Command |
|---|---|
| Readiness check | bash gh-issues-helper.sh check |
| Create issue | bash gh-issues-helper.sh create <repo> --title T --body-file F [--labels L1,L2] |
| List issues | bash gh-issues-helper.sh list <repo> [--state open|closed|all] [--limit N] [--label L] [--search Q] |
| Search issues (dedup) | bash gh-issues-helper.sh search <repo> "keywords" [--state open|all] |
| View issue | bash gh-issues-helper.sh view <repo> <number> |
| Browse URL | bash gh-issues-helper.sh browse-url <repo> <number> |
The helper validates that requested labels exist on the target repo before invoking
gh issue create, so a missing label fails fast with a structured error instead of
half-creating an issue without its type label.
| Mode | Triggers | Action |
|---|---|---|
| setup | gh not installed, gh auth status not authenticated, "set up issues", "ich kann kein Issue erstellen" | Probe gh + auth, guide through gh auth login |
| create | reporting bugs, requesting features, filing change requests, asking plugin questions | Consult, resolve, draft, confirm, create, log |
| list | "my issues", "show issues", "what have I filed" | Read local state, display grouped by plugin |
| status | "check issue #N", "any updates on my issue" | Fetch from GitHub via gh, update local record |
| browse | "open issue", "show in browser" | Print the GitHub issue URL (the user opens it) |
Default to list when intent is unclear.
Before any GitHub operation, verify gh readiness:
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" check
The probe returns JSON like:
{ "platform": "macos", "gh_installed": true, "gh_version": "2.89.0",
"authenticated": true, "gh_user": "sdh07",
"install_hint": "brew install gh", "login_hint": "gh auth login" }
Branch on gh_installed and authenticated:
true → proceed.gh_installed: false → switch to setup mode (install path).gh_installed: true, authenticated: false → switch to setup mode (login path).gh is a single binary with a one-time gh auth login. The setup is short and the user
keeps full control of their credentials — gh walks them through the OAuth flow in their
default browser.
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" check
gh is missingRead install_hint from the probe output and tell the user how to install for their
platform:
macOS:
brew install gh(or download from https://cli.github.com/)Linux: see https://github.com/cli/cli/blob/trunk/docs/install_linux.md
Once installed, run
gh auth loginand let me know when you're ready.
After the user installs, re-run the probe.
gh is installed but not authenticatedTell the user:
Run
gh auth loginin your terminal. Choose GitHub.com, then HTTPS, and authenticate with your browser (recommended) or a personal access token. When the CLI confirms login, let me know and I'll continue.
gh auth login handles 2FA and SSO transparently — the user authenticates in their
own browser using the github.com flow, no credential handling on our side.
After login, re-run the probe and confirm authenticated: true before proceeding.
If the user came here because they were trying to file an issue, continue with the create flow.
Initialize local issue state once per working directory (idempotent — safe to re-run on every create):
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/issue-store.sh" init "${working_dir}"
working_dir defaults to the current working directory. State lives in
{working_dir}/cogni-issues/.
Then verify gh readiness (see Prerequisites). If not ready, enter setup mode and
return here once authenticated: true.
If the user hasn't named a specific plugin, ask which plugin this is about. Then resolve it:
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/resolve-plugin.sh" "<plugin_name>"
Handle: "ambiguous": true -> present matches and ask; "error" -> list available plugins
and ask; success -> extract owner_repo, version, marketplace.
Before investing in consultation and drafting, search for existing issues:
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" \
search "<owner_repo>" "<2-3 keywords from the user's complaint>" --limit 5
The output is a JSON array of {number, title, labels, state, url, ...} objects.
When a likely match appears, show it to the user and ask: "This looks similar — is it
the same problem, or something different?" For the same problem, link to the existing
issue instead of creating a duplicate.
Infer the type from context (match intent across languages, not specific keywords):
| Type | Signals |
|---|---|
bug | something is broken, errors, crashes, doesn't work, fails, wrong output |
feature | add something new, would be nice, request, support for |
change-request | change existing behavior, modify, adjust, different behavior wanted |
question | how to, why does, confused, wondering |
If genuinely ambiguous, ask. Otherwise proceed with the inferred type.
When the complaint involves config changes or unexpected output, do a quick sanity
check before classifying: scan the plugin's data model or config schema to verify the
user's premise. For example, if a user says "I updated the logo in the config but it
still shows the old one," check whether the config actually has a logo field. The user's
mental model of how the plugin works may not match reality — what looks like a bug might
be a feature gap, a wrong-config-file situation, or a misunderstanding of which component
owns that functionality. A 30-second Grep or Read of the relevant schema can save
everyone from filing a misleading issue.
Help the user articulate the need. Many users know something is wrong but have not organized their thoughts. Act as a helpful interviewer, not a form.
First, mine the conversation for existing evidence. Check recent tool outputs for error messages, stack traces, or failed commands. Inspect what the user was working on — the conversation often contains the exact workflow that triggered the problem. Reuse any earlier traceback instead of asking whether an error appeared.
When a premise check (above) finds a mismatch, incorporate that finding into your consultation. Instead of generic "what happened?" questions, tell the user what you found and ask targeted questions to resolve the gap — e.g., "I checked the portfolio config schema and it doesn't have a logo field. Where exactly are you seeing the logo, and which file did you edit?"
Then ask only what's missing — 2-3 questions max, batched in one turn:
Skip consultation entirely if the user (or conversation context) already provides enough detail. Acknowledge it: "You've given me a clear picture — let me draft this up."
Read the template from references/issue-templates.md for the determined type.
Fill in from conversation + resolver output. Omit sections that cannot be filled meaningfully — shorter with real content beats complete with placeholders.
Auto-detect environment:
uname -s && uname -r && node -v 2>/dev/null
Write in the user's language (except title prefixes and technical terms).
Transform vague input into precise descriptions. This is the skill's core value:
| User says | Precise issue text |
|---|---|
| "it doesn't work" | "The skill exits with a non-zero status code without producing output when invoked with default arguments" |
| "it's slow" | "Rendering takes 45+ seconds for a 3-station brief, compared to ~15s previously — a 3x regression" |
| "the output looks wrong" | "Generated propositions show placeholder text ('Lorem ipsum') instead of configured descriptions" |
| "es funktioniert nicht mehr" | "Das Skill bricht beim Aufruf mit einem TypeError ab und erzeugt keine Ausgabe" |
The pattern: replace subjective impressions with observable facts, measurable quantities, or specific error details.
Add a root cause hypothesis when evidence supports one. If the error or context suggests a likely
cause, include it in "Additional context" — e.g., "The TypeError on narrative_arc
suggests a property was renamed or removed in the latest update, possibly a breaking
change in the data model." This helps maintainers triage faster. Only do this when the
evidence supports it — don't speculate wildly.
Show the complete draft (title + body) and ask for approval in the user's language. Never create without explicit confirmation. If the user wants changes, apply them and show the updated draft.
ghWrite the drafted body to a temp file, then invoke the helper. Labels come from the
type → label mapping in references/issue-templates.md and are applied atomically —
the helper fails fast if any label is missing on the repo, so the issue never lands
half-labelled.
BODY_FILE=$(mktemp -t cogni-issue.XXXXXX.md)
cat > "$BODY_FILE" <<'EOF'
<the drafted markdown body>
EOF
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" \
create "<owner_repo>" \
--title "<title>" \
--body-file "$BODY_FILE" \
--labels "<csv of labels from the mapping>"
rm -f "$BODY_FILE"
The helper returns:
{ "status": "created", "number": 142, "url": "https://github.com/.../issues/142",
"title": "...", "labels": ["bug"] }
Capture number and url for the next step. If the helper exits non-zero, surface the
JSON error to the user and stop — never retry blindly. Common errors:
could not read repo labels → the label query itself failed, so nothing is known about
the repo's label set; surface the detail field and have the user check network access,
that the repo exists, and that their token has repo scope.label(s) missing from repo → tell the user which labels are missing and ask whether
to file without them or to create the labels first.gh issue create failed → surface the detail field; usually a network or auth issue.gen-id returns a JSON envelope — {"id":"issue-<uuid>"} — like every script in
the ecosystem. Extract the bare id before building the record; inlining the raw
envelope where the id string belongs produces invalid JSON and add aborts with
a JSONDecodeError.
ID=$(bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/issue-store.sh" gen-id \
| python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
Then build the record as a single well-formed JSON object (substituting the captured
$ID and the values from earlier steps) and pipe it via stdin:
cat <<JSON | bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/issue-store.sh" \
add "${working_dir}"
{
"id": "${ID}",
"plugin": "${plugin}",
"marketplace": "${marketplace}",
"repository": "${repository}",
"github_number": ${github_number},
"github_url": "${github_url}",
"type": "${type}",
"title": "${title}",
"status": "open",
"created_at": "${now}",
"updated_at": "${now}"
}
JSON
github_number and github_url come straight from the helper's create response — no
URL parsing required. github_number is the bare integer (unquoted); every other
field is a JSON string.
Return the GitHub issue URL and local issue ID.
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/issue-store.sh" read "${working_dir}"
Display issues grouped by plugin: title, type badge, GitHub number + URL, status, date. If empty, suggest the create flow.
Look up the issue in local state to get repository and github_number.
Fetch the live state via gh:
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" \
view "<repository>" "<github_number>"
Parse the JSON response: state (OPEN/CLOSED), labels[].name, comments[] (the
most recent few), updatedAt.
Update the local record via update-status.
Show the user: state, latest comments summary, labels, last update.
Get the canonical URL and print it for the user — the SKILL doesn't open browsers itself.
bash "${CLAUDE_PLUGIN_ROOT}/skills/cogni-issues/scripts/gh-issues-helper.sh" \
browse-url "<repository>" "<github_number>"
If the user wants the URL opened directly, suggest open <url> (macOS) or
xdg-open <url> (Linux) — those are the user's default-browser commands and don't
require any extra dependencies.
gh surfaces GitHub's X-RateLimit-Remaining: 0 as a clear
error message. Inform the user to wait a few minutes; secondary rate limits clear
in 1–2 minutes, primary limits in up to an hour.gh auth login scopes determine access. If a user can't view a
private repo, ask them to re-run gh auth login and grant the repo scope.gh error and ask the user to retry. Local state
is unaffected — the issue is created or it isn't.resolve-plugin.sh
and verify the owner_repo field.scripts/gh-issues-helper.sh — gh CLI wrapper. Subcommands: check, create,
list, view, search, browse-url. JSON on stdout, errors on stderr. Validates
labels exist on the target repo before invoking gh issue create.
list accepts --search Q for inline keyword filtering on top of --state and
--label (no need to switch to the search subcommand for simple substring filters).scripts/resolve-plugin.sh — Resolves a plugin name to its GitHub repo by scanning
marketplace.json files. All insight-wave plugins resolve to the monorepo
cogni-work/insight-wave.scripts/issue-store.sh — Local JSON state management (init, gen-id, add, read,
update-status). The add command reads JSON from stdin for safety.references/issue-templates.md — Templates for the four issue types with auto-fill
placeholders and label mapping.evals/evals.json holds this skill's trigger and behaviour prompts — reference material for verifying the skill still fires on the phrasings it claims, not loaded at runtime.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub cogni-work/insight-wave --plugin cogni-workspace10 skills in this plugin
/claimsThis skill should be used to manage the claim lifecycle: submit, verify, dashboard, inspect,
resolve, and cobrowse. It applies to "claims", fact-checking, source verification, checking whether
statements match cited sources, reviewing deviations, tracking sourced-statement accuracy, or
receiving claims from another plugin. It also applies to "which claims need attention", "what did
verification find", "let's look at those sources together", "help me check these links", "browse
the unavailable sources", "check what fields a ClaimRecord has", or "understand deviation types or
severity levels". Verification re-fetches cited URLs; cogni-knowledge:knowledge-verify provides
zero-network scoring against claims extracted at ingest time.
/copywriterPolish, rewrite, or create business documents (memos, briefs, reports, proposals, one-pagers, executive summaries, emails, blog posts, business letters) using professional messaging frameworks (BLUF, McKinsey Pyramid, SCQA, STAR, PSB, FAB) and persuasion techniques (number plays, power words, rhetorical devices). Use this skill when the user asks to polish a document, improve writing, make something more readable, restructure a brief, apply BLUF or Pyramid Principle, rewrite for executives, strengthen messaging, create a proposal, write a one-pager, clean up a report, compress a document to minimum length without losing facts, shorten a synthesis for circulation, tighten a document while keeping every citation and number, or apply any named messaging framework. Handles German documents (Wolf Schneider style), arc-aware narrative polishing (story arcs with arc_id), and IS/DOES/MEANS sales messaging. Simple requests like "make this better" about a markdown file should trigger this skill./install-mcpEnd-to-end MCP server installation for the insight-wave ecosystem — clone and build git-based MCPs, configure native app MCPs, and write the server into the user's own config for Claude Code or Claude Desktop without manual JSON editing. Use this skill whenever the user mentions MCP installation, MCP setup, MCP configuration, "my MCPs aren't working", "set up excalidraw", "install MCP servers", "update MCP servers", "patch desktop config", "MCP not found", "excalidraw tools not available", "excalidraw tools missing in Claude Code", "MCP not loaded", "mcpServers missing in ~/.claude.json", "pencil MCP not working", port conflicts with MCP servers (localhost:3000), or any mention of claude_desktop_config.json. Also trigger when manage-workspace needs to handle its MCP installation step (step 5), when workspace-status reports MCP servers as not loaded and the user wants to fix it, or when a rendering agent in cogni-portfolio (Excalidraw) or cogni-website (Pencil) fails because its MCP dependency is missing./manage-market-registrySingle entry point for the canonical insight-wave market registry — a read path that reports coverage and orphan overlay domains, and a write path that adds markets. Use whenever the user mentions "add a market", "manage markets", "market status", "scaffold a new region", "show market coverage", "missing markets in research/trends", "audit region sources", "audit authority sources", "are authority sources up to date", "compare authority domains across plugins", or "check market sources alignment". Curating plugin-specific overlay metadata (research authority_metadata, trends site_searches) is plugin-side work — edit the overlay file directly./manage-themesCreate, audit, improve, select, and apply visual design themes for the workspace — sourced from Claude Design bundles or bundled presets. Audits cover contrast, palette harmony, typography pairing, and completeness. Use it whenever the user mentions themes, brand colors or visual identity, wants a consistent look-and-feel across outputs, or whenever a downstream skill needs a theme resolved before it renders. Trigger phrases include "pick a theme", "select a theme", "which theme", "choose theme", "apply a theme", "my theme feels off", "check contrast", "improve my colors", "what theme for my brand?", "I need a visual identity for my startup", "make it match our brand", "use our company colors", "grab the style from that site", "brand guidelines", "design system", "brand identity", "visual standards", "author tokens", "build a tiered theme system", "deepen a theme", and "match the cogni-work pattern". Also triggers on a Claude Design bundle URL (api.anthropic.com/v1/design/h/...)./manage-workspaceInitialize or update an insight-wave workspace — the shared foundation that all marketplace plugins depend on. Use this skill whenever someone asks to create, set up, scaffold, initialize, update, refresh, or sync a workspace — including phrases like "set up my workplace", "get started with cogni", "create a new project workspace", "update workspace", "refresh workspace", "sync plugins", "re-scan plugins", or any mention of workspace initialization or updates. Also trigger when someone runs a fresh plugin install and needs the shared foundation that plugins depend on, or when plugins were added/removed and the workspace needs to catch up. Even if the user just says "new project", "start fresh", "add a plugin", "wire up my workspace", or "my plugins can't find each other", this skill applies.Other plugins' skills for the same job