Claude Code Integration

Learn how to integrate Lexicon5 with Claude Code for AI-powered task management using a skill-based approach.

Introduction

Claude Code is Anthropic's official CLI tool that brings Claude directly to your terminal. With Lexicon5 integration, you can manage tasks, projects, and resources using natural language commands.

Unlike Windsurf which uses MCP configuration in settings.json, Claude Code uses a skill-based approach. You download a configuration package that includes skills, agents, and commands that integrate directly with your project's .claude folder.

Key Difference from Windsurf: Claude Code does not require MCP server configuration in settings.json. Instead, it uses a .env file and a task-manager.mjs script that makes API calls to the Lexicon5 MCP endpoint.

Prerequisites

Before setting up the integration, ensure you have:

  • Claude Code installed via npm
  • A Lexicon5 account with an active project
  • Node.js installed (for running task-manager.mjs)
npm install -g @anthropic-ai/claude-code

Setup

Follow these steps to configure Claude Code with Lexicon5:

1

Select Your Project

In the Lexicon5 dashboard, use the project dropdown in the header to select the project you want to work with.

2

Generate API Key

Navigate to Project Settings by clicking on your project name. In the "View Details" tab, find the "API Keys" section and click "+ Generate Key".

Important: Copy your API key immediately after generation. It will not be shown again for security reasons.

3

Download Configuration Package

In the "Download Configuration Package" section of Project Settings, select the "Claude Code" tab and click "Download ZIP".

4

Install Configuration

Extract the downloaded ZIP file to your project root. This creates the .claude folder with all necessary configuration files.

# Extract to your project root
unzip lexicon5-claude-code.zip -d /path/to/your/project

# Verify the installation
ls -la .claude/

Configuration Package

The downloaded ZIP contains a complete configuration structure in the .claude folder:

.claude/
├── skills/
│   └── task-manager/
│       ├── .env              # Pre-configured credentials
│       ├── SKILL.md          # Skill documentation
│       ├── task-manager.mjs  # JavaScript script for API calls
│       └── references/
│           ├── Task-Template.md
│           ├── Example-Task-(RPG).md
│           └── tools.md
├── agents/
│   ├── lexicon5-developer.md
│   ├── lexicon5-qa-analyst.md
│   └── lexicon5-task-researcher.md
└── commands/
    ├── lexicon5-create-task.md
    ├── lexicon5-implement-task.md
    ├── lexicon5-issue-report.md
    └── lexicon5-init-nextjs-project.md

Environment Variables

The .claude/skills/task-manager/.env file contains your project credentials (pre-filled when downloaded):

MCP_BASE_URL

The Lexicon5 MCP endpoint URL

MCP_API_KEY

Your generated API key for authentication

MCP_USER_ID

Your Lexicon5 user ID

MCP_ORGANIZATION_ID

Your organization ID

MCP_PROJECT_ID

The selected project ID

Note: All values are automatically filled when you download the configuration package from the Lexicon5 dashboard. You do not need to manually configure these values.

Agents & Commands

The configuration package includes specialized agents and slash commands for workflow automation.

Agents

Agents are invoked automatically by Claude Code when relevant workflows are detected:

lexicon5-developerAgent

Implements tasks and subtasks from the task management system

Automatically invoked when implementing a task. Follows structured phases: load context, implement, verify, and hand off to QA.

lexicon5-qa-analystAgent

Creates comprehensive bug reports

Automatically invoked when reporting bugs. Researches the codebase, identifies affected files, and creates structured bug tasks with proper tagging.

lexicon5-task-researcherAgent

Researches features and creates implementation-ready tasks

Automatically invoked when planning new features. Conducts discovery, researches codebase patterns, and creates tasks with subtasks following RPG methodology.

Slash Commands

Use these slash commands to trigger specific workflows:

lexicon5-create-taskDescribe the feature

Create a new feature task

/lexicon5-create-task Add user profile page with avatar upload
lexicon5-implement-taskThe task name and ID to work on

Implement an existing task

/lexicon5-implement-task task_abc123: Fix login validation
lexicon5-issue-reportThe issue that has been discovered

