Skip to content

Repository files navigation

Jarvis - AI Assistant Enhancement System for Claude Code

Jarvis is an advanced system that enhances Claude Code CLI with intelligent skills, safety hooks, automated workflows, and productivity features.

Features

Safety & Protection

  • Git Safety Guard - Blocks destructive commands (git reset --hard, git push --force, rm -rf)
  • PR Workflow Enforcement - Ensures proper PR submission process with code review
  • Worktree Isolation - Optional protection against editing files on main branch

Productivity

  • Smart Skill Activation - Automatically suggests relevant skills based on context
  • Enhanced Status Line - Real-time insights via Claude HUD (context, tools, agents)
  • Session Tracking - Maintains context across conversations
  • Learning Capture - Learns from successful patterns

Customization

  • Configurable Rules - Toggle TDD, worktree isolation, pre-commit tests
  • Specialized Agents - Code reviewer, test generator, and more
  • Custom Commands - Slash commands for common workflows
  • Pattern Library - Reusable solutions indexed by context

Requirements

  • Claude Code CLI - https://claude.ai/code
  • Git - Version control
  • Bash 4+ - Shell scripting
  • jq - JSON processing (for config management)

Quick Start

# Clone the repository
git clone https://github.com/erikpr1994/claude-code-tools.git
cd claude-code-tools

# Install globally
./install.sh

# Start Claude Code in any project
cd your-project
claude

# Initialize Jarvis for this project
/jarvis-init

Installation

Standard Install

./install.sh

Installation Options

./install.sh              # Interactive install with preferences setup
./install.sh --skip-config # Install with default preferences
./install.sh --force      # Skip version prompts
./install.sh --help       # Show help

The installer will prompt you to configure which hooks and rules you want enabled.

What Gets Installed

~/.claude/
├── settings.json          # Claude Code settings (hooks, statusline configured by installer)
├── config/
│   ├── preferences.json   # Your rules & hooks preferences
│   └── defaults.json      # Default preference values
├── hooks/                 # Event-driven automations
│   ├── git-safety-guard.sh    # Blocks destructive git commands
│   ├── block-direct-submit.sh # Enforces PR workflow
│   ├── require-isolation.sh   # Worktree/branch protection
│   ├── skill-activation.sh    # Smart skill suggestions
│   ├── pre-commit.sh          # Pre-commit verification
│   └── lib/common.sh          # Shared hook utilities
├── skills/                # Skill definitions
├── commands/              # Slash commands
├── agents/                # Specialized agents
├── rules/                 # Coding standards
├── patterns/              # Pattern library
└── lib/                   # Utilities

Commands

Command Description
/jarvis-init Initialize Jarvis in current project
/update Update Jarvis from repo
/jarvis-config Configure preferences interactively
/plan Create implementation plan
/jarvis-review Run code review
/test Run tests with TDD guidance
/commit Smart commit with verification
/skills List available skills

Codex Integration

Codex reads repo-level AGENTS.md and discovers skills in .codex/skills/. To make Jarvis skills available in Codex, sync them from global/skills (copy is recommended; Codex ignores symlinked directories):

./scripts/codex-sync.sh --scope repo --mode copy
# Or install user-wide:
./scripts/codex-sync.sh --scope user --mode copy

Jarvis agents/commands live under global/agents and global/commands. Codex doesn’t load those directly, so reference them via skills or docs as needed.

To approximate Claude hooks in Codex, install the rules template:

./scripts/codex-install-rules.sh

Configuration

Interactive Setup

During installation, you'll be prompted to configure your preferences. You can reconfigure anytime with /jarvis-config.

Preferences File

Edit ~/.claude/config/preferences.json or use /jarvis-config:

{
  "version": "1.0.0",
  "rules": {
    "tdd": { "enabled": false, "severity": "warning" },
    "conventionalCommits": { "enabled": true, "severity": "warning" },
    "codeQuality": { "enabled": true, "severity": "info" },
    "documentation": { "enabled": true, "severity": "info" }
  },
  "hooks": {
    "gitSafetyGuard": { "enabled": true, "bypassable": true },
    "requireIsolation": { "enabled": false, "bypassable": true },
    "preCommitTests": { "enabled": false, "bypassable": true },
    "skillActivation": { "enabled": true, "bypassable": false },
    "learningCapture": { "enabled": true, "bypassable": false }
  }
}

