Communitygithub.com

ナレッジオペレーション

ローカルファイル、MCPメモリ、ベクターストア、Gitリポジトリなど、複数のストレージレイヤーを横断したナレッジベースの管理、取り込み、同期、検索を行います。ユーザーがナレッジシステムの保存、整理、同期、重複排除、検索を行いたい場合に使用します。

ナレッジオペレーション とは?

このスキルは、複数のストレージレイヤーにまたがる多層ナレッジシステムを管理するための包括的なフレームワークを提供します。ローカルファイル、Claude Codeメモリ、MCPメモリサーバーによる構造化ナレッジグラフ、Gitリポジトリ、Supabaseなどの外部データストアを統合し、情報の取り込み、整理、同期、重複排除、検索を実現します。主なユースケースとしては、会話履歴のナレッジベースへの同期、ワークスペース設定のミラーリング、GitHub/Linearのアクティブな実行状態の管理、異なるソース間でのナレッジ統合などがあります。各レイヤーには明確な責務が定義されており、情報の種類(ビジネス上の決定、ロードマップ、個人設定、参照情報など)に応じて適切な保存先を選択します。また、保存前の重複チェックや機密情報の編集、一貫した命名規則の適用などのベストプラクティスが組み込まれており、高品質なナレッジ運用を支援します。

対応✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/knowledge-ops

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

ナレッジオペレーション は何をしますか?

複数のストアを横断してナレッジを取り込み、整理、同期、取得するための多層ナレッジシステムを管理します。

ライブワークスペースモデルを優先します:

  • コード作業は実際のクローンしたリポジトリ内で行う
  • アクティブな実行コンテキストはGitHub、Linear、リポジトリローカルの作業コンテキストファイルに置く
  • より広範な人間向けのメモは、リポジトリ外のコンテキスト/アーカイブフォルダに保存できる
  • 永続的なマシン間コンテキストは、シャドウリポジトリワークスペースではなくナレッジベースに属する

アクティブ化のタイミング

  • ユーザーが情報をナレッジベースに保存したい場合
  • ドキュメント、会話、データを構造化ストレージに取り込む場合
  • システム間でナレッジを同期する場合(ローカルファイル、MCPメモリ、Supabase、Gitリポジトリ)
  • 既存のナレッジを重複排除または整理する場合
  • ユーザーが「これをKBに保存」「ナレッジを同期」「Xについて何を知っている?」「これを取り込んで」「ナレッジベースを更新して」などと発言した場合
  • 単純なメモリ想起を超えたナレッジ管理タスク全般

ナレッジアーキテクチャ

レイヤー1: アクティブな実行の真実

  • ソース: GitHubのIssue、PR、ディスカッション、リリースノート、LinearのIssue/プロジェクト/ドキュメント
  • 用途: 作業の現在の運用状態
  • ルール: アクティブなエンジニアリング計画、ロードマップ、ロールアウト、リリースに影響するものは、まずここに配置する