Create a QA Bug Report task

/lexicon5-issue-report Login button not responding on mobile devices
lexicon5-init-nextjs-projectProject name

Initialize a new Next.js 16 project with the Lexicon5 tech stack

/lexicon5-init-nextjs-project my-new-app

Available Tools

The task-manager.mjs script provides direct access to Lexicon5 tools. Run commands from the .claude/skills/task-manager directory:

Task Operations

List tasks

# List all tasks (default: only todo and in_progress)
node task-manager.mjs get_tasks

# Filter by status
node task-manager.mjs get_tasks '{"status":"backlog"}'

# Multiple statuses
node task-manager.mjs get_tasks '{"statusIn":["backlog","todo","in_progress","qa"]}'

Get task details

# Get task with all details
node task-manager.mjs get_task '{"taskId":"task_abc"}'

# Get with subtask implementation details
node task-manager.mjs get_task '{"taskId":"task_abc","include":{"subtaskDetails":true}}'

Create and update tasks

# Create a new task
node task-manager.mjs create_task '{"title":"My task","description":"Task details"}'

# Update task status
node task-manager.mjs update_task '{"taskId":"task_abc","status":"in_progress"}'

Work with comments

# Add a comment to a task
node task-manager.mjs create_comment '{"taskId":"task_abc","content":"Progress update"}'

Subtask Operations

Work with subtasks

# Get subtask with implementation details
node task-manager.mjs get_subtask '{"subtaskId":"subtask_xyz"}'

# Mark subtask complete
node task-manager.mjs update_subtask '{"subtaskId":"subtask_xyz","completed":true}'

Tag Operations

Manage tags

# List all tags
node task-manager.mjs list_tags

# Create a new tag (find-or-create)
node task-manager.mjs create_tag '{"name":"Feature","color":"blue"}'

# Assign tag to task
node task-manager.mjs assign_tag '{"taskId":"task_abc","tagId":"tag_xyz"}'

Resource Operations

Work with resources

# List all resources
node task-manager.mjs --resources

# Read a specific resource
node task-manager.mjs --read-resource 'resource://project/xxx/resource/yyy'

# Create a resource
node task-manager.mjs create_resource '{"resourceTitle":"API Guidelines","content":"# Content..."}'

Token Optimization

Use the include parameter to control response size and reduce token usage:

Use CaseInclude Settings
Quick status check{"include":{"tags":false}}
Progress tracking{"include":{"subtasksSummary":true}}
Starting implementation{"include":{"subtaskDetails":true}}
Minimal overhead{"include":{"comments":false,"subtasks":false}}

Creating Tasks

You can create tasks in Lexicon5 using either natural language (free chat) or the dedicated slash command. Both approaches trigger the task-researcher agent to conduct discovery and create a comprehensive task.

Free Chat Approach

Simply describe what you need, and Claude will understand you want to create a task:

Creating a Task via Free Chat

U
I need to add a user profile page with avatar upload functionality
C
I'll create a task for this feature. Let me ask a few discovery questions first to ensure we capture all requirements:

1. Should users be able to crop their avatar before uploading?
2. What file formats should be supported (PNG, JPG, WebP)?
3. Is there a maximum file size limit?
U
Yes to cropping, support PNG and JPG, max 5MB
C
Perfect! I've researched your codebase and created a comprehensive task with 4 subtasks:

task_xyz123: Add user profile page with avatar upload
- Subtask 1: Create profile page component
- Subtask 2: Implement avatar upload with cropping
- Subtask 3: Add file validation (PNG/JPG, 5MB max)
- Subtask 4: Update user API endpoints

Slash Command Approach

Use the slash command to directly invoke the task creation workflow:

/lexicon5-create-task

Directly invoke the task-researcher agent to create a new feature task. The agent will conduct discovery, research your codebase, and create a task with implementation-ready subtasks.

Example:

/lexicon5-create-task Add dark mode support with system preference detection

Implementing Tasks

The developer agent follows a structured workflow to implement tasks: load context, implement code, verify with lint/build, and hand off to QA.

/lexicon5-implement-task

