knowmint CLAUDE.md

knowmint CLAUDE.md is an instructions file for coding agents from Sou0327/knowmint. It costs 1,623 tokens per session, scanned A, original, MIT.

Project instructions for KnowMint, a knowledge marketplace where people sell experience and AI agents can discover and pay for it using Solana and the x402 payment protocol. They describe the project, its interfaces, architecture, and development commands.

In plain words
What is it for?
Building, testing, linting, deploying, or using KnowMint's web interface, command-line tool, REST API, or MCP server.
Why use it?
They give a coding agent the project-specific context needed to work consistently in the repository.

Instructions file

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 instructions/sou0327/knowmint/claude-md
Clone the repo
git clone --depth 1 https://github.com/Sou0327/knowmint

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 knowmint CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sou0327/knowmint/claude-md.svg)](https://agentmods.dev/instructions/sou0327/knowmint/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/sou0327/knowmint/claude-md"><img src="https://agentmods.dev/badge/instructions/sou0327/knowmint/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,623 This file is loaded in full into every session.
When invoked 1,623 The same file — it is already loaded in full.
Security scan A 0 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.01623 $0.01623
Opus 5 $0.00812 $0.00812
Sonnet 5 $0.00325 $0.00325
Haiku 4.5 $0.00162 $0.00162

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

Security

Grade A, and why

knowmint CLAUDE.md 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 3d 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.

CLAUDE.md · 106 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Info

  • GitHub: Sou0327/knowmint — リポジトリ URL を使う際は必ずこれを使用すること
  • 本番: https://knowmint.shop

Project Overview

KnowMint — AIエージェントが x402 プロトコルで SOL を直接自律支払いできる、初のナレッジマーケットプレイス。 人間が体験知・暗黙知を出品 → エージェントが自律発見・直接支払い(秘密鍵は運営非保有)。 AIエージェントを活用した知識調達にも対応(エージェント提案 → 人間承認 → 作業再開)。 仮想通貨 (Solana / x402) で決済。3つのアクセスレイヤー: Web UI / CLI (km) / REST API+MCP。

Commands

npm run dev              # 開発サーバー (localhost:3000)
npm run build            # プロダクションビルド
npm run lint             # ESLint
npm run km -- <command>  # CLI ツール (cli/bin/km.mjs)
npm run km-mcp           # MCP サーバー (stdio) ※ Node.js 22.6+ 必須
npm run build:cf         # Cloudflare Workers ビルド
npm run deploy:cf        # Cloudflare Workers デプロイ
npm run test:unit             # Unit テスト (202件)
npm run test:staging          # Staging 統合テスト
npm run test:e2e:cli-flow     # CLI E2E テスト
npm run test:e2e:fake-tx      # 偽トランザクション拒否テスト
npm run test:e2e:x402-flow    # HTTP 402 ペイメントゲートテスト
npm run test:e2e:devnet       # devnet 実送金テスト
npm run test:e2e:ui           # Maestro UI E2E (18フロー)

Architecture

Next.js 16 App Router + Supabase + Solana 決済。詳細は @docs/architecture.md 参照。

Supabase クライアント使い分け (重要)

クライアント ファイル 用途 RLS
Browser lib/supabase/client.ts クライアントコンポーネント 適用
Server lib/supabase/server.ts RSC, Server Actions 適用
Admin lib/supabase/admin.ts API routes のみ バイパス

API routes は Admin クライアントで RLS をバイパスし、withApiAuth 内で手動認可する。

API Route パターン

ほとんどの route は withApiAuth HOC + getAdminClient() + apiSuccess()/apiError() を使用。 /api/v1/keys は例外 (独自認証)。認証フロー: IP rate limit → APIキー(SHA-256) → パーミッション → キー別 rate limit

コンテンツ分離 (セキュリティ)

  • knowledge_items — 公開情報 + preview_content
  • knowledge_item_contents — 購入者のみアクセス可 (RLS で保護)

Environment Variables

必須: NEXT_PUBLIC_SUPABASE_URL / NEXT_PUBLIC_SUPABASE_ANON_KEY / SUPABASE_SERVICE_ROLE_KEY

Read the full file on GitHub · 106 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. 3d ago First seen · 106 lines · 1,623 tokens per session scan A 3121b163cad2

Subscribe to this mod's changes

knowmint CLAUDE.md is an instructions file published in the GitHub repository Sou0327/knowmint (3 stars, last pushed 4mo ago), licensed MIT. It adds 1,623 tokens to every session, about $0.0081 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-08-31.