km-storage-abstraction

km-storage-abstraction is a skill for Claude Code from treylom/knowledge-manager. It costs 20 tokens per session (1,435 once invoked), scanned A, original, MIT.

A common saving interface for notes across Obsidian, Notion, and local files. It chooses an appropriate storage location while preserving the requested project folder.

In plain words
What is it for?
It helps coding agents save project notes, personal knowledge, and other files to the intended storage backend.
Why use it?
It avoids writing notes to the wrong place when several storage systems or project folders are available.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions Gemini CLI.

Part of the km plugin — 10 skills, 10 commands, 2 agents shipped together

Good fit It helps coding agents save project notes, personal knowledge, and other files to the intended storage backend.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/treylom/knowledge-manager/km-storage-abstraction
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 treylom/knowledge-manager --skill km-storage-abstraction
Clone the repo
git clone --depth 1 https://github.com/treylom/knowledge-manager

Made for: Claude Code.

Or install km, the plugin that ships this one along with the rest of its 10 skills, 10 commands, 2 agents.

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 km-storage-abstraction

README.md
[![agentmods](https://agentmods.dev/badge/skills/treylom/knowledge-manager/km-storage-abstraction.svg)](https://agentmods.dev/skills/treylom/knowledge-manager/km-storage-abstraction)
Your own site
<a href="https://agentmods.dev/skills/treylom/knowledge-manager/km-storage-abstraction"><img src="https://agentmods.dev/badge/skills/treylom/knowledge-manager/km-storage-abstraction.svg" alt="Measured on agentmods" height="20"></a>
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,435 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00020 $0.01435
Opus 5 $0.00010 $0.00718
Sonnet 5 $0.00004 $0.00287
Haiku 4.5 $0.00002 $0.00144

Measured 6d ago against content hash 5df1e6cc5972, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

km-storage-abstraction scanned grade A with 0 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 6d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/km-storage-abstraction/SKILL.md · 188 lines

How it starts

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

Storage Abstraction Layer

Unified interface for saving notes across different storage backends


Storage Selection and Target-Root Contract

function get_storage_backend(options = {}) {
  config = Read("km-config.json") || {}
  if (options.explicit_backend) return options.explicit_backend
  if (options.project_scoped) return "local"
  return config?.storage?.primary || "local"
}

For project-scoped file saves, the workflow must pass target_root. The backend may choose a tool, but it must not choose or redirect the destination root.

Priority: user-explicit destination/backend → host-provided primary project/workspace root → configured backend only outside project-scoped requests.

🛑 Target Root 일치 규칙 (CRITICAL)

┌─────────────────────────────────────────────────────┐
│ 🛑 CRITICAL: target_root 보존 강제                   │
│                                                      │
│ Obsidian 도구는 연결 볼트와 target_root가 같을 때만!   │
│                                                      │
│ ❌ 잘못된 예:                                        │
│    - 연결 볼트 확인 없이 MCP로 상대경로 저장           │
│                                                      │
│ ✅ 올바른 예:                                        │
│    - roots 동일 → MCP / 다름·미확인 → target_root Write│
└─────────────────────────────────────────────────────┘

Backend Mapping (Antigravity/Gemini CLI)

Feature Obsidian Notion Local
Create mcp_obsidian_create_note mcp_notion_API-post-page write_to_file
Search mcp_obsidian_search_vault mcp_notion_API-post-search N/A
Read mcp_obsidian_read_note mcp_notion_API-get-block-children read_file
Path format Relative to vault Database/Page ID File system path
Wikilinks Supported Converted to mentions Supported

참고: Antigravity는 MCP 도구 이름에 싱글 언더스코어(_)를 사용합니다.

MCP 도구 사용 가이드 (Obsidian)

작업 도구명 설명
노트 생성 mcp_obsidian_create_note 새 노트 생성
노트 검색 mcp_obsidian_search_vault Vault 내 키워드 검색
노트 읽기 mcp_obsidian_read_note 노트 내용 읽기
노트 목록 mcp_obsidian_list_notes 폴더 내 노트 목록

Read the full file on GitHub · 188 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. 6d ago First seen · 188 lines · 20 tokens per session scan A 5df1e6cc5972

Subscribe to this mod's changes

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