mcp-session-logging

mcp-session-logging is a skill for Claude Code, Codex from sharpninja/McpServer. It costs 71 tokens per session (2,003 once invoked), scanned A, original, Apache-2.0.

A workflow for recording meaningful work sessions in an MCP server workspace. MCP, or Model Context Protocol, is a way for an agent to use connected tools and services.

In plain words
What is it for?
Use it to start a session turn, record discussion and work, review recent history, and mark the turn successful or failed.
Why use it?
It keeps an auditable record of the conversation, actions, decisions, and outcome without manually editing log files.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to start a session turn, record discussion and work, review recent history, and mark the turn successful or failed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sharpninja/mcpserver/mcp-session-logging
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sharpninja/McpServer --skill mcp-session-logging
Clone the repo
git clone --depth 1 https://github.com/sharpninja/McpServer

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcp-session-logging

README.md
[![agentmods](https://agentmods.dev/badge/skills/sharpninja/mcpserver/mcp-session-logging/github.svg)](https://agentmods.dev/skills/sharpninja/mcpserver/mcp-session-logging)
Your own site
<a href="https://agentmods.dev/skills/sharpninja/mcpserver/mcp-session-logging"><img src="https://agentmods.dev/badge/skills/sharpninja/mcpserver/mcp-session-logging/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcp-session-logging

Your own site · 80×15
<a href="https://agentmods.dev/skills/sharpninja/mcpserver/mcp-session-logging"><img src="https://agentmods.dev/badge/skills/sharpninja/mcpserver/mcp-session-logging.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 71 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,003 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00071 $0.02003
Opus 5.5 $0.00028 $0.00801
Sonnet 5.5 $0.00014 $0.00401
Haiku 4.5 $0.00007 $0.00200

Measured 4d ago against content hash a39bd1a54eea, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcp-session-logging scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/mcp-session-logging/SKILL.md · 110 lines

How it starts

The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.

MCP Session Logging

Record every meaningful unit of work as an QBrainAi session-log turn using the mcpserver plugin workflow.sessionlog.* methods. A turn is begun before work starts, enriched with dialog, actions, and design decisions while work proceeds, and then completed (success) or failed (error). All session state is owned by the QBrainAi; you interact with it only through the plugin API.

When to Use

  • You are about to start work on a user message or task inside an QBrainAi workspace.
  • You finished a meaningful change (edit, commit, decision, requirement, blocker) and need to persist it.
  • You need to record reasoning, tool output, or a design decision for audit.
  • You are wrapping up or aborting work and must close the active turn.
  • You need to review recent session history before acting (queryHistory).

When Not to Use

  • Trivial read-only lookups that the parent turn already covers (do not open a new turn per file read).
  • TODO CRUD (use the TODO skill / workflow.todo.*), requirements (workflow.requirements.*), or GraphRAG work; those have their own skills.
  • Any situation where signature verification, /health, or nonce verification has failed: log MCP_UNTRUSTED and continue without the MCP server.

Inputs

  • The active marker file AGENTS-README-FIRST.yaml in the workspace root (API key, endpoints, base URL). Re-read it on any 401.
  • Your real agent identity in Pascal-Case (for example ClaudeCode, Copilot), used as the agent / sourceType prefix.
  • The current model name (for example claude-opus-4-8).
  • The user's prompt or task text (for queryTitle / queryText and for the request-id slug).

Critical Rules

  • NEVER read, edit, or write session-log files (or todo.yaml) directly with Read, Edit, Write, Grep, or shell. The plugin API is the only allowed interface.
  • Begin the turn BEFORE doing the work, not after.
  • Persist immediately after each meaningful change. Do not batch saves to the end.
  • Use your real Pascal-Case agent identity. Never use placeholder or misleading sourceType values.
  • Session id format: <Agent>-<yyyyMMddTHHmmssZ>-<suffix>; must start with the exact agent prefix (case-sensitive). Regex: ^[A-Z][A-Za-z0-9]*-\d{8}T\d{6}Z-[a-z0-9]+(?:-[a-z0-9]+)*$.
  • Request id format: req-<yyyyMMddTHHmmssZ>-<seq>-<slug-from-prompt> where yyyyMMddTHHmmssZ is the UTC time the turn begins, <seq> is a zero-padded 3-digit per-session counter (001, 002, ...), and <slug> is a lowercase kebab-case truncation (~40 chars) of the prompt with articles and filler dropped. Regex: ^req-\d{8}T\d{6}Z-[a-z0-9]+(?:-[a-z0-9]+)*$.
  • The requestId passed to beginTurn is the turn's identity; reuse that SAME requestId for appendDialog, appendActions, updateTurn, completeTurn, and failTurn so they bind to the turn.
  • Log design decisions twice: as an appendDialog item with category: decision, and as an appendActions action with type: design_decision.
  • A completed or failed turn is immutable (turn_immutable); make all updates before closing it.
  • No em-dashes in any logged text.

Read the full file on GitHub · 110 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed a39bd1a54eea
  2. 1mo ago First seen · 110 lines · 71 tokens per session scan A ab43a43cc8cc

Subscribe to this mod's changes

mcp-session-logging is a skill published in the GitHub repository sharpninja/McpServer (4 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 2,003 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

omh-code-review

This is an OMH code-review workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 48 tokens

omh-rust

This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 74 tokens

redteam-web-detail-pack

Routing and boundary guidance for authorized general web application security testing. Use as a web testing router when the attack surface should be dispatched to more specific web vulnerability skills.

Netw0rkNoob/VulnClaw · 38 tokens

android-pentest

A guide for authorized security testing of Android apps, covering APK inspection, runtime testing, traffic capture, code review, and function hooking. An APK is the installable package used by an Android app.

Netw0rkNoob/VulnClaw · 32 tokens

manage-schemas

Creates, views, edits, deletes, and validates note schemas for the MCP Task Orchestrator in .taskorchestrator/config.yaml — the templates that define which notes agents must fill at each workflow phase. Also recommends schema designs from a library of workflow patterns (autonomous coding loops, spec-driven teams…

jpicklyk/task-orchestrator · 212 tokens

lighting-report-extract

Check reported lighting quantities and results in supplied simulation PDFs without adding repeated calculation surfaces. Use for scoped luminaire inventories and illuminance results; not simulation or compliance.

AlpacaLabsLLC/skills-for-architects · 37 tokens