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.
npx skills add sharpninja/McpServer --skill mcp-session-logginggit clone --depth 1 https://github.com/sharpninja/McpServerWrote 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.
[](https://agentmods.dev/skills/sharpninja/mcpserver/mcp-session-logging)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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: logMCP_UNTRUSTEDand continue without the MCP server.
Inputs
- The active marker file
AGENTS-README-FIRST.yamlin 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 theagent/sourceTypeprefix. - The current model name (for example
claude-opus-4-8). - The user's prompt or task text (for
queryTitle/queryTextand 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
sourceTypevalues. - Session id format:
<Agent>-<yyyyMMddTHHmmssZ>-<suffix>; must start with the exactagentprefix (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>whereyyyyMMddTHHmmssZis 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
requestIdpassed tobeginTurnis the turn's identity; reuse that SAMErequestIdforappendDialog,appendActions,updateTurn,completeTurn, andfailTurnso they bind to the turn. - Log design decisions twice: as an
appendDialogitem withcategory: decision, and as anappendActionsaction withtype: design_decision. - A completed or failed turn is immutable (
turn_immutable); make all updates before closing it. - No em-dashes in any logged text.
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.
- 4d ago Changed a39bd1a54eea
- 1mo ago First seen · 110 lines · 71 tokens per session scan A ab43a43cc8cc
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.
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).
omh-rust
This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).
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.
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.
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…
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.