aura-guard

aura-guard is a skill for Claude Code from smorky850612/Aurakit. It costs 38 tokens per session (753 once invoked), scanned A, original, MIT.

An internal monitor for token and context usage in an AI coding session. It saves a snapshot and compacts the session when the context becomes too full.

In plain words
What is it for?
Use it automatically during extended agent sessions that need context monitoring, snapshots, and restoration after compaction.
Why use it?
It helps prevent important working context from being lost when a long session approaches its context limit.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the aurakit plugin — 3 skills, 23 agents shipped together

Good fit Use it automatically during extended agent sessions that need context monitoring, snapshots, and restoration after compaction.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/smorky850612/aurakit/aura-guard
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 smorky850612/Aurakit --skill aura-guard
Clone the repo
git clone --depth 1 https://github.com/smorky850612/Aurakit

Made for: Claude Code.

Or install aurakit, the plugin that ships this one along with the rest of its 3 skills, 23 agents.

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 aura-guard

README.md
[![agentmods](https://agentmods.dev/badge/skills/smorky850612/aurakit/aura-guard/github.svg)](https://agentmods.dev/skills/smorky850612/aurakit/aura-guard)
Your own site
<a href="https://agentmods.dev/skills/smorky850612/aurakit/aura-guard"><img src="https://agentmods.dev/badge/skills/smorky850612/aurakit/aura-guard/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 aura-guard

Your own site · 80×15
<a href="https://agentmods.dev/skills/smorky850612/aurakit/aura-guard"><img src="https://agentmods.dev/badge/skills/smorky850612/aurakit/aura-guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 753 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.00038 $0.00753
Opus 5 $0.00019 $0.00377
Sonnet 5 $0.00008 $0.00151
Haiku 4.5 $0.00004 $0.00075

Measured 11d ago against content hash 7e8316252388, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

aura-guard 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 11d 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/aura-guard/SKILL.md · 107 lines

How it starts

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

AuraKit Guard — 컴팩트 방어 시스템

컨텍스트 창 과부하를 방지하는 자동 방어 레이어. 이 스킬은 내부적으로 동작하며 사용자가 직접 호출하지 않는다.


컴팩트 방어 아키텍처

세션 시작
    │
    ▼
컨텍스트 사용량 모니터링
    │
    ├─ 65% 미만 → 정상 작업 계속
    │
    └─ 65% 도달 ─────────────────────────────────────────┐
                                                          │
                                              CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=65
                                                          │
                                                          ▼
                                              pre-compact-snapshot.sh (PreCompact hook)
                                              ├─ 현재 스냅샷 백업
                                              ├─ transcript 요약 (claude -p)
                                              └─ .aura/snapshots/current.md 저장
                                                          │
                                                          ▼
                                                   /compact 자동 실행
                                                          │
                                                          ▼
                                              post-compact-restore.sh (PostCompact hook)
                                              ├─ .aura/snapshots/current.md 읽기
                                              └─ 내용을 stdout → Claude 컨텍스트 주입
                                                          │
                                                          ▼
                                              새 컨텍스트에서 이전 상태 복구됨

환경변수 설정

# ~/.bashrc 또는 ~/.zshrc에 추가 (init.sh가 자동 추가)
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=65

이 설정으로 컨텍스트 65% 시점에 자동 컴팩트가 트리거된다. 기본값(90%)보다 일찍 압축하여 컨텍스트 손실을 방지한다.


토큰 사용량 확인 방법

Claude Code에서 /context 명령으로 현재 컨텍스트 사용량을 확인할 수 있다.

/context  →  현재 토큰 사용량 및 남은 용량 표시

Hook 연동

Hook 이벤트 파일 동작
PreCompact pre-compact-snapshot.sh 스냅샷 저장
PostCompact post-compact-restore.sh 스냅샷 복구 + 컨텍스트 주입

Read the full file on GitHub · 107 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. 11d ago First seen · 107 lines · 38 tokens per session scan A 7e8316252388

Subscribe to this mod's changes

aura-guard is a skill published in the GitHub repository smorky850612/Aurakit (41 stars, last pushed 4mo ago), licensed MIT. It adds 38 tokens to every session and 753 once invoked, about $0.0002 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-30.