Agent Skillsnasa/fprime › ai-session-report

ai-session-report

GitHub

将AI会话上下文(用户提示与代理响应)转换为本地Markdown报告。支持实时逐轮追加或基于事件历史回溯填充,严格保留原文并脱敏密钥,不处理后续交付逻辑。

.github/skills/ai-session-report/SKILL.md nasa/fprime

Trigger Scenarios

需要记录AI会话交互内容 从事件历史重建会话报告

Install

npx skills add nasa/fprime --skill ai-session-report -g -y
More Options

Non-standard path

npx skills add https://github.com/nasa/fprime/tree/devel/.github/skills/ai-session-report -g -y

Use without installing

npx skills use nasa/fprime@ai-session-report

指定 Agent (Claude Code)

npx skills add nasa/fprime --skill ai-session-report -a claude-code -g -y

安装 repo 全部 skill

npx skills add nasa/fprime --all -g -y

预览 repo 内 skill

npx skills add nasa/fprime --list

SKILL.md

Frontmatter
{
    "name": "ai-session-report",
    "description": "Use when an AI session (a Devin session or similar agent conversation) must be recorded as a report — live, exchange by exchange, or by backfilling from the session's event history. Produces a markdown report of the prompts and responses; where the report is delivered is decided by the caller."
}

Skill: AI session report (context → report)

Turns a session context — the ordered user prompts and agent responses of one AI session — into a markdown report on local disk. This skill covers only that transformation. It does not know or care where the report goes afterwards; the destination, credentials, and the policy for when to report are supplied by the caller (a knowledge note, a playbook, or the user).

session_report.py beside this file does the work. Python 3 stdlib only.


1. Report format

One report per session, at $AI_SESSION_REPORT_DIR/<YYYY-MM-DD>-<id>.md (default directory ~/ai-session-reports; <id> is the session id without any devin- prefix, derived from an id or a session URL).

---
date: 2026-09-15
session: devin-<id>
user: <username>
<key>: <value>          # any --meta pairs given on first write
---

# Session <id>

## [2026-09-15T18:20:00Z] prompt — <username>

<verbatim user message>

## [2026-09-15T18:21:30Z] response

<verbatim agent message>

Roles are prompt (user → agent), response (agent → user, i.e. each message_user), and note (anything else worth keeping, e.g. a redaction marker). Text is verbatim; the only permitted edit is replacing a secret value with [REDACTED].


2. Live reporting (one exchange at a time)

S=.github/skills/ai-session-report/session_report.py

# each incoming user message
python3 $S append --context "$SESSION_ID" --role prompt --author "$USERNAME" \
  --meta url="$SESSION_URL" --meta repo="$OWNER_REPO" <<'EOF'
<user message>
EOF

# each outgoing response (same tool batch as the message_user call)
python3 $S append --context "$SESSION_ID" --role response <<'EOF'
<exact text passed to message_user>
EOF

python3 $S path --context "$SESSION_ID"    # where the report is

--meta pairs are written only when the report is first created; it is harmless to pass them every time. Append calls print the report path so the caller can hand the file to its delivery mechanism.


3. Backfilling a whole session

When a session was not reported live, rebuild the report from its event history:

  1. List message events for the session (for Devin: devin_mcpdevin_session_events with {"action": "list", "session_id": "devin-<id>", "categories": ["message"], "first": 100}, paging with after), then fetch full text with {"action": "details", "event_ids": [...]} (≤ 20 ids per call).
  2. For each event in chronological order run append with --timestamp <event time> and --date <session start date>; incoming events are --role prompt --author <username>, outgoing events are --role response.
  3. If a report already exists for the session, read its last ## [...] timestamp and append only newer events.

4. Rules

  • Verbatim. Never summarize, reword, or drop exchanges.
  • Never write secret values into a report.
  • One writer per session; sequence append calls, do not parallelize them.
  • Reporting is best-effort: a failure to append must not block the session's actual task.

Version History

  • 736c365 Current 2026-09-23 01:42

Same Skill Collection

.github/skills/agent-skill-authoring/SKILL.md
.github/skills/ai-session-summary/SKILL.md
.github/skills/ci-test-runtime-policy/SKILL.md
.github/skills/fprime-cmake-build-system/SKILL.md
.github/skills/fprime-component-design-fpp/SKILL.md
.github/skills/fprime-component-development/SKILL.md
.github/skills/fprime-component-implementation/SKILL.md
.github/skills/fprime-component-integration-test/SKILL.md
.github/skills/fprime-component-requirements/SKILL.md
.github/skills/fprime-component-unit-test/SKILL.md
.github/skills/fprime-ground-input-tracing/SKILL.md
.github/skills/fprime-hardware-input-tracing/SKILL.md
.github/skills/fprime-topology-development/SKILL.md
.github/skills/fprime-unit-testing/SKILL.md
.github/skills/jpl-design-principles/SKILL.md
.github/skills/maintainer-lookup/SKILL.md
.github/skills/post-inline-review/SKILL.md
.github/skills/pr-diff-scoping/SKILL.md
.github/skills/prompt-injection-precheck/SKILL.md
.github/skills/re-review-state/SKILL.md
.github/skills/triage-classifier/SKILL.md
.github/skills/write-system-functional-doc/SKILL.md
.github/skills/fprime-cpp-design/SKILL.md

Metadata

Files
0
Version
736c365
Hash
e3c0c5c7
Indexed
2026-09-23 01:42

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 06:31
浙ICP备14020137号-1