
Research
/Security News
Trivy Under Attack Again: Widespread GitHub Actions Tag Compromise Exposes CI/CD Secrets
Attackers compromised Trivy GitHub Actions by force-updating tags to deliver malware, exposing CI/CD secrets across affected pipelines.
Context Augmentation & Reinforcement Layer — Dynamic rules for Claude Code.
npx carl-core
Works on Mac, Windows, and Linux.
"Rules that load when relevant, disappear when not."
Why CARL · Getting Started · How It Works · Core Concepts · With PAUL
Every Claude Code session starts fresh. Your preferences, workflows, and hard-won lessons? Gone. You end up repeating the same instructions:
"Use TypeScript strict mode." "Don't over-engineer." "Run tests after changes."
Static prompts in CLAUDE.md work, but they bloat every session — even when irrelevant. Writing code? You don't need your content creation rules. Debugging? You don't need your planning workflow.
CARL fixes this with just-in-time rule injection:
*commandname) for on-demand modesThe result: Claude remembers how you work without wasting context on rules you don't need right now.
Claude Code users who want persistent preferences without bloated prompts.
You've figured out what works for you — coding style, response format, workflow patterns. CARL makes those preferences stick:
If you find yourself repeating instructions to Claude, CARL is for you.
npx carl-core
The installer prompts you to choose:
~/.claude + ~/.carl)./.claude + ./.carl)It also asks whether to add the CARL integration block to your CLAUDE.md.
Restart Claude Code after installation.
After install, type *carl in any prompt:
*carl
This activates CARL Help Mode — an interactive guide that can:
*carl is your entry point for learning and managing CARL.
npx carl-core@latest
You type: "help me fix this bug"
│
▼
┌───────────────────────┐
│ CARL Hook Scans │
│ Your Prompt │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Matches "fix bug" │
│ → DEVELOPMENT domain │
└───────────────────────┘
│
▼
┌───────────────────────┐
│ Injects Your Rules │
│ Into Context │
└───────────────────────┘
│
▼
Claude responds with your
coding preferences baked in
The hook runs on every interaction, reads your .carl/manifest, and injects only the rules that match your current task.
.carl/
├── manifest # Domain registry (states + keywords)
├── global # Universal rules (always loaded)
├── commands # Star-command definitions
├── context # Context-aware rules (fresh/moderate/depleted)
└── {custom-domain} # Your domain files
A domain is a collection of related rules. Create domains for different contexts:
| Example Domain | Trigger Keywords | What It Does |
|---|---|---|
| DEVELOPMENT | "fix bug", "write code" | Your coding preferences |
| CONTENT | "write script", "youtube" | Your content creation style |
| CLIENTS | "client project", "deliverable" | Project-specific rules |
When your prompt matches a domain's keywords, its rules load automatically.
Explicit triggers using *commandname syntax:
*brief explain recursion
Unlike domains (automatic), star-commands are intentional. Use them for workflow modes:
Create your own star-commands for frequently-used behaviors.
Controls which domains exist and when they activate:
DEVELOPMENT_STATE=active
DEVELOPMENT_RECALL=fix bug, write code, implement
DEVELOPMENT_EXCLUDE=
DEVELOPMENT_ALWAYS_ON=false
| Field | Purpose |
|---|---|
| STATE | active or inactive |
| RECALL | Keywords that trigger loading |
| EXCLUDE | Keywords that prevent loading |
| ALWAYS_ON | Load every session if true |
Simple KEY=VALUE in domain files:
DEVELOPMENT_RULE_0=Code over explanation - show, don't tell
DEVELOPMENT_RULE_1=Prefer editing existing files over creating new
DEVELOPMENT_RULE_2=Run tests after implementation changes
Pattern: {DOMAIN}_RULE_{N}=instruction
| Location | Scope | Use Case |
|---|---|---|
~/.carl/ | All projects | Universal preferences |
./.carl/ | Current project | Project-specific rules |
Local rules override global when both exist.
.carl/myworkflow (lowercase)MYWORKFLOW_RULE_0=First instruction
MYWORKFLOW_RULE_1=Second instruction
MYWORKFLOW_STATE=active
MYWORKFLOW_RECALL=keyword1, keyword2
Or use *carl and say "help me create a domain" for guided setup.
CARL has a companion: PAUL (Plan-Apply-Unify Loop).
| Tool | Purpose |
|---|---|
| CARL | Dynamic rule injection — how Claude behaves |
| PAUL | Structured development workflow — how work flows |
They complement each other:
.paul/ projectWithout CARL: PAUL rules would bloat every session. Without PAUL: Complex projects lack structure.
Together: lean context + reliable workflow.
Rules not loading?
STATE=active~/.claude/settings.jsonToo many rules loading?
Need help?
*carl for interactive guidance.carl/manifest for current configurationStatic prompts waste tokens on irrelevant rules. CARL loads only what's needed:
| Approach | Context Cost |
|---|---|
| Static CLAUDE.md | All rules, every session |
| CARL | Only matched rules |
More room for actual work.
CARL is transparent:
No hidden behavior.
CARL provides structure, not opinions. The default domains are examples — customize or replace them entirely. Your workflow, your rules.
carl-core/
├── hooks/carl-hook.py # The injection engine
├── .carl-template/ # Default configuration
│ ├── manifest # Domain registry
│ ├── global # Universal rules
│ ├── commands # Star-command definitions
│ └── context # Context bracket rules
└── resources/ # Optional management tools
├── commands/carl/ # /carl:manager and related commands
└── skills/ # Domain management helpers
MIT License. See LICENSE for details.
Chris Kahler — Chris AI Systems
Building tools for AI-assisted development.
Claude Code is powerful. CARL makes it personal.
FAQs
Context Augmentation & Reinforcement Layer - Dynamic rules for Claude Code
We found that carl-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
Attackers compromised Trivy GitHub Actions by force-updating tags to deliver malware, exposing CI/CD secrets across affected pipelines.

Security News
ENISA’s new package manager advisory outlines the dependency security practices companies will need to demonstrate as the EU’s Cyber Resilience Act begins enforcing software supply chain requirements.

Research
/Security News
We identified over 20 additional malicious extensions, along with over 20 related sleeper extensions, some of which have already been weaponized.