azrijamil

ForesigxtMemory

AI 智慧體v1.0.0
作者:azrijamil更新於 2026-05-11fsxmemory@clawhub_azrijamil/fsxmemory
上下文管理記憶增強工具呼叫#Memory System

據 AlphaMoat 統計,截至 2026-09,ForesigxtMemory 累計下載 2,685 次、獲 1 個星標,在全部 5,078 個 AI 技能中排名第 3,959 位,在「AI 智慧體」分類(969 個)中排名第 792 位。

累計安裝
146
累計下載
2685
星標
1
全站排名
#3,959
全站前 78% · 「AI 智慧體」前 82%
平台累計安裝累計下載星標評論
ClawHub ↗8326111-
SkillHub ↗14626851—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

記憶庫可能包含敏感的個人、專案或關係資訊;共享或語義搜尋前需確認資料範圍及是否會傳送至外部服務。遷移和自動連結會修改 Markdown 檔案,執行前先 dry-run 並備份,確保可回滾。 文件中的兩種搜尋命令均需 qmd;應先核對 CLI 安裝來源和 vault 位置。

資料釋出於 2026-10-29

可以用來做什麼

  • 初始化或指定本地記憶庫
  • 記錄決策、經驗、承諾或專案上下文
  • 透過檢查點儲存進展並在會話恢復時讀取狀態
  • 在評估和備份後遷移已有 Markdown vault

什麼時候用

  • 需要跨會話儲存本地結構化上下文時
  • 能夠將記憶庫限定在適當範圍並審查敏感資料時
  • 執行遷移或自動連結前可先 dry-run 並保留備份時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

為本地專案記憶庫設計檢查點與恢復流程,並指出敏感資料範圍、外部搜尋服務和遷移備份檢查;不要執行命令。

月度資料趨勢

累計下載2685
1641220227622026-03 · 累計下載 17182026-05 · 累計下載 20682026-06 · 累計下載 21792026-07 · 累計下載 23792026-08 · 累計下載 24912026-09 · 累計下載 268526-0326-09
星標1
0122026-03 · 星標 12026-05 · 星標 12026-06 · 星標 12026-07 · 星標 12026-08 · 星標 12026-09 · 星標 126-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-092685—1
2026-082491+4.7%1
2026-072379+9.2%1
2026-062179+5.4%1
2026-052068—1
2026-031718—1

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

10 KB · ClawHub v1.0.0
---
name: fsxmemory
version: 1.3.1
description: Structured memory system for AI agents. Context death resilience (checkpoint/recover), structured storage, Obsidian-compatible markdown, and local semantic search.
author: Foresigxt
repository: https://github.com/Foresigxt/foresigxt-cli-memory
---

# Foresigxt Memory
展開全部(共 345 行)
Structured memory system for AI agents.

## Install

```bash
npm install -g @foresigxt/foresigxt-cli-memory
```

## Setup

### Option 1: Initialize New Vault

```bash
# Initialize vault (creates folder structure + templates)
fsxmemory init ~/memory
```

### Option 2: Use Existing Vault

**For isolated workspace memory** (each workspace has its own vault):

```bash
# Create .env in workspace root
echo 'FSXMEMORY_PATH=/path/to/workspace/memory' > .env

# All agents in THIS workspace use this isolated vault
fsxmemory stats  # Works automatically!
```

**For shared memory across all workspaces**:

```bash
# Set global environment variable (in ~/.bashrc or ~/.zshrc)
export FSXMEMORY_PATH=/path/to/shared/memory

# All agents in ALL workspaces share the same vault
```

**Or**: Use `--vault` flag for one-time override:

```bash
fsxmemory stats --vault /path/to/other/vault
```

## Core Commands

### Store memories by type

```bash
# Types: fact, feeling, decision, lesson, commitment, preference, relationship, project, procedural, semantic, episodic
fsxmemory remember decision "Use Postgres over SQLite" --content "Need concurrent writes for multi-agent setup"
fsxmemory remember lesson "Context death is survivable" --content "Checkpoint before heavy work"
fsxmemory remember relationship "Justin Dukes" --content "Client contact at Hale Pet Door"
fsxmemory remember procedural "Deploy to Production" --content "1. Run tests 2. Build 3. Deploy"
fsxmemory remember semantic "Event Loop Concept" --content "JavaScript's concurrency model..."
fsxmemory remember episodic "First Production Deploy" --content "Deployed v2.0 today, team was nervous but it went well"
```

### Quick capture to inbox

```bash
fsxmemory capture "TODO: Review PR tomorrow"
```

### Search (requires qmd installed)

```bash
# Keyword search (fast)
fsxmemory search "client contacts"

# Semantic search (slower, more accurate)
fsxmemory vsearch "what did we decide about the database"
```

## Context Death Resilience

### Checkpoint (save state frequently)

```bash
fsxmemory checkpoint --working-on "PR review" --focus "type guards" --blocked "waiting for CI"
```

### Recover (check on wake)

```bash
fsxmemory recover --clear
# Shows: death time, last checkpoint, recent handoff
```

### Handoff (before session end)

```bash
fsxmemory handoff \
  --working-on "Foresigxt Memory improvements" \
  --blocked "npm token" \
  --next "publish to npm, create skill" \
  --feeling "productive"
```

### Recap (bootstrap new session)

```bash
fsxmemory recap
# Shows: recent handoffs, active projects, pending commitments, lessons
```

## Migration from Other Formats

Migrate existing vaults from OpenClaw, Obsidian, or other markdown-based systems:

### Analyze First (Dry Run)

```bash
# See what would be changed without modifying files
fsxmemory migrate --from openclaw --vault /path/to/vault --dry-run
```

### Migrate with Backup

```bash
# Recommended: Creates automatic backup before migration
fsxmemory migrate --from openclaw --vault /path/to/vault --backup

# The migration:
# ✅ Adds YAML frontmatter to all markdown files
# ✅ Renames directories (procedural→procedures, semantic→knowledge, episodic→episodes)
# ✅ Creates .fsxmemory.json config file
# ✅ Preserves all content and custom categories
# ✅ Creates timestamped backup for rollback
```

### Rollback if Needed

```bash
# Restore from backup if something went wrong
fsxmemory migrate --rollback --vault /path/to/vault
```

### Migration Options

```bash
# Available source formats
--from openclaw      # OpenClaw vault format
--from obsidian      # Obsidian vault format
--from generic       # Generic markdown vault

# Migration flags
--dry-run           # Preview changes without modifying files
--backup            # Create backup before migration (recommended)
--force             # Skip confirmation prompts
--verbose           # Show detailed progress
--rollback          # Restore from last backup
```

### Example: Migrate OpenClaw Vault

```bash
# 1. Analyze first
fsxmemory migrate --from openclaw --vault ~/.openclaw/workspace/memory --dry-run

# 2. Run migration with backup
fsxmemory migrate --from openclaw --vault ~/.openclaw/workspace/memory --backup --verbose

# 3. Verify migration worked
fsxmemory stats --vault ~/.openclaw/workspace/memory
fsxmemory doctor --vault ~/.openclaw/workspace/memory
```

**Migration Speed**: ~53 files in 0.07 seconds ⚡

## Auto-linking

Wiki-link entity mentions in markdown files:

```bash
# Link all files
fsxmemory link --all

# Link single file
fsxmemory link memory/2024-01-15.md
```

## Templates Reference

Foresigxt Memory includes structured templates for consistent documentation. Location: `templates/` directory.

### Available Templates

| Template | Type | Use For | Sections |
|----------|------|---------|----------|
| `decision.md` | decision | Key choices, architecture decisions | Context, Options, Decision, Outcome |
| `procedure.md` | procedural | How-to guides, workflows, SOPs | Purpose, Prerequisites, Steps, Pitfalls, Verification |
| `knowledge.md` | semantic | Concepts, definitions, mental models | Definition, Key Concepts, Examples, Why It Matters |
| `episode.md` | episodic | Events, experiences, meetings | What Happened, Context, Key Moments, Reflection |
| `person.md` | person | Contacts, relationships | Contact, Role, Working With, Interactions |
| `project.md` | project | Active work, initiatives | Goal, Status, Next Actions, Blockers |
| `lesson.md` | lesson | Insights, patterns learned | Situation, Lesson, Application |
| `handoff.md` | handoff | Session continuity | Working On, Context, Next Steps, Blockers |
| `daily.md` | daily | Daily notes, journal | Focus, Done, Notes |

