跳到正文
cccskills
免费在 GitHub 公开

session

Extract conversation turns from AI session history files (.jsonl)

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md3.5 KB
  • __init__.py0 B
  • scripts/__init__.py0 B
  • scripts/main.py7.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Session Skill

Extracts human-readable conversation turns from AI coding session history files (.jsonl). Supports two formats:

  • Claude Code — the JSONL format written by Anthropic's Claude Code CLI (~/.claude/projects/<hash>/<session-id>.jsonl)
  • Codex / Cursor — the simpler {"role": ..., "content": ...} per-line format used by OpenAI Codex and Cursor IDE sessions

Format is detected automatically from the first parseable line.

What gets extracted

Only substantive conversation turns are kept:

Content typeAction
User text messagesKept if ≥ 3 words
Assistant text responsesKept if ≥ 20 words
Assistant thinking blocksSkipped (internal reasoning, not final output)
Tool use / tool result blocksSkipped (avoids leaking file contents or credentials)
Image / attachment blocksSkipped
Sub-agent scaffolding (isSidechain: true)Skipped (internal sub-agent turns)
Session metadata linesSkipped (permission-mode, file-history-snapshot, system, last-prompt)

The extracted text is then passed through Synthadoc's standard pre-LLM source sanitizer (zero-width characters, bidi overrides, HTML comments, hidden CSS spans, base64 blobs, instruction-override phrases), exactly like PDF, DOCX, URL, and every other source type.

Output format

Each turn is labelled [USER] or [ASSISTANT] and separated by ---:

[USER]
How do I implement a sliding window algorithm?

---

[ASSISTANT]
A sliding window algorithm maintains a contiguous subarray (the "window") …

suggested_slug

The skill returns a suggested_slug in metadata derived from the session file's modification time and the first substantive user message:

session-2026-07-15-how-do-i-implement-a-sliding

Large sessions — chunking

Sessions longer than 30 substantive turns are split into 30-turn chunks. Each chunk is labelled with a ## Part N of M header so the downstream LLM can process sections independently. The metadata dict includes chunk_total when chunking occurs; single-chunk sessions (≤ 30 turns) are unchanged.

Limitations

  • Tool output excluded — tool result blocks (shell output, file reads, etc.) are stripped. This is intentional: it avoids leaking file contents and credentials into the wiki.
  • Format auto-detection — detection inspects the first 30 parseable lines. Corrupt or empty files produce an empty ExtractedContent.
  • No deduplication across ingest runs — re-ingesting the same session file creates or updates the same wiki page (standard ingest dedup applies via source hash).

When this skill is used

  • Source path ends with .jsonl
  • Intent phrases: "claude session", "codex session", "cursor session", "ai session", "session history"

Standalone usage

import asyncio
from synthadoc.skills.session.scripts.main import SessionSkill

skill = SessionSkill()

async def main():
    result = await skill.extract("/path/to/session.jsonl")
    print(result.text)       # [USER]\n...\n\n---\n\n[ASSISTANT]\n...
    print(result.metadata)   # {"format": "claude_code", "turn_count": 42, "suggested_slug": "..."}

asyncio.run(main())

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

docx

免费

Extract text from Microsoft Word documents

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

image

免费

Extract text from images using a vision LLM

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

markdown

免费

Ingest Markdown and plain text files

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

pdf

免费

Extract text from PDF documents

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

pptx

免费

Extract text from Microsoft PowerPoint presentations

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

url

免费

Fetch and extract text from web URLs

中文简介正在准备中。当前显示原文说明。

axoviq-ai/synthadoc15932026年10月20日 更新

查看 axoviq-ai 的全部技能

报告此技能的问题