npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

just_another_clstack

v1.0.1

Published

Framework-agnostic multi-agent scaffold for Claude Code — install once, run cls init on any project

Readme

claustack

Framework-agnostic multi-agent scaffold for Claude Code. Install once, run cls init on any project, get a fully configured multi-agent Claude Code setup in under 60 seconds.


Overview

claustack is a command-line tool that scaffolds a complete multi-agent AI coding environment for Claude Code on any language or framework. It:

  • Detects your project's language, framework, and risk profile automatically
  • Generates CLAUDE.md, .claude/settings.json, subagent definitions, slash commands, MCP configs, and permission blocks
  • Provisions agent roles (planner, coder, reviewer, tester, fixer, documenter) with risk-aware routing
  • Manages a 5-layer compression stack (.claudeignore → RTK → Serena → Context7 → context-mode) to maximize context efficiency

No manual YAML editing. No multi-phase setup. Just cls init and you're ready to work with a full agent team.


How It's Different

Unlike tools that require API keys and separate orchestrators, claustack is built for Claude Code with a Max subscription. Claude Code IS the orchestrator — there's no separate runtime to install or API keys to manage. Your Max subscription handles everything directly.


Features

  • 7 language presets: Dart/Flutter, TypeScript/JavaScript, Python, Rust, Go, Swift, Kotlin + Java
  • Automatic detection: Language, framework, folder structure, risk signals (auth, payments, DB, etc.)
  • 6 custom subagents: planner, coder, reviewer, tester, fixer, documenter — spawned via Claude Code's Agent tool
  • 4 slash commands: /plan, /review, /test, /fix — invocable directly in Claude Code
  • Risk-aware routing: Auth/payment/DB tasks stay on Claude; boilerplate can go to local Ollama models
  • 5-layer compression stack:
    • .claudeignore — blocks junk from entering context
    • RTK — 60-90% shell output reduction via PreToolUse hook
    • Serena — ~80% code read reduction via symbol-level lookup
    • Context7 — live, version-specific library docs (prevents hallucinated APIs)
    • context-mode — 50-98% MCP response compression
  • Permission boundaries: Deny reads on .env, deny rm -rf, deny sudo, deny pipe-to-shell
  • Hash-based skip logic: Manually edited files are never overwritten on cls update
  • Session hygiene rules: Compact context, one task per session, state file tracking
  • Git hooks: Lefthook integration for pre-commit check chains
  • Auto-formatting hooks: PostToolUse hooks run your language's formatter on every file write

Prerequisites

Required

  • Node.js ≥18 (for the cls CLI itself)
  • Claude Code — the agent runtime. Install via npm install -g @anthropic-ai/claude-code
  • Claude Max subscription — Claude Code uses your subscription directly, no API keys needed

Optional

  • Ollama — for local model execution (boilerplate, docs, low-risk tasks). Install
  • RTK — shell output compression. brew install rtk-ai/tap/rtk (macOS)
  • uv — Python package manager (required for Serena MCP). curl -LsSf https://astral.sh/uv/install.sh | sh
  • lefthook — git hooks framework. brew install lefthook

No API Keys Required

Claude Code uses your Max subscription directly. No ANTHROPIC_API_KEY, no GOOGLE_API_KEY, no env vars to manage. Just log in to Claude Code and go.


Installation

1. Install the CLI

npm install -g claustack

Or, if developing locally:

git clone https://github.com/yourrepo/claustack.git
cd claustack
npm install && npm run build
npm link

Verify:

cls --version

2. Set up Ollama (optional but recommended)

If you want local inference for low-risk tasks (cheaper, offline, no API calls):

# Install Ollama
brew install ollama        # macOS
# or: curl -fsSL https://ollama.com/install.sh | sh

# Pull the recommended local models
ollama pull qwen3-coder-next
ollama pull qwen3:8b

Why these models?

  • qwen3-coder-next (80B MoE, ~10GB): state-of-the-art code generation, 256K context window
  • qwen3:8b (8B dense, ~5GB): lightweight model for documentation, commit messages, classification

Both run on 16GB unified memory. If RAM is tight, use qwen3-coder:30b or smaller dense models.

3. Fix npm cache (one-time, if you hit permission errors)

sudo chown -R $(id -u):$(id -g) ~/.npm

Quick Start

Initialize a new project

cd my-project
cls init

