Conversation
Adapter for the auto-capture skill that adds automatic session-end thought capture via Claude Code hooks. Includes session-end-capture.mjs reference implementation with transcript parsing, skip heuristics, retry queue, and REST ingest integration. Depends on: skills/auto-capture (requires_skills declared in metadata.json) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add blank lines around headings (MD022), fenced code blocks (MD031), and between adjacent blockquotes (MD028). Fix broken link fragment (MD051) and remove extra blank line (MD012). No content changes. These errors were blocking CI on all open PRs since the lint check runs repo-wide. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53f0823ab0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const SCRIPT_DIR = path.dirname(new URL(import.meta.url).pathname.replace(/^\/([A-Z]:)/, "$1")); | ||
| const PROJECT_ROOT = path.resolve(SCRIPT_DIR, "../.."); | ||
| const ENV_PATH = path.join(PROJECT_ROOT, ".env.local"); |
There was a problem hiding this comment.
Resolve runtime paths from session cwd
PROJECT_ROOT is computed from the hook script’s install location, not from the active Claude session. Because the README flow installs this script into an arbitrary shared scripts directory, .env.local, logs, and retry files are looked up/written in the wrong tree, so project-local captures frequently fail with error:missing_env or mix state across projects. Derive paths from the hook input cwd (or an explicit env override) instead of SCRIPT_DIR.
Useful? React with 👍 / 👎.
| // 6. Format transcript and build summary | ||
| const formattedText = formatTranscript(parsed, projectName); | ||
| const sessionSummary = buildSessionSummary(parsed, projectName); |
There was a problem hiding this comment.
Add restricted-content gate before ingest
After parsing, the flow only checks MIN_USER_TURNS and then immediately prepares content for upload; there is no restricted-content/sensitivity filter before posting. That means sessions containing secrets or sensitive text are still sent to the ingest endpoint, despite this adapter’s documented behavior to skip restricted sessions. A sensitivity check should run before formatting/posting payloads.
Useful? React with 👍 / 👎.
| const sessionSummary = buildSessionSummary(parsed, projectName); | ||
| const importKey = buildImportKey(parsed.sessionId, formattedText); |
There was a problem hiding this comment.
Send the computed session summary entry
sessionSummary is calculated but never used, and only the full transcript payload is posted. As a result, the advertised separate session-summary journal capture never happens, so consumers expecting both artifacts lose that summary signal. Either submit a second capture request for sessionSummary or include it in the ingest payload contract.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…n summary Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
skills/auto-capture/skillStophook systemsession-end-capture.mjsreference implementation with:SKILL.mddocuments the behavioral protocol and installation stepsmetadata.jsondeclaresrequires_skills: ["auto-capture"]Dependencies
skills/auto-capture/(exists in repo) — base skill this adapter extendsGate compliance
Test plan