Start implementing an existing task. The developer agent retrieves task details, implements each subtask, runs verification, and moves the task to QA status when complete.

Example:

/lexicon5-implement-task task_abc123: Fix login validation bug

Implementation Workflow

The developer agent follows these phases:

  1. Load Context: Retrieves task details, subtasks, and implementation instructions
  2. Implement: Works through each subtask, following project patterns
  3. Verify: Runs pnpm lint and pnpm build to ensure quality
  4. Hand Off: Adds completion comment with test plan, moves task to QA status

Note: The developer agent never marks tasks as "done" - it always moves them to "qa" status for verification. Only QA can mark tasks complete.

Reporting QA Issues

When you discover a bug, use the issue report command to create a structured bug task. The QA analyst agent researches your codebase to identify affected files and creates a comprehensive report.

/lexicon5-issue-report

Report a bug or QA issue. The QA analyst agent researches your codebase, identifies affected files, and creates a structured bug task with the 'Bug' tag.

Example:

/lexicon5-issue-report Save button fails silently on mobile devices

What the QA Analyst Does

  • Researches your codebase to understand the affected area
  • Identifies specific files that may need modification
  • Creates a structured bug task with reproduction steps
  • Automatically applies the Bug tag
  • Includes technical context for developers

Autonomous Project Manager

Claude Code Exclusive: This feature is only available in Claude Code and is not supported in Windsurf. It creates a continuous agenting loop that automatically manages your project.

The autonomous project manager continuously monitors your task backlog and automatically spawns developer agents to work on tasks. This creates a hands-off development experience where work progresses without manual intervention.

/lexicon5-project-manager

Start the autonomous project manager loop. Continuously monitors your 'To Do' column and spawns developer agents to implement tasks automatically.

How It Works

  • Continuous monitoring: Scans for tasks in "todo" status
  • Max concurrency: Works on 2 tasks simultaneously
  • Progress checks: Reviews agent status every 5 minutes
  • Idle mode: Waits 15 minutes when no tasks available
  • Context management: Uses autocompact to manage context window

Example Log Output

The project manager provides detailed logging so you can monitor progress:

Project Manager Output
[LOOP START] Developer loop initialized at 2024-01-15 10:00:00
[SCAN] Checking for tasks in todo status...
[FOUND] 5 tasks in todo status
[SPAWN] Starting agent for task_abc123: "Add user settings page" (frontend)
[SPAWN] Starting agent for task_def456: "Fix API validation bug" (backend)
--- Waiting 5 minutes ---
[CHECK] Checking agent progress...
[COMPLETE] task_def456 completed successfully
[SCAN] Checking for tasks in todo status...
[FOUND] 4 tasks in todo status
[SPAWN] Starting agent for task_ghi789: "Update dashboard layout"
--- Waiting 5 minutes ---
[CHECK] Checking agent progress...
[COMPLETE] task_abc123 completed successfully
[COMPLETE] task_ghi789 completed successfully
[SCAN] Checking for tasks in todo status...
[FOUND] 0 tasks in todo status
[IDLE] No tasks in todo status. Waiting 15 minutes...

Important: The project manager runs continuously until stopped. Failed tasks are left in their current state for manual review. Use Ctrl+C to stop the loop.

Slash Commands Reference

Complete reference of all available slash commands:

CommandDescriptionAgent
/lexicon5-create-taskCreate a new feature task with discovery and subtaskstask-researcher
/lexicon5-implement-taskImplement an existing task with verificationdeveloper
/lexicon5-issue-reportReport a bug with codebase researchqa-analyst
/lexicon5-project-managerStart autonomous project management loopproject-manager
/lexicon5-init-nextjs-projectInitialize new Next.js 16 project with Lexicon5 tech stackinit

Free Chat Examples

You can interact with Lexicon5 using natural language. Here are examples of common queries and operations:

Querying Tasks

U
What tasks are assigned to me?
C
I found 3 tasks assigned to you:

1. task_abc - "Add user settings page" (In Progress)
2. task_def - "Fix login validation" (To Do)
3. task_ghi - "Update dashboard layout" (To Do)

