Agent Skills › codeaholicguy/ai-devkit › session-compact

session-compact

GitHub

将历史AI编码会话压缩为结构化延续工件,提取关键状态、记忆候选和进度事实,支持Markdown或JSON格式输出,便于人工交接或自动化处理。

skills/session-compact/SKILL.md codeaholicguy/ai-devkit

Trigger Scenarios

上下文过长需要保留有用状态 工作需移交其他代理或恢复停滞任务 复杂实现或调试会话结束 需要从长运行中提取持久化记忆或进度事实

Install

npx skills add codeaholicguy/ai-devkit --skill session-compact -g -y
More Options

Use without installing

npx skills use codeaholicguy/ai-devkit@session-compact

指定 Agent (Claude Code)

npx skills add codeaholicguy/ai-devkit --skill session-compact -a claude-code -g -y

安装 repo 全部 skill

npx skills add codeaholicguy/ai-devkit --all -g -y

预览 repo 内 skill

npx skills add codeaholicguy/ai-devkit --list

SKILL.md

Frontmatter
{
    "name": "session-compact",
    "description": "AI DevKit · Compact a historical AI coding session with Jev when context is long, work is handed off or resumed, or durable continuation facts and memory candidates need extraction."
}

Session Compact

Use AI DevKit's Jev-backed CLI to create a structured continuation artifact from a historical session. Prefer this command over a hand-written compact when it is available.

When to Use

  • Context is getting long and useful state needs to survive compaction.
  • Work is being handed to another agent or resumed after becoming stale.
  • A complex implementation or debugging session is closing.
  • Durable memory candidates or task-progress facts need to be identified after a long run.

Workflow

  1. Find the session ID when it is not already known:
    npx ai-devkit@latest agent sessions --all
    
  2. Produce Markdown for a human handoff:
    npx ai-devkit@latest agent session compact --id <session-id>
    
  3. Use JSON for automation or structured inspection:
    npx ai-devkit@latest agent session compact --id <session-id> --format json
    
  4. Add --type <provider> when the same session ID is ambiguous across providers.
  5. Review the artifact before using its resume prompt, memory candidates, or validation claims. Compaction preserves selected transcript evidence; it does not independently verify that evidence.

Jev Availability

The command requires TYPESAFE_API_KEY. If it reports:

Jev is unavailable because TYPESAFE_API_KEY is not set.

report that result clearly and stop the compaction attempt. Do not silently replace it with hand-written summarization or imply that Jev classified the session. A user may explicitly request a separate manual summary afterward.

Never print, log, store, or pass the API key as a command argument. The CLI reads it from the environment.

Boundaries

  • The command is read-only and does not write memories or mutate tasks.
  • Treat memory candidates as proposals until they pass the memory skill's quality gate.
  • Record task progress separately when the task workflow requires it.
  • API, authentication, schema, or network failures with a configured key are errors, not Jev-unavailable results.

Version History

  • b10c0f6 Current 2026-09-27 16:11

Same Skill Collection

skills/agent-communication/SKILL.md
skills/agent-management/SKILL.md
skills/agent-orchestration/SKILL.md
skills/ai-devkit-setup/SKILL.md
skills/brainstorm/SKILL.md
skills/changelog/SKILL.md
skills/dev-commit/SKILL.md
skills/dev-design/SKILL.md
skills/dev-implementation/SKILL.md
skills/dev-lifecycle/SKILL.md
skills/dev-planning/SKILL.md
skills/dev-pr/SKILL.md
skills/dev-requirements/SKILL.md
skills/dev-review/SKILL.md
skills/dev-testing/SKILL.md
skills/dev-worktree/SKILL.md
skills/document-code/SKILL.md
skills/memory/SKILL.md
skills/refactor/SKILL.md
skills/remote-from-slack/SKILL.md
skills/remote-from-telegram/SKILL.md
skills/security-review/SKILL.md
skills/simplify-implementation/SKILL.md
skills/structured-debug/SKILL.md
skills/task/SKILL.md
skills/tdd/SKILL.md
skills/technical-writer/SKILL.md
skills/verify/SKILL.md

Metadata

Files
0
Version
b10c0f6
Hash
cd806be2
Indexed
2026-09-27 16:11

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-28 18:37
浙ICP备14020137号-1