Claude Code Integration

Set up Kindship CLI hooks and skills for seamless Claude Code integration.

The Kindship CLI integrates with Claude Code through hooks and skills, enabling fully autonomous workflows.

Setup

Run kindship setup in your repository to automatically install:

  1. Hooks — Trigger on session start/stop
  2. Skills — Custom commands for task management
  3. Agent binding — Links the repo to your Kindship agent
cd your-project
kindship setup

Hooks

Hooks are installed in .claude/hooks/:

Start Hook

Triggered when Claude Code starts a session:

# .claude/hooks/start.yaml
name: kindship-start
trigger: start
command: kindship hook start

Provides Claude with:

  • Current active task details
  • Task context and success criteria
  • Agent configuration

Stop Hook

Triggered when Claude Code ends a session:

# .claude/hooks/stop.yaml
name: kindship-stop
trigger: stop
command: kindship hook stop
args:
  - --summary-file
  - "{{summary_file}}"

Reports:

  • Session summary
  • Files modified
  • Task progress

Skills

Skills are installed in .claude/skills/:

# .claude/skills/kindship.yaml
name: kindship
commands:
  - name: next
    description: Get next work item from Kindship
    command: kindship run next --format json

  - name: complete
    description: Mark current task complete
    command: kindship run complete {{task_id}}

  - name: status
    description: Show current task status
    command: kindship status --format json

Claude can invoke these with /kindship next, /kindship complete, etc.

Autonomous Workflow

With hooks and skills configured, Claude Code can work autonomously:

  1. Session starts → Hook provides current task
  2. Claude works → Implements the task requirements
  3. Task complete → Claude calls /kindship complete
  4. Next task → Claude calls /kindship next
  5. Session ends → Hook reports summary

Manual Commands

You can also control the flow manually:

# Get next task (shows task details)
kindship run next

# Get next task as JSON (for scripting)
kindship run next --format json

# Mark task complete with notes
kindship run complete --outputs "Implemented OAuth flow with Google and GitHub"

# Check current status
kindship status

Environment Variables

The CLI respects these environment variables:

VariableDescription
KINDSHIP_API_URLCustom API endpoint
KINDSHIP_SERVICE_KEYService key for container mode
AGENT_IDOverride active agent

Troubleshooting

Hooks not triggering

Ensure Claude Code is updated to a version that supports hooks:

claude --version

Permission errors

Check that hook files are executable:

chmod +x .claude/hooks/*.yaml

Agent not found

Verify your repository is linked:

kindship status

If not linked, run kindship setup again.