### Template Usage

Templates are automatically selected by memory type:

```bash
fsxmemory remember decision "Title" --content "..."    # → templates/decision.md
fsxmemory remember procedural "Title" --content "..."  # → templates/procedure.md
fsxmemory remember semantic "Title" --content "..."    # → templates/knowledge.md
fsxmemory remember episodic "Title" --content "..."    # → templates/episode.md
fsxmemory remember relationship "Name" --content "..." # → templates/person.md
fsxmemory remember lesson "Title" --content "..."      # → templates/lesson.md
```

**To view template structure**: Read the template file in `templates/` directory before creating a memory document.

**Template features**:
- YAML frontmatter with metadata (title, date, type, status)
- Structured sections with placeholder guidance
- Wiki-link suggestions for connections
- Auto-generated tags

## Folder Structure

```
vault/
├── .fsxmemory/           # Internal state
│   ├── last-checkpoint.json
│   └── dirty-death.flag
├── decisions/            # Key choices with reasoning
├── lessons/              # Insights and patterns
├── people/               # One file per person
├── projects/             # Active work tracking
├── procedures/           # How-to guides and workflows
├── knowledge/            # Concepts and definitions
├── episodes/             # Personal experiences
├── handoffs/             # Session continuity
├── inbox/                # Quick captures
└── templates/            # Document templates (9 types)
```

## Best Practices

1. **Checkpoint every 10-15 min** during heavy work
2. **Handoff before session end** — future you will thank you
3. **Recover on wake** — check if last session died
4. **Use types** — knowing WHAT you're storing helps WHERE to put it
5. **Wiki-link liberally** — `[[person-name]]` builds your knowledge graph

## Integration with qmd

Foresigxt Memory uses [qmd](https://github.com/tobi/qmd) for search:

```bash
# Install qmd
bun install -g github:tobi/qmd

# Add vault as collection
qmd collection add /path/to/vault --name my-memory --mask "**/*.md"

# Update index
qmd update && qmd embed
```

## Configuration

Foresigxt Memory supports three ways to set the vault path (in order of precedence):

### 1. Command-line flag (highest priority)
```bash
fsxmemory stats --vault /path/to/vault
```

### 2. Environment variable
```bash
export FSXMEMORY_PATH=/path/to/memory
fsxmemory stats
```

### 3. .env file (for workspace-isolated memory)
```bash
# Create .env in workspace root
cat > .env << 'EOF'
FSXMEMORY_PATH=/home/user/.openclaw/workspace/memory
EOF

# All fsxmemory commands in this workspace use this isolated vault
fsxmemory stats
fsxmemory checkpoint --working-on "task"
```

**Use .env when:**
- ✅ **Isolating workspace memory** — Each project has its own separate vault
- ✅ **Per-project configuration** — Different agents in different workspaces use different vaults
- ✅ **Portable** — Workspace agents automatically use the right vault
- ✅ **Git-safe** — Add `.env` to `.gitignore` to protect paths

**Use global export when:**
- ✅ **Sharing memory across workspaces** — All agents everywhere use one vault
- ✅ **Centralized knowledge** — One source of truth for all projects

**Environment Variables:**
- `FSXMEMORY_PATH` — Vault path (can be set in shell or `.env` file)

## Publishing Skill Package

To create a distributable skill package (includes SKILL.md and templates/):

```bash
# Package the skill
npm run package-skill

# Output: dist-skill/fsxmemory-skill.zip (~8KB)
```

**Package contents:**
- `SKILL.md` - Complete documentation and reference
- `templates/` - All 9 memory templates
- `.env.example` - Configuration template
- `INSTALL.md` - Quick setup guide

**Distribution:**
Share the `fsxmemory-skill.zip` file with other agents/teams. They can extract it to get:
- Complete skill documentation
- Ready-to-use templates
- Configuration examples

**For OpenClaw/ClaudeHub:**
The packaged skill is ready for upload to skill repositories.

## Links

- npm: https://www.npmjs.com/package/@foresigxt/foresigxt-cli-memory
- GitHub: https://github.com/Foresigxt/foresigxt-cli-memory
- Issues: https://github.com/Foresigxt/foresigxt-cli-memory/issues

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。