Back to list
nguyenthienthanh

project-context-loader

by nguyenthienthanh

Aura Frog — AI-powered structured development plugin for Claude Code Turn Claude Code into a full-fledged dev platform: Aura Frog brings 24 specialized agents, a 9-phase TDD workflow, built-in quality gates and 70+ commands so your team doesn’t need to manually draft prompts — just call the right command and follow guided instructions.

3🍴 2📅 Jan 22, 2026

SKILL.md


name: project-context-loader description: "Load project conventions and generate session context. Use EXPLICITLY when needed, not automatically." autoInvoke: false

TOKEN OPTIMIZATION: Disabled auto-invoke. Was causing ~15-25k tokens per session.

Invoke explicitly via /project:context or when project context is truly needed.

priority: high triggers:

  • "/project:context"
  • "load project context"
  • "load conventions" allowed-tools: Read, Write, Grep, Glob, Bash

Project Context Loader

Priority: HIGH - Use before any workflow or code generation Version: 1.1.0


When to Use

BEFORE:

  • workflow:start or any implementation
  • Any code generation or new files
  • Refactoring or writing tests

SKIP only for: Simple questions (no code), when session-context.toon already loaded


Loading Process

1. Check for Cached Context

# 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

2. Generate Session Context (If Missing)

Scan Codebase Patterns

# 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?

Generate TOON File

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}

3. Load Project-Specific Config

Location: .claude/project-contexts/[project]/

FileContains
project-config.yamlTech stack, integrations
conventions.mdOverride patterns (optional)
rules.mdProject-specific rules

4. Merge Priority

session-context.toon (cached patterns)
  ↓
project-contexts/conventions.md (overrides)
  ↓
Aura Frog core rules (defaults)

Session Context Template

# 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

Token Efficiency

ApproachTokens
Full convention docs~500-1000
Session context TOON~100-150
Savings80-85%

Commands

Generate Context Manually

bash scripts/context-compress.sh

Clear Context (Force Rescan)

rm .claude/session-context.toon

If Context Missing

⚠️ **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 rule
  • skills/session-continuation/SKILL.md - Workflow state + handoff
  • scripts/context-compress.sh - Context generator

Score

Total Score

65/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

1ヶ月以内に更新

+10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

+5

Reviews

💬

Reviews coming soon