Load project conventions and generate session context. PROACTIVELY use before any code generation.
Proactively scans codebase for project conventions and generates a lightweight session context file before any code generation. Triggers automatically on first code action or when context is missing/stale.
/plugin marketplace add nguyenthienthanh/aura-frog/plugin install aura-frog@aurafrogThis skill is limited to using the following tools:
Priority: HIGH - Use before any workflow or code generation Version: 1.1.0
BEFORE:
workflow:start or any implementationSKIP only for: Simple questions (no code), when session-context.toon already loaded
# If session context exists and is recent (< 1 hour), use it
if [ -f ".claude/session-context.toon" ]; then
Read .claude/session-context.toon
# Skip full scan
fi
# File naming convention
ls src/components/ | head -5 # PascalCase or kebab-case?
# Import style
Grep: "^import.*from ['\"]@/" --type ts # Absolute paths?
Grep: "^import.*from ['\"]\.\./" --type ts # Relative paths?
# Export pattern
Grep: "^export default" --type ts
Grep: "^export (const|function)" --type ts
# Error handling
Grep: "Result<|Either<" --type ts # Functional?
Grep: "try.*catch" --type ts # Exception-based?
Write to .claude/session-context.toon:
# Session Context - Auto-generated
# Generated: {timestamp}
---
project:
name: {from package.json}
stack: {detected}
patterns[6]{type,convention,example}:
file_naming,{PascalCase|kebab-case},{example}
imports,{absolute|relative},{example}
exports,{named|default},{example}
errors,{result|exceptions},{example}
testing,{jest|vitest},{example}
styling,{tailwind|css-modules},{example}
workflow:
phase: {current}
feature: {name}
branch: {git branch}
Location: .claude/project-contexts/[project]/
| File | Contains |
|---|---|
project-config.yaml | Tech stack, integrations |
conventions.md | Override patterns (optional) |
rules.md | Project-specific rules |
session-context.toon (cached patterns)
↓
project-contexts/conventions.md (overrides)
↓
Aura Frog core rules (defaults)
# Session Context
# Generated: 2025-12-16T10:00:00Z
# Valid for: 1 hour (regenerate if stale)
---
project:
name: my-app
stack: React,TypeScript,TailwindCSS
patterns[6]{type,convention,example}:
file_naming,PascalCase,UserProfile.tsx
imports,absolute @/,import { Button } from '@/components/Button'
exports,named,export const UserCard = ...
errors,result,return { ok: true, data }
testing,vitest,describe('UserCard', () => ...)
styling,tailwind,className="flex items-center"
workflow:
phase: 4
feature: user-authentication
branch: feature/user-auth
decisions[2]{id,choice}:
auth,JWT tokens
storage,Redis session
| Approach | Tokens |
|---|---|
| Full convention docs | ~500-1000 |
| Session context TOON | ~100-150 |
| Savings | 80-85% |
bash scripts/context-compress.sh
rm .claude/session-context.toon
⚠️ **Project context not found!**
Generating session-context.toon from codebase scan...
Run `project:init` for full project config.
Related:
rules/codebase-consistency.md - Pattern matching ruleskills/session-continuation/SKILL.md - Workflow state + handoffscripts/context-compress.sh - Context generatorThis skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.