Would you like details on any of these?

Filtering by Tags

U
Show me all high priority bugs
C
I found 2 tasks with the Bug tag:

1. task_xyz - "Login fails on Safari" - assigned to @john
2. task_uvw - "Data loss on form submit" - unassigned

Would you like me to assign the unassigned bug to someone?

Quick Status Updates

U
Move task_abc to in progress
C
Done! I've updated task_abc ("Add user settings page") status from "To Do" to "In Progress".

Project Overview

U
Give me a summary of the project status
C
Here's your project overview:

Backlog: 12 tasks
To Do: 5 tasks
In Progress: 3 tasks
QA: 2 tasks
Done: 28 tasks

The team has completed 56% of total tasks. There are 2 bugs in the backlog that may need prioritization.

Free Chat vs Slash Commands

Understanding when to use each approach will help you work more efficiently with Lexicon5.

Use Free Chat When...

  • Asking questions about your project
  • Making quick status updates
  • Exploring tasks without knowing exact IDs
  • Having a conversational interaction
  • You want Claude to figure out what you need

Use Slash Commands When...

  • Starting a structured workflow
  • You want consistent, predictable behavior
  • Working through a specific process
  • The task needs specialized agent behavior
  • Running the autonomous project manager

Comparison Table

ScenarioFree ChatSlash Command
Create feature task"I need a task for dark mode"/lexicon5-create-task Add dark mode
Quick query"What bugs are open?"N/A - use free chat
Start implementation"Work on task_abc"/lexicon5-implement-task task_abc
Report bug"The login is broken"/lexicon5-issue-report Login fails
Autonomous workN/A - requires slash command/lexicon5-project-manager

Examples

Here are some realistic workflow examples using Claude Code with Lexicon5:

Creating a Feature Task

/lexicon5-create-task Add user profile page with avatar upload

Claude Code launches the task-researcher agent to conduct discovery, research the codebase, and create a comprehensive task with subtasks.

Implementing a Task

/lexicon5-implement-task task_abc123: Add user authentication

Claude Code launches the developer agent to retrieve task details, implement the feature, run verification, and move the task to QA.

Reporting a Bug

/lexicon5-issue-report Login form shows error on valid credentials

Claude Code launches the QA analyst agent to research the codebase, identify affected files, and create a structured bug report with proper tagging.

Conversation Examples

U

What tasks are assigned to me?

C

I found 3 tasks in progress. The highest priority is 'Implement user authentication' which has 2 of 4 subtasks completed...

U

I need to add pagination to the user list

C

I'll create a task for this feature. Let me ask a few questions to understand the requirements better: What should be the default page size? Should we support infinite scroll as an option?

Task Lifecycle Workflow

A complete workflow from task creation to completion:

  1. Create task: /lexicon5-create-task Add dark mode support
  2. View task details: get_task with taskId
  3. Start implementation: /lexicon5-implement-task task_xyz
  4. Developer agent adds progress comments during development
  5. Developer agent marks subtasks complete as work progresses
  6. Developer agent moves task to QA status with test plan
  7. QA verifies and marks task as done

Troubleshooting

Common issues and solutions:

.env File Not Found

Ensure you extracted the ZIP to your project root. The .env file should be at .claude/skills/task-manager/.env. When running commands, make sure you are in the .claude/skills/task-manager directory.

API Key Invalid

Generate a new API key from Project Settings in the Lexicon5 dashboard. Download a fresh configuration package to get pre-filled credentials.

Command Not Found (node task-manager.mjs)

Ensure Node.js is installed (verify with 'node --version'). Make sure you are running commands from the .claude/skills/task-manager directory.

Tasks Not Loading

Verify MCP_PROJECT_ID in .env matches your current project. Check that you have tasks in the selected project. Try downloading a fresh configuration package.

Permission Denied

Ensure your API key has access to the project. API keys are scoped to the project they were generated for. Generate a new key if accessing a different project.

Skill Not Recognized by Claude Code

Restart Claude Code after extracting the configuration. Verify that SKILL.md exists in .claude/skills/task-manager/. Check that the .claude folder is in your project root.