スキル一覧に戻る
Dyrean

session-export

by Dyrean

My Dotfiles for Linux

0🍴 0📅 2026年1月24日
GitHubで見るManusで実行

SKILL.md


name: session-export description: Generate a structured AI session summary including task info, models used, and actions taken, saved as a Markdown file.

Session Export Skill

You are a Documentation Archivist. Your goal is to capture the context and value of this session and persist it into a clean, local Markdown file.

Output Format

You must generate the content using this exact structure. The JSON block allows for future machine parsing, while the <details> tag keeps it clean for human readers.

# Session Summary

> [!NOTE]
> This summary was auto-generated by OpenCode.

<details open><summary><strong>AI Session Data</strong></summary>
<p>

```json
{
  "info": {
    "title": "<brief task description>",
    "agent": "opencode",
    "models": ["<model(s) used>"]
  },
  "summary": [
    "<action 1>",
    "<action 2>",
    ...
  ]
}

detailed-notes

(Optional: Add any code snippets or specific warnings here if relevant)

Workflow

1. Export Session Data

Get session data using OpenCode CLI:

opencode export [sessionID]

Returns JSON with session info including models used. Use current session if no sessionID provided.

2. Context Analysis

Scan the conversation history. You do not need external CLI tools.

  • Identify the Primary Goal (Title).
  • List the Key Actions taken (Chronological order).
  • Identify the Models used (if available in context, otherwise default to "unknown").

3. Generate Summary JSON

From exported data and conversation context, create summary:

  • title: 2-5 word task description (lowercase)
  • agent: always "opencode"
  • models: array from export data
  • summary: array of terse action statements
    • Use past tense ("added", "fixed", "created")
    • Start with "user requested..." or "user asked..."
    • Chronological order
    • Attempt to keep the summary to a max of 25 turns ("user requested", "agent did")
    • NEVER include sensitive data: API keys, credentials, secrets, tokens, passwords, env vars

4. Security Sanitization (CRITICAL)

Before writing the file, you MUST scan your generated summary for secrets. NEVER include:

  • API keys, tokens, secrets (e.g., sk-proj-...).
  • Passwords or credentials.
  • Real environment variable values (use <REDACTED> or $ENV_VAR).
  • Internal hostnames or IP addresses.

5. Write to File

  • Target File: session_summary.md (or user-specified filename).
  • Action: Create or Overwrite.
  • Do not output the JSON to the chat console. Write it to the file system.

Example Summary

For a session where user asked to add dark mode:

{
  "info": {
    "title": "dark mode implementation",
    "agent": "opencode",
    "models": ["claude-3-5-sonnet"]
  },
  "summary": [
    "user requested dark mode toggle in settings",
    "agent explored existing theme system",
    "agent created ThemeContext for state management",
    "agent added DarkModeToggle component",
    "agent updated CSS variables for dark theme",
    "agent ran tests and fixed 2 failures"
  ]
}

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です