Skip to content
Agentmart
Submit a tool

session-pattern-archiver

Skill by humanerd-drew

IndexedMIT★ 3
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/humanerd-drew-session-pattern-archiver

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

The publisher has not written a description yet.

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions: not checked yet.

What's inside

Skill name
session-pattern-archiver
Description
None
License
MIT
Instructions
173 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Agent Skills spec issues

  • invalid YAML frontmatter: Unexpected block-seq-ind on same line with key at line 1, column 8:
  • name: missing
  • description: missing

Files (2)

  • SKILL.md
  • archiver.py · references/

SKILL.md (first lines)

# Session Pattern Archiver

Discord thread/대화가 종료되면 → Obsidian 판단 패턴 세션 노트로 자동 기록.

## 트리거

|| 유형 | 조건 | 우선순위 |
||------|------|----------|
|| **Auto (thread_close)** | Discord thread archived/locked → gateway event hook | highest |
|| **Auto (thread_delete)** | Discord thread deleted → gateway event hook | highest |
|| **Auto (inactivity)** | thread 2시간 미활동 → cron (c7041bc0a7b9) | 높음 |
|| **Manual** | `/sync-obsidian` 명령 | 항상 가능 |

## 출력 노트 형식

생성 위치: `MEMORY/sessions/YYYY-MM/YYYY-MM-DD_project-title.md`

```markdown
# Session: [Thread Title]
**Date**: YYYY-MM-DD
**Trigger**: thread_close | thread_delete | inactivity | manual
**Participants**: @user1, @user2

## 🎯 의도 (Humanerd's Intent)
[이 작업을 왜 시작했는가 — Humanerd의 목적]

## 🧠 사고방식 (Reasoning Pattern)
[문제를 어떻게 풀어가려 했는가]
[왜 이 방법을 선택했는가]

## ⚖️ 가치 판단 (Value Judgments)
[이 상황에서 무엇을 우선시했는가]
[이것은重要하고 저것은 덜 중요하다 — 왜?]

## 👁️ 맹점 (Blind Spots)
[Humanerd가 자주 놓치는 것]
[에이전트가 대신 확인해줘야 할 것]
[과거 이 종류의 실수 기록]

## ✅ 결정 & 액션 (Decisions)
- **결정/액션 A** → 이유: ..., 다음: ...

## 🔗 관련 노트
`[[projects/X]]`, `[[skills/Y]]`, `[[sessions/prior-session]]`

## 📋 Follow-ups
- [ ] [todo by when - who]

## Meta
**Archived**: YYYY-MM-DD HH:MM
**Pattern completeness**: full | partial | inferred
```

## Clarify 질문 (비동기, Discord DM)

**inactivity / manual 트리거** → Clarify 전송 (이전 버전)
**2026-04-13 이후**: 모든 트리거에서 Clarify DM 비활성화 — "세션패턴 정리는 나에게 묻지 말고 알아서 하기" 지시 반영. 모든 archive는 즉시 Obsidian 노트 생성만 수행.
```
📝 세션 패턴 정리해드릴게요 — 30초만 답변주세요:

🎯 **의도**: 이 작업의目的是?
⚖️ **가치**: 무엇을優先했나요?
👁️ **맹점**: 놓치기 쉬운 것은?
```

24시간 무응답 → 부분 정보로 노트 생성 (completeness=inferred)

**thread_close / thread_delete 이벤트**에서는 Clarify 생략 — 즉시 아카이브 (사용자 지시: "세션패턴 정리는 나에게 묻지 말고 알아서 하기")

## Backlink 규칙

생성 후 projects/ 노트 업데이트:
- thread topic과 관련된 `[[projects/X]]` 검색
- 해당 프로젝트 노트 하단에 `## Sessions\n- [[sessions/YYYY-MM-DD_title]]` 추가
- 없으면 `[[projects/uncategorized]]`에 추가

## 사용법

```
/sync-obsidian                    # 현재 thread 수동 동기화
/sync-obsidian [thread_id]        # 특정 thread 동기화
/sync-obsidian --project=X        # 프로젝트별 세션 모두 동기화
```

## 파일 구조

```
MEMORY/
└── sessions/
    └── YYYY-MM/
        ├── YYYY-MM-DD_project-alpha.md   # 판단 패턴 노트
        └── YYYY-MM-DD_project-beta.md
```

## Phase 1: ✅ 완료
- `archiver.py` core engine (LLM pattern inference, note generation, project linker)
- `MEMORY/sessions/YYYY-MM/` 자동 생성
- Cron job: every 2h (job_id: c7041bc0a7b9)

## Phase 2: ✅ 완료
- Discord webhook 전송 (User-Agent 헤더로 Cloudflare 우회)
- Clarify embed 자동 발송
- Thread state tracker (`discord_threads.json`)
- `python3 archiver.py clarify` CLI
- `python3 archiver.py archive` with webhook support

## Phase 3: ✅ 완료
- Discord thread close/delete event hook → `gateway/platforms/discord.py` on_thread_update / on_thread_delete에서 archiver subprocess 호출
- `archiver.py archive-thread-event` subcommand (ask_clarify=False, auto-archive)
- Thread 메시지 Discord API 직접 fetch (`_fetch_thread_messages`)
- projects/ backlink 자동 업데이트 (sessions/index.md 연동)

## Phase 4: ✅ 완료 — 증분 아카이빙 (Incremental Archiver)

### 문제
이전 방식: 스레드 종료 시 **一次性** (one-shot) 전체 메시지 fetch + Abstract 생성.
문제: 스레드 종료 시 fetch가 수십 개의 메시지를 한꺼번에 처리하면서 사용자에게 메시지 수십 개를 보냄.

From humanerd-drew/opencode-drewgent, MIT.

More from humanerd-drew/opencode-drewgent

Signals

Stars
3
Forks
8
Open issues
0
Last commit (this folder)
Jul 15, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from humanerd-drew

Cite this page

session-pattern-archiver skill. Agent Mart. https://agentmart.dev/skills/humanerd-drew-session-pattern-archiver (last updated 2026-10-24)