Skip to content
Back to skills

Ai Ltm

ASecurity

過去の学び・失敗・意思決定・中断点を横断検索し、確定した知見を長期記憶へ記録する。セッション開始・再開、過去の経緯の参照、知見の確定、終了時の要約で自動利用する。短期の判断差分は /field-notes、感想は /ai-diary に分ける。ユーザーが /ai-ltm と入力したら使う。

  • 8 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 23, 2026
databasessqlapi

Works with

  • terminal
  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 23, 2026

npx -y skills add coil398/dotfiles --skill ai-ltm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ai Ltm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ai Ltm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/coil398-ai-ltm/badge)](https://www.skillsdirectory.com/skills/coil398-ai-ltm)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "ai-ltm"
description: >-
  過去の学び・失敗・意思決定・中断点を横断検索し、確定した知見を長期記憶へ記録する。セッション開始・再開、過去の経緯の参照、知見の確定、終了時の要約で自動利用する。短期の判断差分は /field-notes、感想は /ai-diary に分ける。ユーザーが /ai-ltm と入力したら使う。
---

# AI Long-Term Memory (ai-ltm)

`~/ai-ltm-data/memory.db` (SQLite) に、プロジェクト横断で再利用する学び・失敗・意思決定・中断点を蓄積する。

## 責任と読者

親が発動判断、query/summary、作業への反映、記録・同期の最終判断を持つ。直接実行する場合は、必要な script と reference だけをこの Skill の実体から読む。委任する場合は、親が実在確認した物理 path、対象範囲、起動権限、返却形式を worker に渡し、worker 自身に必要な資料を読ませる。

起動時の recall worker は bounded な recall だけを担当し、親の工程を再委任・再起動しない。worker は stage event と terminal record だけを返し、記録・embed・`mark-used`・同期を代行しない。利用できない非同期 API や未確認の path は本命を止める根拠にせず、未実行として返す。

## 自動発動とモード routing

承認済みの自動モードは毎回確認せず、条件に該当したモードだけを実行する。単なる進捗や毎回のツール成功では発動しない。

| 条件 | モード | 参照 |
|---|---|---|
| DB または repository の初回セットアップ、`setup-needed` の解消 | setup | [`references/setup.md`](references/setup.md) |
| セッション開始・長い中断からの再開 | bounded な非同期 recall | [`references/session-recall.md`](references/session-recall.md) |
| 前回の続き、過去の失敗、類似問題の参照 | 必要な範囲の search | [`references/search.md`](references/search.md) |
| 学び・失敗・意思決定・中断点の確定 | episode の record と embed | [`references/recording.md`](references/recording.md) |
| セッション終了・自然な会話終了・おやすみ・長く離れる旨 | summary、embed、同期 | [`references/session-close.md`](references/session-close.md) |
| 記憶の削除・修正・一覧・archive | 明示された management | [`references/maintenance.md`](references/maintenance.md) |
| cleanup の明示依頼 | 対話的な cleanup | [`references/cleanup.md`](references/cleanup.md) |

短期の判断差分は `/field-notes`、感想・日記は `/ai-diary` に分け、同じ内容を二重に記録しない。cleanup は自動発動しない。

## 共通の前提

親はロードした `SKILL.md` の実体パスの親を `SKILL_DIR` とし、そこから script と reference の絶対 path を確定する。検索は既存 DB を read-only で開き、`init.sql` をスキーマの SSOT として不足や不正を自動補完しない。書き込みは親が明示した範囲で行い、recall の terminal record を観測する前の insert、embed、`mark-used`、archive、同期は defer または skip する。

## 注意事項

- 記録は簡潔に。1つのepisodeのsummaryは1-2文に収める
- contextには再現に必要な情報を入れるが、コード全体のコピーは避ける
- 機密情報(パスワード、トークン、秘密鍵)は絶対に記録しない
- 検索は控えめに。毎回全検索するのではなく、関連しそうなときだけ引く
- SQLにユーザー入力を埋め込む際は、シングルクォートを `''` にエスケープする

Files in this skill

  • .gitignore104 B
  • README.md10.8 KB
  • SKILL.md3.6 KB
  • init.sql1.8 KB
  • references/cleanup.md1.2 KB
  • references/maintenance.md2.5 KB
  • references/recording.md2.3 KB
  • references/search.md2.8 KB
  • references/session-close.md2.8 KB
  • references/session-recall.md4.5 KB
  • references/setup.md2.1 KB
  • scripts/jev_bridge.py9.1 KB
  • scripts/merge_conflict.py12.3 KB
  • scripts/session_recall.py33.3 KB
  • scripts/sync_memory.py12.6 KB
  • scripts/vector_search.py28.8 KB
  • tests/test_jev_bridge.py12.4 KB
  • tests/test_session_recall.py30.5 KB
  • tests/test_sync_memory.py17.1 KB
  • tests/test_vector_search.py8.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…