claudekit

repository·main·Indexed 20 days ago

https://github.com/carlrannaberg/claudekit

CLI tools for Claude Code development workflow (v0.9.5) providing smart guardrails and automation. It features slash commands for git checkpoints and specification creation, automated hooks for real-time validation (TypeScript, ESLint), and specialized AI subagents for domains like React, TypeScript, and Infrastructure. Includes a CLI for environment setup, component management, and prompt extraction for use with external LLMs.

Tokens
258.8K
Snippets
725
Records
1.1K
Agent score
70%

What's inside claudekit

  1. Overview of claudekit

    main

    claudekit is a toolkit of custom commands, hooks, and utilities designed specifically for Claude Code. It enhances the development workflow by providing reusable prompts, event-driven automation, and specialized AI assistants.

    Core Components

    • Commands: Slash commands that provide reusable prompts and workflows.
    • Hooks: Event-driven automation that runs during development (e.g., TypeScript type checking, ESLint linting).
    • Subagents: Specialized AI assistants with deep domain expertise (e.g., webpack-expert, react-expert).

    Key Features

    • Slash Commands: Commands like /checkpoint:create, /git:status, and /spec:create for common tasks.
    • Automated Hooks: Real-time validation for TypeScript, ESLint, and testing.
    • AI Subagents: Domain-specific experts for Build Tools, TypeScript, React, Testing, and Infrastructure.
  2. NestJS Expert Research Scope and Problem Areas

    main

    This research report defines the scope of NestJS expertise and identifies the most frequent and complex problems encountered in enterprise Node.js development using NestJS.

    Scope: Covers module architecture, dependency injection, decorators, middleware, guards, testing, database integration, and authentication.

    High Priority Problem Areas:

    • Dependency Injection Resolution: Issues following the "can't resolve dependencies" pattern.
    • Circular Dependencies: Critical priority issues involving module loops.
    • Testing Module Configuration: Difficulty resolving dependencies within test suites.
    • TypeORM/Database Connection Issues: Connection and metadata registration problems.
    • JWT Authentication Problems: Errors such as "unknown strategy jwt" and 401 unauthorized responses.
  3. Understand the claudekit Reports Directory structure

    main
    The reports/ directory serves as the central repository for all project documentation regarding feature development, testing, performance, and validation. It is used to track development history, ensure quality assurance, monitor performance over time, and preserve technical decisions as a knowledge base.
  4. Overview of Claudekit Git Workflow commands

    main

    Claudekit provides a suite of specialized git workflow commands designed to optimize AI-assisted development with Claude Code. These commands ensure that branch management, commits, and pushes follow project conventions and include safety checks.

    Key commands include:

    • /git:checkout: Manages branches using conventional naming.
    • /git:commit: Creates commits that follow project-specific conventions.
    • /git:push: Performs push operations with built-in pre-flight checks.
    • /git:status: Provides detailed status reports with actionable insights.
    • /git:ignore-init: Manages .gitignore files specifically for Claude Code projects.
  5. Overview of Claudekit Hooks

    main
    Claudekit features an embedded hooks system designed to enhance the Claude Code development workflow. Unlike standard shell scripts, these hooks are built into the claudekit-hooks executable, offering cross-platform compatibility (Windows, macOS, Linux), automatic package manager detection (npm, yarn, pnpm), rich error reporting with fix suggestions, zero configuration, and high performance via built-in caching.
  6. Manage Claude Code settings in .claude directory

    main

    The .claude directory manages configuration for Claude Code. It distinguishes between shared team settings and personal local overrides:

    Version Controlled (Commit these)

    • .claude/settings.json: Shared team settings for hooks, tools, and environment.
    • .claude/commands/*.md: Custom slash commands available to the team.
    • .claude/hooks/*.sh: Hook scripts for automated validations (must be executable via chmod +x).

    Ignored (Do NOT commit)

    • .claude/settings.local.json: Personal preferences and local overrides. This is automatically added to .gitignore by Claude Code.
  7. How claudekit components work together

    main

    claudekit operates through three interconnected abstractions that automate and enhance the Claude Code experience:

    1. Commands (Slash Commands): These are user-invoked workflows. You trigger them manually in the Claude Code interface to perform specific tasks like generating specifications or creating git checkpoints.
    2. Hooks (Automated Hooks): These are reactive. They listen for development events (like file changes) and automatically run validations such as linting or type checking without manual invocation.
    3. Subagents (Specialized Assistants): These are task-oriented experts. When a complex domain-specific problem arises, you can invoke a subagent to provide deeper reasoning and specialized knowledge.

    All components are designed to be self-contained, project-agnostic, and highly configurable.

  8. Use the cli-expert agent for CLI and npm development

    main

    The cli-expert agent is a specialist in command-line interface and npm package development. It follows the Unix philosophy and includes automatic project root detection. Use this agent for CLI tool development, npm package creation, argument parsing, and implementing interactive or non-interactive modes.

    Available Tools:

    • All available tools
  9. Troubleshoot NestJS Module Architecture and Dependency Injection

    main

    When working with NestJS modules, focus on these key areas to ensure a stable architecture:

    • Check module structure: Verify that modules are correctly organized and that all necessary providers are declared.
    • Identify circular dependencies: Look for modules that depend on each other, which can be mitigated using forwardRef() (though use with caution).
    • Debug dependency tokens: Resolve "can't resolve dependencies" errors by verifying that providers are correctly registered in the appropriate modules and that injection tokens match.
  10. How the Multi-Agent Research Workflow works

    main

    The /research command orchestrates a multi-agent system to conduct research and synthesize findings. The workflow follows these stages:

    1. Query Classification: A Lead Agent (Claude Opus) classifies the query as Breadth-First (5-10 agents), Depth-First (2-4 agents), or Simple Factual (1-2 agents).
    2. Parallel Agent Spawning: The Lead Agent spawns multiple research-expert agents (Sonnet) in parallel using the Task tool. Agents are assigned specific modes via trigger words:
      • "Quick check:": 3-5 searches.
      • "Investigate:": 5-10 searches.
      • "Deep dive:": 10-15 searches.
    3. Filesystem Artifacts: To save tokens, agents write their full findings to /tmp/research_[date]_[topic].md and only return a brief summary and file path to the Lead Agent.
    4. Synthesis: The Lead Agent reads all artifact files, merges and deduplicates the information, and generates a final report at /tmp/research_final_[timestamp].md.
  11. Implement MongoDB Data Modeling Patterns

    main

    Use these patterns to optimize document structure for specific use cases:

    • Attribute Pattern: Store varying attributes in key-value pairs to handle heterogeneous data.
    • Bucket Pattern: Group time-series data into buckets to improve efficiency and reduce index size.
    • Outlier Pattern: Handle exceptional cases (e.g., extremely large documents) separately from normal data to prevent performance degradation.
    • Computed Pattern: Pre-calculate and store frequently accessed derived values to avoid expensive runtime calculations.
    • Subset Pattern: Keep frequently accessed data in the main document while moving less frequent data to separate collections.