km-setup

Automated setup wizard for Knowledge Manager - configures MCP servers and creates config files.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/treylom/knowledge-manager/km-setup
Any agent
npx skills add treylom/knowledge-manager --skill km-setup
Clone the repo
git clone --depth 1 https://github.com/treylom/knowledge-manager

Made for: Claude Code, Codex.

Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,701 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00020 $0.01701
Opus 5 $0.00010 $0.00851
Sonnet 5 $0.00004 $0.00340
Haiku 4.5 $0.00002 $0.00170

Measured today against content hash 3f462087b25d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

km-setup scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat ~/.gemini/antigravity/mcp_config.json | python -m json.tool

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

cat ~/.gemini/antigravity/mcp_config.json | python -m json.tool
.agent/skills/km-setup/SKILL.md · 311 lines

How it starts

The opening of the file, as written. The whole thing — 311 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Knowledge Manager Setup

Automated setup wizard that configures MCP servers and creates configuration files


Overview

This skill automates the Knowledge Manager setup process:

  1. Detects your environment (Antigravity, Claude Code, etc.)
  2. Asks for your preferences (Obsidian vault path, etc.)
  3. Automatically configures MCP servers
  4. Creates km-config.json
  5. Verifies the setup

Setup Flow

Step 1: Environment Detection

function detect_environment() {
  // Check for Antigravity
  if (file_exists("~/.gemini/antigravity/mcp_config.json")) {
    return "antigravity"
  }

  // Check for Claude Code
  if (command_exists("claude")) {
    return "claude-code"
  }

  return "unknown"
}

Step 2: User Preferences

Ask the user:

=================================================
  Knowledge Manager Setup Wizard
=================================================

Where would you like to save your notes?

  [1] Obsidian (Recommended for personal knowledge management)
  [2] Local Markdown files only
  [3] Both Obsidian and local backup

Selection: _

If Obsidian selected:

Please provide your Obsidian vault path:

Examples:
  Windows: C:/Users/YourName/Documents/MyVault
  Mac: /Users/YourName/Documents/MyVault
  Linux: /home/yourname/Documents/MyVault

Vault path: _

Step 3: MCP Server Configuration

For Antigravity (Simplified!)

Antigravity has a built-in browser agent, so playwright MCP is optional. Only Obsidian MCP is required if you want to save to Obsidian.

Config file location: ~/.gemini/antigravity/mcp_config.json

function configure_antigravity_mcp(vaultPath, options = {}) {
  // 1. Read existing config
  configPath = expand_path("~/.gemini/antigravity/mcp_config.json")
  existingConfig = Read(configPath) || { "mcpServers": {} }

  // 2. Add required servers (Obsidian only for Antigravity)
  newServers = {
    "obsidian": {
      "command": "npx",
      "args": ["-y", "@huangyihe/obsidian-mcp"],
      "env": {
        "OBSIDIAN_VAULT_PATH": vaultPath
      }
    }
  }

  // 3. Optionally add Playwright (for screenshots, batch processing, etc.)
  if (options.includePlaywright) {
    newServers["playwright"] = {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-playwright"]
    }
  }

  // 4. Merge with existing
  existingConfig.mcpServers = {
    ...existingConfig.mcpServers,
    ...newServers
  }

  // 5. Write back
  Write(configPath, JSON.stringify(existingConfig, null, 2))

  return true
}

Read the full file on GitHub · 311 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 311 lines · 20 tokens per session scan C 3f462087b25d

Subscribe to this mod's changes

km-setup is a skill published in the GitHub repository treylom/knowledge-manager (227 stars, last pushed yesterday), licensed MIT. It adds 20 tokens to every session and 1,701 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it C with 2 findings (reads agent configuration directories, reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

agent-host-chat-contributions

Build and review cross-cutting agent-host chat behavior through lifecycle contributions. Use when adding turn lifecycle side effects, prompt or context injection, restored-history transformation, protocol-action observation, or when reviewing changes that add code to AgentSideEffects or AgentService.

microsoft/vscode · 56 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens