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 agentmods add skills/sharpninja/mcpserver/mcp-session-loggingnpx skills add sharpninja/McpServer --skill mcp-session-logginggit clone --depth 1 https://github.com/sharpninja/McpServerWhat 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 | $0.00071 | $0.02003 |
| Opus 5 | $0.00036 | $0.01001 |
| Sonnet 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 2d 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 McpServer 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
McpServer; 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 McpServer 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.
- 2d 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 (2 stars, last pushed 12d ago), licensed Apache-2.0. It adds 71 tokens to every session and 2,003 once invoked, about $0.0004 per session on Opus 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
opencli-sitemap-author
Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.
golden-rss
Use when testing the rss golden build.
omh-buzz
This is a Hermes-native buzz workflow skill.
redteam-api-detail-pack
Domain routing and boundary guidance for authorized API security testing, including BOLA/IDOR, authentication bypass, mass assignment, missing rate limits, and GraphQL issues. Use when a task belongs to the API testing domain and needs scope, evidence, pivot, or exit criteria.
redteam-postex-detail-pack
Domain routing and boundary guidance for authorized post-exploitation testing after initial access, including privilege escalation, persistence, lateral movement, data collection, and cleanup considerations. Use when a task belongs to the post-exploitation domain and needs scope, evidence, pivot, or exit criteria.
android-pentest
安卓应用渗透测试 — APK分析、Hook、自动化测试、运行态驱动、签名恢复、抓包分析.