Rules vs Hooks

Type Purpose Effect
Rules Soft guidelines for Claude Suggestions, warnings
Hooks Hard enforcement mechanisms Block actions, require steps

Severity Levels

  • error - Block the action
  • warning - Allow with caution message
  • info - Suggest, don't enforce

Safety Hooks

The git-safety-guard blocks dangerous commands:

Blocked Safe Alternative
git reset --hard git stash first
git push --force --force-with-lease
git checkout -- files git stash first
git clean -f git clean -n first
git branch -D git branch -d
rm -rf Ask user to run manually

Bypass: Set CLAUDE_ALLOW_DESTRUCTIVE=1 for legitimate use.

Status Line

We recommend using Claude HUD for a rich, real-time status line showing:

  • Project name and git branch
  • Context usage and costs
  • Active tools and agents
  • Todo progress

The installer (./install.sh) automatically sets this up for you.

Manual Setup (Fallback)

If the automated installer fails, you can run these commands in your terminal:

claude plugin marketplace add jarrodwatts/claude-hud
claude plugin install claude-hud

Then configure the statusline in your ~/.claude/settings.json manually, or run /claude-hud:setup inside Claude Code.

Updating

# Pull latest changes
cd claude-code-tools
git pull

# Update installation
/update              # Or run from Claude Code
./install.sh         # Or run installer directly

Updates preserve your customizations:

  • Files with # JARVIS-USER-MODIFIED header are never overwritten
  • rules section in jarvis.json is preserved
  • <!-- USER CUSTOMIZATIONS --> sections in CLAUDE.md are kept

Skills System

Skills are automatically suggested based on conversation context.

Skill Categories

Category Examples
Process TDD, debugging, verification
Domain Git workflow, API design, database
Meta Writing skills, patterns

Skill Activation

When you see SKILL ACTIVATION CHECK, invoke the recommended skills:

SKILL ACTIVATION CHECK

CRITICAL SKILLS (REQUIRED):
  -> test-driven-development
  -> session

Use the Skill tool: skill: "tdd"

Hooks System

Hooks run automatically on Claude Code events:

Event Hook Purpose
PreToolUse:Bash git-safety-guard Block destructive commands
PreToolUse:Bash block-direct-submit Enforce PR workflow
PreToolUse:Edit require-isolation Worktree protection
UserPromptSubmit skill-activation Suggest relevant skills
SessionStart session-start Initialize session
PostToolUse learning-capture Capture patterns

Project Structure

claude-code-tools/
├── install.sh              # Installer
├── uninstall.sh            # Uninstaller
├── README.md               # This file
├── VERSION                 # Current version
├── global/                 # Files installed to ~/.claude/
│   ├── settings.json       # Claude Code settings
│   ├── jarvis.json         # Jarvis config
│   ├── hooks/              # Hook scripts
│   ├── skills/             # Skill definitions
│   ├── commands/           # Slash commands
│   ├── agents/             # Agent definitions
│   ├── rules/              # Coding standards
│   ├── patterns/           # Pattern library
│   └── lib/                # Utilities
├── init/                   # First-run setup
└── templates/              # Project templates

Troubleshooting

Hook not working

Restart Claude Code after changing settings.json.

Permission denied

chmod +x install.sh ~/.claude/hooks/*.sh

jq not found

# macOS
brew install jq

# Ubuntu/Debian
sudo apt install jq

Restore from backup

Backups are in ~/.claude/backups/:

cp -R ~/.claude/backups/YYYYMMDD_HHMMSS/* ~/.claude/

Contributing

  1. New Hook: Add to global/hooks/ and update settings.json
  2. New Skill: Add to global/skills/[category]/
  3. New Command: Add to global/commands/
  4. New Pattern: Add to global/patterns/full/ and update index.json

License

MIT License - See LICENSE file for details.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages