跳到正文
FunCoding

搜索

搜索文档、Skill 和 MCP

session

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

AI 与智能体1.6ksynthadoc/skills/session/SKILL.md

安装

把这段话发给 Claude Code、Codex 或 Cursor。智能体会先检查安全性,你确认后才安装。

读取 https://funcoding.ai/skills/axoviq-ai/synthadoc/session/install.md ,按里面的步骤帮我安装这个 Skill。

SKILL.md

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())

相似的 Skill

brand-guidelines
anthropics/skills180k

brand-guidelines

Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.

AI 与智能体

internal-comms
anthropics/skills180k

internal-comms

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

AI 与智能体

template-skill
anthropics/skills180k

template-skill

Replace with description of the skill and when Claude should use it.

AI 与智能体

mcp-builder
anthropics/skills180k

mcp-builder

Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).

AI 与智能体

algorithmic-art
anthropics/skills180k

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

AI 与智能体

academy-guide
anthropics/skills180k

academy-guide

Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.

AI 与智能体