> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bookmarkjar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Claude Code Skill

> Install the Bookmarkjar skill for Claude Code to search and save bookmarks from your terminal

## Overview

The Bookmarkjar skill lets you search and save bookmarks directly from **Claude Code** (CLI or VS Code) using a simple slash command — no MCP configuration needed.

<Note>
  You'll need an API key. Create one in **Dashboard → Profile → API Keys**.
</Note>

## Install

<Steps>
  <Step title="Create the skill directory">
    ```bash theme={null}
    mkdir -p ~/.claude/skills/bookmarkjar
    ```
  </Step>

  <Step title="Create the skill file">
    Copy the content from the [Skill Source](#skill-source) section below and save it as:

    ```
    ~/.claude/skills/bookmarkjar/SKILL.md
    ```
  </Step>

  <Step title="Set your API key">
    Add to your shell profile (`~/.zshrc`, `~/.bashrc`, etc.):

    ```bash theme={null}
    export BOOKMARKJAR_API_KEY="your-api-key-here"
    ```

    Then reload your shell:

    ```bash theme={null}
    source ~/.zshrc
    ```
  </Step>

  <Step title="Use it">
    Open Claude Code and type:

    ```
    /bookmarkjar react hooks state management
    ```

    Claude will search your bookmarks and return results. You can also ask it to save URLs:

    ```
    /bookmarkjar save https://react.dev/reference/react/useState
    ```
  </Step>
</Steps>

## What it does

The skill gives Claude Code two capabilities:

| Action                                            | Example                                    |
| ------------------------------------------------- | ------------------------------------------ |
| **Search** bookmarks by keywords, tags, or domain | `/bookmarkjar typescript testing patterns` |
| **Save** one or more URLs as bookmarks            | `/bookmarkjar save https://example.com`    |

Claude interprets your natural language query and calls the Bookmarkjar API automatically.

## Examples

```
/bookmarkjar find all React bookmarks tagged with hooks
/bookmarkjar search for database migration guides
/bookmarkjar save https://drizzle.team/docs/orm https://orm.drizzle.team
/bookmarkjar what bookmarks do I have about kubernetes?
```

## Skill Source

If you prefer to create the file manually, save this as `~/.claude/skills/bookmarkjar/SKILL.md`:

```markdown theme={null}
---
name: bookmarkjar
description: Search and save bookmarks from Bookmarkjar. Use when the user wants to find, search, list, or save bookmarks.
user-invocable: true
allowed-tools: Bash
argument-hint: [search query or "save URL"]
---

# Bookmarkjar Skill

Search or save bookmarks via the Bookmarkjar API.

## How to use

Parse the user's intent from `$ARGUMENTS`:

- If it contains "save" or a raw URL → **insert** the URL(s)
- Otherwise → **search** with the query

## Search

Call the API to search bookmarks:

curl -s -X POST "https://bookmarkjar.com/api/tools/mcp" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $BOOKMARKJAR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "bookmarks.search",
      "arguments": { "search": "<query>", "limit": 10 }
    }
  }'

Display results as a readable list with title, URL, tags, and description.

## Insert

Call the API to save bookmarks:

curl -s -X POST "https://bookmarkjar.com/api/tools/mcp" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $BOOKMARKJAR_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "bookmarks.insert",
      "arguments": { "urls": ["<url1>", "<url2>"] }
    }
  }'

Confirm how many bookmarks were saved.

## Error handling

- If `$BOOKMARKJAR_API_KEY` is not set, tell the user to set it
- If the API returns an error, show the error message
```

## MCP vs Skill

| Feature  | MCP Server                            | Skill                    |
| -------- | ------------------------------------- | ------------------------ |
| Setup    | JSON config + restart                 | Copy one file            |
| Works in | Any MCP client (Claude, Cursor, etc.) | Claude Code only         |
| Auth     | Handled by client headers             | Environment variable     |
| Tools    | Auto-discovered                       | Natural language routing |

<Tip>
  For the best experience, use both: the [MCP server](/bookmarks/mcp) for always-on tool access, and the skill for quick slash-command searches.
</Tip>
