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: Fetch and claim the next work item from Kindship
    command: kindship run local-next

  - name: complete
    description: Mark current task complete
    command: kindship run local-complete

  - name: fail
    description: Mark current task failed
    command: kindship run local-fail --reason "{{reason}}"

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

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:

# Fetch + claim the next task (prints assignment markdown)
kindship run local-next

# Mark current task complete
kindship run local-complete

# Mark current task failed with a reason
kindship run local-fail --reason "Dependency missing; needs clarification"

# 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.