# Soia pkm log agent sessions

> Soia pkm log agent sessions is an open-source agent skill for developer tools. Logs minimal vault change snapshots when AI coding sessions end, deduplicated. It is available on Claude Code and Codex.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex
- **Website:** https://github.com/soia-team/soia-open-pkm-vault-skills/tree/main/skills/soia-pkm-log-agent-sessions
- **Repository:** https://github.com/soia-team/soia-open-pkm-vault-skills
- **GitHub stars:** 5
- **License:** MIT
- **Skill name:** soia-pkm-log-agent-sessions
- **Collection:** https://github.com/soia-team/soia-open-pkm-vault-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-03

## About

This skill hooks a local AI coding agent such as Claude Code or Codex into a session-end event so that each session writes a small snapshot of vault changes to a log folder inside the vault. It records timestamps, the agent name, change counts and per-folder statistics rather than full prompts, transcripts or diffs, and it does not commit, push or run git add on the user's behalf.

Setup previews the configuration fragment, asks for consent, backs up the existing settings file, and merges the new hook without dropping an existing Codex notify entry. A dry-run mode lets the user check the result before real writes. Repeated edits to the same file produce new snapshots, while unchanged state is reported as deduplicated using a diff and untracked-file hash. Duplicate state is stored in the user's XDG state directory rather than in the repository's git folder.

The skill expects Python 3, Git and a POSIX bash shell, plus a vault path, an agent name and a target log subfolder. Uninstalling restores the original hook or notify entries, and old log cleanup only previews counts and sizes without deleting anything.

## When your agent uses it

> 为 Claude Code、Codex 等本地 AI 接入最小化 vault 会话改动快照，支持去重、dry-run、既有 notify 合并和安全卸载。触发：「接入 AI 会话日志」「记录 Codex 改动」「配置 SessionEnd 日志」

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Runs shell and Python scripts](https://github.com/soia-team/soia-open-pkm-vault-skills/tree/HEAD/skills/soia-pkm-log-agent-sessions)
- [No network calls found in its scripts](https://github.com/soia-team/soia-open-pkm-vault-skills/tree/HEAD/skills/soia-pkm-log-agent-sessions)
- [License: MIT](https://github.com/soia-team/soia-open-pkm-vault-skills/tree/HEAD/skills/soia-pkm-log-agent-sessions)

## Features

- **Session-end change snapshots:** Writes a small log entry with timestamp, agent name and change counts when a session finishes.
- **Deduplicated writes:** Detects unchanged state with a diff and untracked-file hash so repeated events are skipped.
- **Safe settings merge:** Backs up Claude Code or Codex configuration and merges the hook while keeping existing notify entries.
- **Dry-run validation:** Lets the user preview snapshot output before any real change is written to the vault.
- **Clean uninstall:** Removes the added hook and restores the original configuration entries.

## Good for

- Log a snapshot of vault edits every time a Claude Code session ends
- Record Codex changes to the vault in a daily agent work log
- Set up a SessionEnd hook without overwriting an existing notify setting
- Check whether a session produced new changes or was deduplicated
- Remove the session logging hook and confirm the original settings are intact

## Install

### Claude Code

This skill ships in the `soia-pkm-vault` plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

```sh
/plugin marketplace add soia-team/soia-open-skills
/plugin install soia-pkm-vault@soia
```

Or copy only this skill to `~/.claude/skills/soia-pkm-log-agent-sessions`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/soia-team/soia-open-pkm-vault-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/soia-pkm-log-agent-sessions &&
cp -R "$tmp/skills/soia-pkm-log-agent-sessions" ~/.claude/skills/soia-pkm-log-agent-sessions &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/soia-pkm-log-agent-sessions` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/soia-pkm-log-agent-sessions` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/soia-team/soia-open-pkm-vault-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/soia-pkm-log-agent-sessions &&
cp -R "$tmp/skills/soia-pkm-log-agent-sessions" ~/.agents/skills/soia-pkm-log-agent-sessions &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/soia-pkm-log-agent-sessions` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/soia-pkm-log-agent-sessions` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/soia-team/soia-open-pkm-vault-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/soia-pkm-log-agent-sessions &&
cp -R "$tmp/skills/soia-pkm-log-agent-sessions" ~/.cursor/skills/soia-pkm-log-agent-sessions &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/soia-pkm-log-agent-sessions` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/soia-team/soia-open-pkm-vault-skills.git --path skills/soia-pkm-log-agent-sessions
```

Or copy the folder to `~/.gemini/skills/soia-pkm-log-agent-sessions` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/soia-pkm-log-agent-sessions`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/soia-team/soia-open-pkm-vault-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/soia-pkm-log-agent-sessions &&
cp -R "$tmp/skills/soia-pkm-log-agent-sessions" ~/.copilot/skills/soia-pkm-log-agent-sessions &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/soia-pkm-log-agent-sessions` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/soia-team/soia-open-pkm-vault-skills.git
```

Then copy `soia-open-pkm-vault-skills/skills/soia-pkm-log-agent-sessions` into your agent's skills folder as `soia-pkm-log-agent-sessions`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What does the skill need to run?

Python 3, Git and a POSIX bash shell, plus a vault path, an agent name and a target log subfolder inside the vault.

### Does Soia pkm log agent sessions store full conversations or diffs?

No. Logs contain timestamps, the agent name, change counts and partition statistics; file paths are only recorded when the include-paths option is explicitly set.

### Will Soia pkm log agent sessions change my existing AI tool configuration?

It shows the configuration fragment first, asks for consent, and backs up the file before merging. Existing hooks and notify entries are preserved.

### Where is the deduplication state kept?

In the XDG state directory under the skill's name, and it works with git worktrees without writing to the .git folder.

### How do I install Soia pkm log agent sessions in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/soia-pkm-log-agent-sessions to use it in all your projects, or to .claude/skills/soia-pkm-log-agent-sessions in one project. Or install the soia-pkm-vault plugin, which includes it: /plugin marketplace add soia-team/soia-open-skills, then /plugin install soia-pkm-vault@soia.

### Does Soia pkm log agent sessions run scripts?

Yes. It runs shell and Python scripts. No network calls were found in its scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Soia pkm log agent sessions?

Claude Code and Codex. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Soia pkm log agent sessions?

The closest alternatives to Soia pkm log agent sessions are Note, Session hardening, Close session, Nemo rl session memory and Scan sessions and learn.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [Note](https://ai-powered.com/skills/note): Note is an open-source agent skill for developer tools.
- [Session hardening](https://ai-powered.com/skills/session-hardening): Session hardening is an open-source agent skill for developer tools.
- [Close session](https://ai-powered.com/skills/close-session): Close session is an open-source agent skill for knowledge and memory.
- [Nemo rl session memory](https://ai-powered.com/skills/nemo-rl-session-memory): Nemo rl session memory is an open-source agent skill for knowledge and memory.
- [Scan sessions and learn](https://ai-powered.com/skills/scan-sessions-and-learn): Scan sessions and learn is an open-source agent skill for developer tools.
- [System audit](https://ai-powered.com/skills/system-audit): System audit is an open-source agent skill for developer tools.
- [Safe execution edho ferdian](https://ai-powered.com/skills/safe-execution-edho-ferdian): Safe execution edho ferdian is an open-source agent skill for developer tools.
- [Agent insights](https://ai-powered.com/skills/agent-insights): Agent insights is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/soia-pkm-log-agent-sessions
