Thanks to visit codestin.com
Credit goes to github.com

Skip to content

front-depiction/claude-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Claude Code Configuration

This repository IS the .claude configuration directory for Effect TypeScript projects following functional programming principles.

๐Ÿš€ Usage

Clone this repository directly as the .claude directory in your Effect TypeScript projects:

# Clone directly into your project as .claude
cd /path/to/your/project
git clone <repo-url> .claude

# Or use as a git submodule
git submodule add <repo-url> .claude

# Or copy if you prefer not to use git
cp -r /path/to/claude-setup /path/to/your/project/.claude

After cloning, your project structure will be:

your-project/
โ”œโ”€โ”€ .claude/           # This repository
โ”‚   โ”œโ”€โ”€ agents/
โ”‚   โ”œโ”€โ”€ hooks/
โ”‚   โ”œโ”€โ”€ skills/
โ”‚   โ””โ”€โ”€ settings.json
โ”œโ”€โ”€ src/               # Your code
โ””โ”€โ”€ package.json

๐Ÿ“ Repository Structure

This repository contains:

claude-setup/              (clones into your-project/.claude/)
โ”œโ”€โ”€ agents/               # Specialized subagents
โ”‚   โ”œโ”€โ”€ domain-modeler.md       # ADT domain modeling with MCP
โ”‚   โ”œโ”€โ”€ effect-expert.md        # Services & layers with MCP
โ”‚   โ”œโ”€โ”€ spec-writer.md          # Spec-driven development
โ”‚   โ”œโ”€โ”€ react-expert.md         # Compositional React patterns
โ”‚   โ””โ”€โ”€ test-writer.md          # Effect testing patterns
โ”œโ”€โ”€ skills/               # Reusable capabilities
โ”‚   โ”œโ”€โ”€ typeclass-design/       # Typeclass implementation patterns
โ”‚   โ”œโ”€โ”€ domain-predicates/      # Predicate and Order generation
โ”‚   โ”œโ”€โ”€ service-implementation/ # Service design patterns
โ”‚   โ”œโ”€โ”€ layer-design/           # Layer composition patterns
โ”‚   โ”œโ”€โ”€ context-witness/        # Witness vs Capability patterns
โ”‚   โ””โ”€โ”€ atom-state/             # Effect Atom patterns
โ”œโ”€โ”€ commands/             # Custom slash commands
โ”‚   โ”œโ”€โ”€ mailboxes.md            # Agent mailbox management
โ”‚   โ”œโ”€โ”€ request.md              # Inter-agent messaging
โ”‚   โ”œโ”€โ”€ await-mailbox.md        # Message waiting
โ”‚   โ””โ”€โ”€ parallelize.md          # Parallel agent execution
โ”œโ”€โ”€ coordination/         # Multi-agent coordination
โ”‚   โ””โ”€โ”€ mailboxes/              # Agent communication
โ”œโ”€โ”€ hooks/                # Hook implementations
โ”‚   โ”œโ”€โ”€ agent-init.sh/ts        # Session startup context injection
โ”‚   โ”œโ”€โ”€ skill-suggester.sh/ts   # Dynamic skill suggestions
โ”‚   โ””โ”€โ”€ stop-await-mailbox.sh/ts # Mailbox coordination
โ”œโ”€โ”€ scripts/              # Utility scripts
โ”‚   โ”œโ”€โ”€ request.sh              # Send inter-agent messages
โ”‚   โ”œโ”€โ”€ await-mailbox.sh        # Wait for messages
โ”‚   โ”œโ”€โ”€ mailboxes.sh            # List all mailboxes
โ”‚   โ””โ”€โ”€ close-mailbox.sh        # Close mailboxes
โ”œโ”€โ”€ docs/                 # Reference documentation
โ”‚   โ”œโ”€โ”€ project-guide.md        # Project instructions
โ”‚   โ””โ”€โ”€ clean-code-guide.md     # Complete patterns guide
โ””โ”€โ”€ settings.json         # Claude Code configuration

๐ŸŽฏ Specialized Agents

Claude automatically invokes the appropriate agent based on your task:

domain-modeler

Creates type-safe domain models with:

  • ADT unions for valid states
  • Branded/nominal types
  • Comprehensive predicates
  • Order instances for sorting
  • Typeclass integration
  • Effect Docs: View the git subtree in .context/effect/ for best practices