The wizard will:

  1. Detect your language/framework
  2. Ask to confirm any ambiguous fields
  3. Ask about compression stack (Serena, Context7, RTK)
  4. Generate all config files
  5. Check tool installation
  6. Offer to pull missing Ollama models

Output:

  claustack v1.0.0

  ✓ Language: TypeScript (from package.json + tsconfig.json)
  ✓ Framework: Next.js (from 'next' dependency)
  ✓ Source root: src/
  ✓ Folder convention: feature-first
  ✓ Risk signals: next-auth, stripe, @prisma/client

  Confirming settings...

  ? Backend type: REST / GraphQL / gRPC / Firebase / Supabase / None
  ? Enable Serena MCP (symbol-level code intelligence)? Y/n
  ? Enable Context7 MCP (live library docs)? Y/n
  ? Enable RTK (shell output compression)? Y/n

  Generating Claude Code config...
  ✓ CLAUDE.md
  ✓ .claudeignore
  ✓ .claude/settings.json
  ✓ .claude/agents/planner.md
  ✓ .claude/agents/coder.md
  ✓ .claude/agents/reviewer.md
  ✓ .claude/agents/tester.md
  ✓ .claude/agents/fixer.md
  ✓ .claude/agents/documenter.md
  ✓ .claude/commands/plan.md
  ✓ .claude/commands/review.md
  ✓ .claude/commands/test.md
  ✓ .claude/commands/fix.md
  ✓ .mcp.json
  ✓ lefthook.yml
  ✓ docs/session-state.md
  ✓ .claustack.json

  ✓ Setup complete. Run 'claude' to start.

Review generated files

cat CLAUDE.md              # Project playbook — risk categories, conventions, escalation
cat .claude/settings.json  # Permissions, hooks, formatting
cat .claudeignore          # Files excluded from agent context
ls .claude/agents/         # 6 subagent definitions
ls .claude/commands/       # 4 slash commands
cat .mcp.json              # MCP server configs

Commit the setup

git add CLAUDE.md .claudeignore .claude/ .mcp.json lefthook.yml .claustack.json
git commit -m "chore: init claustack v1.0.0"

Start using Claude Code

claude

Claude Code reads CLAUDE.md automatically. Give it a task and it will use the risk routing, subagents, and check chains you configured.


Commands Reference

cls init [--manual] [--force]

Initialize claustack in the current directory.

Options:

  • --manual — Force the full interactive wizard even if detection is confident
  • --force — Overwrite manually edited files (normally skipped)
  • --dir <path> — Target a different directory

What it does:

  1. Detects project language, framework, folder structure, risk signals
  2. Runs wizard for any ambiguous fields + compression stack choices
  3. Generates all config files (CLAUDE.md, settings.json, agents, commands, etc.)
  4. Checks Claude Code and Ollama installation
  5. Offers to pull missing Ollama models
  6. Creates .claustack.json state file to track manually edited files