レイヤー2: Claude Codeメモリ(クイックアクセス)

  • パス: ~/.claude/projects/*/memory/
  • 形式: フロントマター付きMarkdownファイル
  • 種類: ユーザー設定、フィードバック、プロジェクトコンテキスト、リファレンス
  • 用途: セッションをまたいで持続するクイックアクセスコンテキスト
  • セッション開始時に自動読み込み

レイヤー3: MCPメモリサーバー(構造化ナレッジグラフ)

  • アクセス: MCPメモリツール(create_entities、create_relations、add_observations、search_nodes)
  • 用途: 保存された全メモリのセマンティック検索、関係マッピング
  • クエリ可能なグラフ構造によるセッション間の永続性

レイヤー4: ナレッジベースリポジトリ / 永続ドキュメントストア

  • 用途: キュレーションされた永続的なメモ、セッションエクスポート、合成された研究、オペレーターメモリ、長文ドキュメント
  • ルール: コンテンツがリポジトリ所有のコードでない場合、マシン間コンテキストのための推奨される永続ストア

レイヤー5: 外部データストア(Supabase、PostgreSQLなど)

  • 用途: 構造化データ、大規模ドキュメントストレージ、全文検索
  • 適しているケース: メモリファイルには大きすぎるドキュメント、SQLクエリを必要とするデータ

レイヤー6: ローカルコンテキスト/アーカイブフォルダ

  • 用途: 人間向けのメモ、アーカイブされたゲームプラン、ローカルメディア整理、一時的な非コードドキュメント
  • ルール: 情報保存のために書き込み可能だが、シャドウコードワークスペースではない
  • 使用禁止: 上流に配置すべきアクティブなコード変更やリポジトリの真実

取り込みワークフロー

新しいナレッジを取得する必要がある場合:

1. 分類

どの種類のナレッジか?

  • ビジネス上の決定 -> メモリファイル(プロジェクトタイプ)+ MCPメモリ
  • アクティブなロードマップ / リリース / 実装状態 -> まずGitHub + Linear
  • 個人設定 -> メモリファイル(ユーザー/フィードバックタイプ)
  • 参照情報 -> メモリファイル(リファレンスタイプ)+ MCPメモリ
  • 大規模ドキュメント -> 外部データストア + メモリ内の要約
  • 会話/セッション -> ナレッジベースリポジトリ + メモリ内の短い要約

2. 重複排除

このナレッジが既に存在するか確認:

  • メモリファイル内の既存エントリを検索
  • 関連する用語でMCPメモリをクエリ
  • 別のローカルメモを作成する前に、情報が既にGitHubやLinearに存在するか確認
  • 重複を作成しない。代わりに既存エントリを更新する。

3. 保存

適切なレイヤーに書き込む:

  • クイックアクセスのためにClaude Codeメモリを常に更新
  • セマンティック検索可能性と関係マッピングのためにMCPメモリを使用
  • 情報がライブプロジェクトの真実を変更する場合は、まずGitHub / Linearを更新
  • 永続的な長文追加のためにナレッジベースリポジトリにコミット

4. インデックス

関連するインデックスまたは要約ファイルを更新する。

同期オペレーション

会話同期

会話履歴を定期的にナレッジベースに同期:

  • ソース: Claudeセッションファイル、Codexセッション、その他のエージェントセッション
  • 宛先: ナレッジベースリポジトリ
  • クイックブラウジング用のセッションインデックスを生成
  • コミットしてプッシュ

ワークスペース状態同期

重要なワークスペース設定とスクリプトをナレッジベースにミラーリング:

  • ディレクトリマップを生成
  • コミット前に機密設定を編集
  • 経時的な変更を追跡
  • ナレッジベースやアーカイブフォルダをライブコードワークスペースとして扱わない

GitHub / Linear同期

情報がアクティブな実行に影響する場合:

  • 関連するGitHub Issue、PR、ディスカッション、リリースノート、ロードマップスレッドを更新
  • 永続的な計画コンテキストが必要な作業には、サポートドキュメントをLinearに添付
  • その後、ローカルメモを追加する価値がある場合のみミラーリングする

クロスソースナレッジ同期

複数のソースから一箇所にナレッジを集約:

  • Claude/ChatGPT/Grokの会話エクスポート
  • ブラウザブックマーク
  • GitHubアクティビティイベント
  • ステータス要約を書き込み、コミットしてプッシュ

メモリパターン

# 短期: 現在のセッションコンテキスト
セッション内タスク追跡にはTodoWriteを使用

# 中期: プロジェクトメモリファイル
セッション間の想起のために ~/.claude/projects/*/memory/ に書き込む

# 長期: GitHub / Linear / KB
アクティブな実行の真実はGitHub + Linearに配置
永続的な合成コンテキストはナレッジベースリポジトリに配置

# セマンティックレイヤー: MCPナレッジグラフ
永続的な構造化データには mcp__memory__create_entities を使用
関係マッピングには mcp__memory__create_relations を使用
既知のエンティティに関する新しい事実には mcp__memory__add_observations を使用
既存のナレッジを見つけるには mcp__memory__search_nodes を使用

ベストプラクティス

  • メモリファイルは簡潔に保つ。ファイルが際限なく大きくなるのを防ぐため、古いデータはアーカイブする。
  • すべてのナレッジファイルのメタデータにはフロントマター(YAML)を使用する。
  • 保存前に重複排除する。まず検索し、その後作成または更新する。
  • ファクトセットごとに正準な保存場所を1つに絞る。同じ計画の並列コピーをローカルメモ、リポジトリファイル、トラッカードキュメントに分散させない。
  • Gitにコミットする前に機密情報(APIキー、パスワード)を編集する。
  • ナレッジファイルには一貫した命名規則を使用する(小文字のケバブケース)。
  • エントリにはトピック/カテゴリでタグを付け、検索しやすくする。

品質ゲート

ナレッジ操作を完了する前に:

  • 重複エントリを作成していないこと
  • Gitで追跡されるファイルから機密データが編集されていること
  • インデックスと要約が更新されていること
  • データタイプに適したストレージレイヤーが選択されていること
  • 関連する相互参照が追加されていること

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル