session-hooks

session-hooks is a skill for Claude Code, Codex from d4rkNinja/code-guardian. It costs 40 tokens per session (2,565 once invoked), scanned B, original, no licence file.

A project-level setup for loading and saving INFYNON Trace session memory automatically. It places the hooks in the project's .claude/settings.json file.

In plain words
What is it for?
Setting up automatic memory handling for INFYNON Trace sessions in a project. Install it only when the user specifically asks for these hooks.
Why use it?
It avoids having to load or save session memory by hand. It also keeps the configuration limited to one project instead of changing system settings.

Skill for Claude CodeCodex

Part of the infynon-trace plugin — 3 skills, 1 agent shipped together

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.

agentmods
npx agentmods add skills/d4rkninja/code-guardian/session-hooks
Any agent
npx skills add d4rkNinja/code-guardian --skill session-hooks
Clone the repo
git clone --depth 1 https://github.com/d4rkNinja/code-guardian

Made for: Claude Code, Codex.

Or install infynon-trace, the plugin that ships this one along with the rest of its 3 skills, 1 agent.

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 session-hooks

README.md
[![agentmods](https://agentmods.dev/badge/skills/d4rkninja/code-guardian/session-hooks.svg)](https://agentmods.dev/skills/d4rkninja/code-guardian/session-hooks)
Your own site
<a href="https://agentmods.dev/skills/d4rkninja/code-guardian/session-hooks"><img src="https://agentmods.dev/badge/skills/d4rkninja/code-guardian/session-hooks.svg" alt="Measured on agentmods" height="20"></a>
Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin unknown 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 $0.00040 $0.02565
Opus 5 $0.00020 $0.01282
Sonnet 5 $0.00008 $0.00513
Haiku 4.5 $0.00004 $0.00257

Measured 3d ago against content hash a1e926a723e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

session-hooks scanned grade B with 1 finding 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 3d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

This creates or merges hooks into `<project-dir>/.claude/settings.json`.
infynon-trace/skills/session-hooks/SKILL.md · 300 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 3d ago First seen · 300 lines · 40 tokens per session scan B a1e926a723e9

Subscribe to this mod's changes

session-hooks is a skill published in the GitHub repository d4rkNinja/code-guardian (5 stars, last pushed 4mo ago), with no licence file. It adds 40 tokens to every session and 2,565 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

development

开发语言能力索引。Python、Go、Rust、TypeScript、Java、C++、Shell。当用户提到编程、开发、代码、语言时路由到此。.

fengshao1227/ccg-workflow · 41 tokens

rust-pro

Master modern Rust (2024 edition) with async patterns, advanced type system features, and production-ready systems programming. Expert in the current Rust ecosystem including Tokio, axum, and modern crates. Use PROACTIVELY for Rust development, performance optimization, or systems programming.

vudovn/ag-kit · 58 tokens

ax-python-agent

Use when writing Python code with axllm for agents, child delegation, tools, MCP, citations, persistent playbook learning, stage instructions, runtime state, final typed responses, and direct-respond executor skipping.

ax-llm/ax · 49 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens

mps-aspect-actions

Use when defining or editing MPS node factories (the "actions" aspect) — NodeFactories roots, per-concept NodeFactory setup functions that initialize a freshly created node and optionally copy data from a replaced sampleNode, plus the actions aspect's CopyPasteHandlers and PasteWrappers roots. Reach for this skill…

JetBrains/MPS · 115 tokens

product-marketing

Build product marketing strategy including positioning, messaging, and go-to-market. Use when the user says "positioning", "messaging framework", "go-to-market", "GTM strategy", "product marketing", "competitive positioning", "battlecard", "sales enablement", "launch plan", or asks about how to position or message…

OpenClaudia/openclaudia-skills · 77 tokens