Output files: | File | Purpose | |---|---| | CLAUDE.md | Project playbook — conventions, risk categories, check chain, escalation | | .claudeignore | Files/dirs excluded from agent context | | .claude/settings.json | Permissions (allow/deny/ask), hooks (RTK, auto-format) | | .claude/agents/*.md | 6 subagent definitions (planner, coder, reviewer, tester, fixer, documenter) | | .claude/commands/*.md | 4 slash commands (/plan, /review, /test, /fix) | | .mcp.json | MCP server configs (Serena, Context7) | | lefthook.yml | Pre-commit git hooks | | docs/session-state.md | Template for tracking context across resets | | .claustack.json | State file — version, detected fields, file hashes |


cls update [--force]

Re-detect the project and regenerate unmodified files.

When to use:

  • After upgrading the claustack package
  • When you want to pick up improved templates
  • When your project's structure has changed significantly

Behavior:

  • Files you manually edited (detected via SHA-256 hash) are skipped unless --force
  • Fields previously marked as manual stay manual (won't be re-detected)
  • .claustack.json is always updated

cls validate

Check config consistency and verify files.

Checks:

  • All expected files exist
  • Modified files are flagged (hash differs from generation)
  • .claude/settings.json is valid JSON with required permissions block
  • rm -rf and .env reads are denied in permission rules
  • .mcp.json is valid JSON

Use this before committing to catch stale or malformed configs.


cls check-tools

Report installation status of Claude Code, Node.js, Ollama, RTK, uv, and lefthook.

Output:

  claustack check-tools

  Required:
  ✓ Claude Code 1.0.31
  ✓ Node.js v22.0.0

  Optional:
  ✓ Ollama 0.7.2
  ○ RTK not installed
  ○ uv not installed
  ✓ lefthook 1.9.0

cls doctor

Comprehensive health check: tools + config validation + security tests.

Runs:

  1. Tool installation checks (Claude Code, Node.js, Ollama, RTK, uv, lefthook)
  2. Model availability (if Ollama is installed)
  3. Configuration validation (same as cls validate)
  4. Security permission tests (confirms rm -rf blocked, sudo blocked, .env read blocked, pipe-to-shell blocked)

Use this to troubleshoot before reporting issues.


cls compress

Guide setup of the 5-layer compression stack.

Output:

  claustack compress

  ✓ .claudeignore exists

  ── Layer 1: RTK (shell compression) ──
  ✓ RTK installed (v0.2.1)
  → Run: rtk init -g

  ── Layer 2: Serena (code intelligence) ──
  ✓ uv installed (0.7.12)
  → Serena is configured in .mcp.json

  ── Layer 3: Context7 (live docs) ──
  ✓ Context7 configured in .mcp.json

  ── Layer 4: context-mode (MCP response compression) ──
  ○ Optional — install manually:
  → mkdir -p .claude/skills
  → git clone https://github.com/mksglu/context-mode .claude/skills/context-mode

  Compression stack summary:
  Layer 0: .claudeignore        → blocks junk from entering context
  Layer 1: RTK                  → 60-90% shell output reduction
  Layer 2: Serena               → ~80% code read reduction
  Layer 3: Context7              → prevents hallucinated APIs
  Layer 4: context-mode          → 50-98% MCP output reduction

cls eject

Copy generated files to claustack-templates/ for full customization.

When to use:

  • You want to customize agent prompts, permissions, or CLAUDE.md sections
  • You're managing many projects with shared conventions
  • You want version control over your templates

After ejecting:

  • Edit files in claustack-templates/
  • cls update will no longer overwrite them
  • You own the maintenance burden

Generated Files Reference

CLAUDE.md — Your Project's Playbook

This file is the single source of truth Claude Code reads for your project. It contains:

Identity

# Project: my-app

## Stack
- **Language:** typescript
- **Framework:** nextjs
- **Source root:** src/
- **Folder convention:** feature-first
- **Backend:** rest
- **Database:** postgres

Conventions — Language/framework-specific best practices auto-generated from presets:

  • TypeScript: "Use Server Components by default, Client Components only when interactivity is required"
  • Dart: "Use flutter_bloc pattern: events → bloc → states"
  • Python: "Type hints on all function signatures"
  • Rust: "Prefer Result<T, E> over panicking. Use ? operator for propagation."

Risk Categories — Tasks touching these categories stay on Claude (never routed to local models):

  • Auth/identity (any authentication or authorization code)
  • Payments/billing (Stripe, PayPal, in-app purchases)
  • Database migrations (schema changes, data transforms)
  • Infrastructure/deployment (CI/CD, cloud config, IaC, secrets)

Task Routing — How to assign work based on risk:

  • HIGH RISK → Claude only, never delegate to Ollama
  • STANDARD → Claude or local models
  • LOW RISK → prefer Ollama when available

Escalation Procedure

1. Retry once with same approach — fix the specific error
2. Spawn fixer subagent with error context and original spec
3. If fixer fails, re-examine the original decomposition (spec problem)
4. Ask user for clarification
5. If Gemini MCP available, send full context for large-window analysis

Check Chain — Language-specific verification commands:

# TypeScript/Node:
npx tsc --noEmit
npm run lint -- --max-warnings=0
npm test

# Python:
ruff check .
mypy .
pytest

# Rust:
cargo check
cargo clippy -- -D warnings
cargo test

Session Hygiene

  • Run /compact proactively around message 25
  • One session per distinct task
  • Write state to docs/session-state.md before context resets
  • Disconnect MCP servers not needed for the current session

Compression rules (conditional, based on your choices):

  • Serena MCP: prefer serena_find_symbol() over reading whole files
  • Context7: verify API shapes against live docs before assuming from memory
  • RTK: shell output is auto-compressed via PreToolUse hook

.claude/settings.json — Permissions & Hooks

Controls what Claude Code can and cannot do:

{
  "permissions": {
    "allow": [
      "Bash(git *)",
      "Read",
      "Edit",
      "Write",
      "Bash(npm *)",
      "Bash(npx *)",
      "Bash(node *)"
    ],
    "deny": [
      "Bash(rm -rf *)",
      "Bash(sudo *)",
      "Bash(curl * | sh)",
      "Bash(curl * | bash)",
      "Read(.env*)",
      "Read(**/credentials*)",
      "Read(**/*secret*)"
    ],
    "ask": [
      "Bash(git push*)"
    ]
  },
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Bash",
        "hooks": [{
          "type": "command",
          "command": "rtk intercept",
          "statusMessage": "Compressing shell output..."
        }]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Write",
        "hooks": [{
          "type": "command",
          "command": "npx prettier --write $path",
          "if": "Write(src/**/*.{ts,tsx,js,jsx})",
          "statusMessage": "Formatting..."
        }]
      }
    ]
  }
}

Language-specific permissions are auto-generated: | Language | Allowed commands | |---|---| | TypeScript/JS | npm *, npx *, node * | | Python | python *, pytest *, ruff *, mypy * | | Dart | dart *, flutter * | | Rust | cargo * | | Go | go * | | Swift | swift *, xcodebuild * | | Kotlin/Java | ./gradlew * |

Auto-formatting is set up per language: | Language | Formatter | |---|---| | TypeScript/JS | npx prettier --write | | Python | ruff format | | Dart | dart format | | Rust | rustfmt | | Go | gofmt -w |


.claude/agents/*.md — Subagent Definitions

6 agents available via Claude Code's Agent tool:

| Agent | Role | |---|---| | planner | Architecture decisions, file change lists, execution order, risk flags | | coder | Implements a single well-scoped task. Follows spec exactly. | | reviewer | Fresh-context code review — security, performance, spec compliance | | tester | Writes tests: happy path → edge cases → error paths → integration | | fixer | Diagnoses failing tests. Minimal diffs. Patch, don't rewrite. | | documenter | Commit messages, inline docs, changelogs |

Example: .claude/agents/coder.md

You are a typescript nextjs expert coder.

## Rules
- Implement ONLY what the spec asks for. No scope creep.
- Add input validation and error handling even if not in spec.
- Follow the project conventions in CLAUDE.md exactly.
- If the spec is ambiguous, implement the most defensive interpretation.
- Do NOT expand scope. If the task is too large, say so.

## Output format
End every response with:
confidence: low|medium|high
reason: [one sentence explaining your confidence level]

.claude/commands/*.md — Slash Commands

4 commands invocable from Claude Code:

| Command | What it does | |---|---| | /plan <feature> | Spawns planner subagent → structured implementation plan | | /review [file/range] | Spawns reviewer subagent with git diff → categorized findings | | /test [file/function] | Spawns tester subagent → writes and runs tests | | /fix [error] | Spawns fixer subagent → diagnoses and patches → re-runs check chain |


.mcp.json — MCP Server Configs

Configures optional MCP servers:

{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server"]
    },
    "context7": {
      "command": "npx",
      "args": ["-y", "@upstash/context7-mcp"]
    }
  }
}

.claustack.json — State File

Tracks what was auto-detected vs. manually confirmed, and file hashes:

{
  "version": "1.0.0",
  "detectedFields": ["language", "framework", "folderConvention"],
  "manualFields": ["backend"],
  "projectType": {
    "language": "typescript",
    "framework": "nextjs"
  },
  "fileHashes": {
    "CLAUDE.md": "a1b2c3d4...",
    ".claude/settings.json": "e5f6g7h8...",
    ".claudeignore": "i9j0k1l2..."
  }
}

Commit this to git. It's used by cls update to:

  • Skip manually edited files (hash differs)
  • Preserve manual field assignments across re-runs

How It Works

Detection Pipeline

  1. Language detection — Looks for manifest files (package.json, pubspec.yaml, Cargo.toml, go.mod, Package.swift, requirements.txt, pyproject.toml, build.gradle.kts)
  2. Framework detection — Parses manifest dependencies against framework rules (e.g., next dependency → Next.js)
  3. Folder structure — Detects feature-first (src/features/), layer-first (src/controllers/, src/services/), or flat
  4. Risk analysis — Scans for auth (Firebase Auth, next-auth, Clerk, Lucia), payments (Stripe, PayPal, Razorpay), database (Prisma, SQLAlchemy, Diesel), and infrastructure packages

Rendering

Each file is generated by:

  1. Composing content from sections (CLAUDE.md) or templates (agents, commands)
  2. Substituting language/framework-specific variables
  3. Writing to disk with a SHA-256 content hash
  4. Checking against .claustack.json — if manually edited, skipping on cls update

Risk-Aware Task Routing

Tasks are routed based on risk:

HIGH RISK → Claude only (never Ollama):

  • Auth/identity changes
  • Payment processing
  • Database migrations
  • Infrastructure/deployment
  • Secrets/signing

STANDARD → Claude or local models:

  • Business logic, UI features, API endpoints
  • Test writing, debugging

LOW RISK → prefer Ollama when available:

  • Boilerplate, scaffolding, CRUD
  • Commit messages, changelogs, inline docs
  • Code formatting, import organization

Escalation on failure:

  1. Retry once with same approach
  2. Spawn fixer subagent
  3. Re-examine spec (likely decomposition problem)
  4. Ask user
  5. Gemini large-context analysis (if available)

Project Structure

After cls init, your project looks like:

my-project/
├── .claustack.json                # State file
├── CLAUDE.md                      # Project playbook
├── .claudeignore                  # Context exclusion
├── .claude/
│   ├── settings.json              # Permissions + hooks
│   ├── agents/
│   │   ├── planner.md
│   │   ├── coder.md
│   │   ├── reviewer.md
│   │   ├── tester.md
│   │   ├── fixer.md
│   │   └── documenter.md
│   └── commands/
│       ├── plan.md
│       ├── review.md
│       ├── test.md
│       └── fix.md
├── .mcp.json                      # MCP server configs
├── lefthook.yml                   # Git hooks config
├── docs/
│   └── session-state.md           # Template for context tracking
├── src/                           # Your source code
├── package.json                   # (or pubspec.yaml, Cargo.toml, etc.)
└── ...

Customization & Advanced Usage

Manual Edits (won't be overwritten)

Once you edit a file, cls update skips it unless you use --force:

# Safe to edit:
vim CLAUDE.md
vim .claude/agents/coder.md
vim .claude/settings.json

# Then update other files:
cls update

Ejecting Templates

For full control, eject templates to your repo:

cls eject

This copies CLAUDE.md, .claudeignore, .claude/settings.json, .mcp.json, lefthook.yml, all agents, and all commands to claustack-templates/. They're yours now; cls update won't touch the originals.

Adding a New Language

  1. Create src/detector/presets/newlang.ts with:

    • Manifest file patterns
    • Framework detection rules
    • Risk package signatures
    • Ignore patterns
    • Check commands
    • Bash permission rules
    • Conventions
  2. Register in src/detector/presets/index.ts:

    import { preset as newlang } from './newlang.js';
    export const presets: LanguagePreset[] = [
      // ... existing presets
      newlang,
    ];
  3. Rebuild and test:

    npm run build
    npm test

Setting Up the Compression Stack

After cls init, set up each layer:

# Layer 1: RTK (shell compression)
brew install rtk-ai/tap/rtk     # macOS
rtk init -g                      # Hook into Claude Code
# Restart Claude Code after this

# Layer 2: Serena (code intelligence)
curl -LsSf https://astral.sh/uv/install.sh | sh    # Install uv
# Serena is auto-configured in .mcp.json

# Layer 3: Context7 (live docs)
# Auto-configured in .mcp.json — no extra setup

# Layer 4: context-mode (optional)
mkdir -p .claude/skills
git clone https://github.com/mksglu/context-mode .claude/skills/context-mode

Or run cls compress for a guided walkthrough.

Enabling Serena MCP (Symbol-Level Code Intelligence)

If you said "yes" to Serena during cls init, it's already in .mcp.json:

{
  "mcpServers": {
    "serena": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/oraios/serena", "serena", "start-mcp-server"]
    }
  }
}

Requires uv (Python package manager):

curl -LsSf https://astral.sh/uv/install.sh | sh

Serena provides:

  • Symbol-level lookups (faster than reading whole files)
  • Type hierarchies and implementations
  • Call graphs and references
  • Semantic code search

Model Swaps

To use a different local model:

# Pull it
ollama pull <new-model>

Then update CLAUDE.md to reference the new model in your task routing rules. No other files need changes since Claude Code handles model selection internally.

Using with Gemini Pro / Antigravity IDE

If you have a Gemini Pro subscription:

  • Use Antigravity IDE for large-context analysis (1M+ tokens)
  • Claude Code handles orchestration and code generation
  • Gemini handles full-codebase scans and architectural review
  • The escalation procedure in CLAUDE.md includes a Gemini step for context overflow

Troubleshooting

"Claude Code not found"

Fix:

npm install -g @anthropic-ai/claude-code

"Model 'qwen3-coder-next' not found"

Fix:

ollama pull qwen3-coder-next

Permission errors on npm install

Fix:

sudo chown -R $(id -u):$(id -g) ~/.npm

"Could not connect to Ollama" warning

Cause: Ollama daemon not running

Fix:

brew services start ollama    # macOS
# Or open the Ollama app

RTK hook not working

Cause: RTK not initialized globally

Fix:

rtk init -g
# Then restart Claude Code

Agent keeps trying to read .env files

Fix:

cls doctor    # Verify permissions
cls validate  # Check config

You should see:

✓ .env read blocked

Files not updating after cls update

Cause: Files were manually edited — claustack skips them to protect your changes.

Fix: Use --force to overwrite:

cls update --force

Limits & Caveats

Context Windows

  • Claude Code (Max): 200K tokens per conversation
  • Local models (qwen3-coder-next): 256K tokens
  • Gemini 2.5: 1M tokens (use for large-codebase analysis)

Long conversations trigger auto-compaction. Write state to docs/session-state.md before forcing resets.

Ollama RAM Usage

  • qwen3-coder-next (MoE): ~10GB on 16GB unified memory
  • qwen3:8b: ~5GB
  • Both simultaneously: ~15GB (tight on 16GB)

Ollama auto-unloads idle models after 5 minutes.

Git Hooks (Lefthook)

After cls init, install hooks:

lefthook install

Hooks run the check chain on every commit. Disable with:

lefthook disable

Best Practices

1. One Session Per Task

Claude Code loses context over long conversations. Start a new session for each feature or bug. Decompose large features into smaller sessions.

2. Write Session State Before Context Reset

# Before /clear or context rollover
echo "## Current state
- Completed: user auth flow
- In progress: email verification
- Next: reset password endpoint
- Blockers: none" >> docs/session-state.md

3. Use the Slash Commands

Instead of describing what you want in prose, use the built-in commands:

/plan add user profile page with avatar upload
/review src/auth/
/test src/services/payment.ts
/fix TypeError: Cannot read properties of undefined

4. Pipe Verbose Output

If check chains produce long output:

pytest | head -200

Saves tokens. RTK handles this automatically when enabled.

5. Validate Before Committing

cls validate

Catches stale or malformed configs before they hit the repo.

6. Run Doctor When Something Feels Wrong

cls doctor

It's comprehensive — tools, models, config, and security checks in one shot.


FAQ

Q: Do I need API keys? A: No. Claude Code uses your Max subscription directly. No API keys needed.

Q: Do I have to use Ollama? A: No. Claude Code handles everything. Ollama is optional for offloading low-risk tasks to local models.

Q: What if my project is a monorepo with multiple languages? A: Run cls init in each language subdirectory. Each gets its own CLAUDE.md, settings, and agent configs.

Q: Can I customize the agent prompts? A: Yes. Edit .claude/agents/*.md. After you edit, cls update will skip them (change detected via hash).

Q: Can I add my own slash commands? A: Yes. Create .claude/commands/yourcommand.md with frontmatter. Claude Code picks them up automatically.

Q: Can I run agents offline? A: Partially. If Ollama is set up, low-risk tasks can run offline. Claude Code itself requires internet.

Q: How often should I run cls update? A: After upgrading the claustack package. It picks up improved templates while respecting your manual edits.

Q: What's the difference between claustack and agentstack? A: agentstack targets OpenCode (requires API keys, separate orchestrator). claustack targets Claude Code (Max subscription, Claude IS the orchestrator). Same detection pipeline, different rendering targets.


Contributing

Found a bug? Want to add a language preset? Open an issue or PR.

Adding a preset:

  1. Create src/detector/presets/yourlang.ts
  2. Register in src/detector/presets/index.ts
  3. Add tests in tests/detector.test.ts
  4. Run npm test to verify

Reporting issues:

  • Run cls doctor first
  • Include your output and OS/Node.js version

License

MIT. See LICENSE.


Questions? Stuck? Run cls doctor or cls validate — they're comprehensive and usually point to the issue.