effect-expert

Implements Effect infrastructure:

  • Fine-grained service capabilities
  • Layer composition
  • Dependency injection
  • Error handling
  • Effect Docs: View the git subtree in .context/effect/ for patterns

spec-writer

Manages spec-driven workflow:

  • Instructions โ†’ Requirements โ†’ Design โ†’ Plan
  • Requires approval at each phase
  • Prevents premature implementation

react-expert

Compositional React patterns:

  • Component composition over configuration
  • No boolean props
  • Effect Atom integration
  • State lifting patterns

test-writer

Testing strategies:

  • @effect/vitest for Effect code
  • Regular vitest for pure functions
  • Service testing with layers

๐Ÿ”ง Skills

Skills extend agents with focused capabilities:

  • typeclass-design: Curried signatures, dual APIs
  • domain-predicates: Complete predicate/order sets
  • service-implementation: Capability-based services
  • layer-design: Layer composition patterns
  • context-witness: Witness vs Capability decisions
  • atom-state: Effect Atom reactive state

๐ŸŽจ Effect Documentation

Both domain-modeler and effect-expert agents have access to the Effect documentation via the git subtree in .context/effect/.

This ensures implementations follow official Effect best practices.

๐Ÿ“š Reference Documentation

Full guides available in docs/:

  • docs/project-guide.md - Original project instructions
  • docs/clean-code-guide.md - Complete patterns and best practices

Agents access these automatically when needed.

๐Ÿ”„ Hooks

Automatic quality checks configured in settings.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "Edit|Write",
        "hooks": [
          {
            "type": "command",
            "command": "jq -r '.tool_input.file_path' | { read file_path; if echo \"$file_path\" | grep -qE '\\.(ts|tsx)$'; then bun run format && bun run lint && bun run typecheck; fi; }",
            "description": "Format, lint, and typecheck TypeScript files immediately after editing"
          }
        ]
      }
    ]
  }
}

How it works:

  • PostToolUse event: Triggers immediately after Edit/Write operations
  • File path extraction: Uses jq to get the modified file path from tool input
  • TypeScript filter: Only runs on .ts and .tsx files
  • Quality checks: Runs format โ†’ lint โ†’ typecheck in sequence
  • Provides immediate feedback on code quality issues

๐ŸŽฏ Development Workflow

  1. Ask Claude to perform a task
  2. Claude automatically:
    • Selects appropriate agent
    • Loads relevant skills
    • Accesses MCP docs if needed
    • Uses minimal context (2-10KB vs 104KB)
  3. Complete task efficiently with focused expertise

๐Ÿšฆ Quality Standards

After every file change:

bun run format
bun run typecheck

This is enforced in agent workflows.

๐Ÿ“– Examples

Creating a Domain Model

"Create an Appointment domain model with status, meeting type, date, and duration"

โ†’ Invokes domain-modeler agent (6-8KB context) โ†’ Uses domain-predicates skill โ†’ References Effect docs in .context/effect/ โ†’ Generates complete module with predicates and orders

Implementing a Service

"Implement a PaymentGateway service with handoff capability"

โ†’ Invokes effect-expert agent (7-9KB context) โ†’ Uses service-implementation and layer-design skills โ†’ References Effect docs in .context/effect/ โ†’ Creates focused capability with proper layer

Building React Component

"Create a message composer component"

โ†’ Invokes react-expert agent (7-9KB context) โ†’ Uses atom-state skill โ†’ Generates compositional structure with Effect Atom integration

๐Ÿ”ฎ Benefits

  • Specialized expertise per domain
  • Effect documentation access via git subtree in .context/effect/ for accuracy
  • Consistent patterns across projects
  • Reusable configuration for all projects
  • Automatic agent selection based on task

๐Ÿ“„ License

This configuration is designed for personal/team use. Adapt as needed for your projects.

๐Ÿค Contributing

To improve this configuration:

  1. Test patterns in real projects
  2. Update agents/skills based on learnings
  3. Keep documentation in sync with code

Context pollution solved. Specialized agents ready. Effect best practices enforced. ๐ŸŽ‰

About

Reusable Claude Code configuration for Effect TypeScript projects with specialized agents and skills

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •