cosense

cosense is a skill for Claude Code from worldnine/scrapbox-cosense-mcp. It costs 49 tokens per session (954 once invoked), scanned B, original, MIT.

A tool guide for Cosense, also called Scrapbox, a wiki for linked pages and shared notes. It explains how to find, read, create, edit, rewrite, and delete pages.

In plain words
What is it for?
Use it to search or list pages, update lines, create notes, gather related page context, generate page links, or remove page content.
Why use it?
It avoids having to remember separate commands for common wiki operations and highlights safeguards for irreversible changes.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths.

Part of the scrapbox-cosense plugin — 1 skill, 1 MCP server shipped together

Good fit Use it to search or list pages, update lines, create notes, gather related page context, generate page links, or remove page content.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/worldnine/scrapbox-cosense-mcp/scrapbox
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.

Any agent
npx skills add worldnine/scrapbox-cosense-mcp --skill scrapbox
Clone the repo
git clone --depth 1 https://github.com/worldnine/scrapbox-cosense-mcp

Made for: Claude Code.

Or install scrapbox-cosense, the plugin that ships this one along with the rest of its 1 skill, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cosense

README.md
[![agentmods](https://agentmods.dev/badge/skills/worldnine/scrapbox-cosense-mcp/scrapbox/github.svg)](https://agentmods.dev/skills/worldnine/scrapbox-cosense-mcp/scrapbox)
Your own site
<a href="https://agentmods.dev/skills/worldnine/scrapbox-cosense-mcp/scrapbox"><img src="https://agentmods.dev/badge/skills/worldnine/scrapbox-cosense-mcp/scrapbox/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cosense

Your own site · 80×15
<a href="https://agentmods.dev/skills/worldnine/scrapbox-cosense-mcp/scrapbox"><img src="https://agentmods.dev/badge/skills/worldnine/scrapbox-cosense-mcp/scrapbox.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 954 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00049 $0.00954
Opus 5 $0.00024 $0.00477
Sonnet 5 $0.00010 $0.00191
Haiku 4.5 $0.00005 $0.00095

Measured 10d ago against content hash 39dbde703f46, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

cosense scanned grade B with 1 finding 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 10d ago.

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.

全プロジェクト共通で使う場合は `~/.claude/settings.json` に設定することもできます。
skills/scrapbox/SKILL.md · 62 lines

What it actually says

Cosense (Scrapbox)

Cosense ページの取得・検索・作成・編集・削除・書き換え。CLI 経由で実行。

コマンド

npx -y scrapbox-cosense-mcp で実行する(グローバルインストール済みなら scrapbox-cosense-mcp 直接でもよい)。

  • npx -y scrapbox-cosense-mcp get <title> — ページ取得
  • npx -y scrapbox-cosense-mcp search <query> — キーワード検索
  • npx -y scrapbox-cosense-mcp list [--sort=X --limit=N] — ページ一覧
  • npx -y scrapbox-cosense-mcp create <title> [--body=TEXT] — ページ作成(markdown自動変換)
  • npx -y scrapbox-cosense-mcp insert <title> --after=TEXT --text=TEXT — 行挿入
  • npx -y scrapbox-cosense-mcp edit <title> --target=TEXT --text=TEXT [--all] — 行置換(完全一致、複数行ブロック対応、既定は最初の1件のみ)
  • npx -y scrapbox-cosense-mcp delete-lines <title> --target=TEXT [--all] — 行削除(完全一致、複数行ブロック対応)
  • npx -y scrapbox-cosense-mcp delete <title> [--dry-run] — ページ削除(COSENSE_ENABLE_DELETE=true が必要。取り消せないので、まず --dry-run で確認する)
  • npx -y scrapbox-cosense-mcp rewrite <title> --body=TEXT [--dry-run] — ページ全体の書き換え(COSENSE_ENABLE_DELETE=true が必要。取り消せないので、まず --dry-run で確認する)
  • npx -y scrapbox-cosense-mcp url <title> — URL生成
  • npx -y scrapbox-cosense-mcp context <title> [--hop=1|2] — 関連ページ一括取得(Smart Context)

詳細は npx -y scrapbox-cosense-mcp <command> --help で確認。

全コマンド共通: --compact でトークン効率の高い出力、--project=NAME でプロジェクト指定、--json でJSON出力。

環境変数の設定

必要な環境変数

変数名 説明 必須
COSENSE_PROJECT_NAME 対象プロジェクト名(--project で上書き可) はい
COSENSE_SID セッションID(プライベートプロジェクト、create/insert/edit/delete-lines/delete/rewrite/context 操作に必要) 条件付き
COSENSE_ENABLE_DELETE true のときだけ delete / rewrite サブコマンドが使える いいえ

永続化方法

.claude/settings.local.json(gitignore対象)の env キーに追加してください。

{
  "env": {
    "COSENSE_PROJECT_NAME": "your-project-name",
    "COSENSE_SID": "s:your-session-id"
  }
}

全プロジェクト共通で使う場合は ~/.claude/settings.json に設定することもできます。

SID の取得方法

  1. ブラウザで Cosense にログイン
  2. 開発者ツール → Application → Cookies
  3. connect.sid の値をコピー
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. 10d ago First seen · 62 lines · 49 tokens per session scan B 39dbde703f46

Subscribe to this mod's changes

cosense is a skill published in the GitHub repository worldnine/scrapbox-cosense-mcp (52 stars, last pushed 22d ago), licensed MIT. It adds 49 tokens to every session and 954 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.