Back to The Times of Claw

DenchClaw + Cursor: AI CRM Meets AI Code Editor

Mark Rachapoom
Mark Rachapoom
·8 min read
DenchClaw + Cursor: AI CRM Meets AI Code Editor

DenchClaw + Cursor: AI CRM Meets AI Code Editor

Cursor is where you write code. DenchClaw is where you manage relationships — with customers, clients, and partners. Used together, they create a workflow where your CRM data informs your code and your code extends your CRM. This guide covers how to make them work together practically.

The Basic Setup#

You don't need any special plugin or bridge to start using DenchClaw alongside Cursor. Both run locally. Open your DenchClaw workspace in Cursor as a folder:

cursor ~/.openclaw-dench/workspace

This gives you full IDE access to:

  • workspace.duckdb — your CRM database
  • skills/ — installed skill files you can read and edit
  • apps/ — any Dench apps you've built
  • config.json — gateway and integration configuration
  • objects/ — YAML schema definitions for your CRM objects
  • docs/ — workspace documents and notes

With Cursor's AI-assisted editing, you can navigate and modify these files faster than in any file browser.

Using DenchClaw as a CRM for Your Codebase#

Technical founders and agencies often manage multiple client projects simultaneously. DenchClaw handles this naturally — it's just data. Create a project object to track your active codebases:

openclaw message "Create a 'project' object with fields: name, repo_url, client, status (active/paused/shipped), tech_stack, next_milestone, notes"

Now every client project has a record. Link it to the company entry:

openclaw message "Add a project entry: name='Dashboard Rebuild', repo_url='https://github.com/acme/dashboard', client='Acme Corp', status=active, tech_stack='Next.js, DuckDB', next_milestone='Beta launch March 30'"

Then query from your terminal while you're in Cursor:

openclaw db query "SELECT p.name, p.repo_url, p.next_milestone, c.name as client FROM v_project p JOIN v_company c ON c.id = p.client_id"

You can even ask your agent about your work while coding:

openclaw message "Which client projects are due for a milestone this week?"

Editing DenchClaw Configs in Cursor#

The DenchClaw workspace is just files. Cursor makes it easy to work with YAML and JSON configs with AI assist.

Object Schema Files#

DenchClaw objects are defined in .object.yaml files. Open one in Cursor:

# objects/deal.object.yaml
name: deal
displayName: Deal
icon: briefcase
fields:
  - key: name
    type: text
    required: true
  - key: value
    type: number
    label: Deal Value ($)
  - key: stage
    type: select
    options: [prospect, qualified, proposal, negotiation, closed_won, closed_lost]
  - key: close_date
    type: date
  - key: company
    type: relation
    relatesTo: company

With Cursor's autocomplete, adding new fields is fast. Ask Cursor's AI: "Add a probability field (number, 0-100) and a source field (select: inbound, outbound, referral, partner)" and it'll fill in the correct YAML structure.

Config Editing#

config.json governs gateway settings, integrations, and model preferences. Cursor's JSON support with schema validation helps you avoid syntax errors. Install the JSON schema extension (see VS Code section for extensions that work in Cursor too) and point it at DenchClaw's config schema.

Writing Custom Skills in Cursor#

Skills are the extension system for DenchClaw. They're markdown files with instructions the agent follows. Cursor is an excellent environment for writing them.

A skill lives in ~/.openclaw-dench/workspace/skills/<skill-name>/SKILL.md. Create a new one:

mkdir -p ~/.openclaw-dench/workspace/skills/github-issues
cursor ~/.openclaw-dench/workspace/skills/github-issues/SKILL.md

The structure:

# GitHub Issues Skill
 
## What This Skill Does
Fetches GitHub issues for a given repo and creates entries in DenchClaw.
 
## When to Use
When asked to "sync GitHub issues" or "import issues from [repo]".
 
## Steps
1. Use the `gh` CLI to list open issues:
   `gh issue list --repo {repo} --json number,title,body,labels,assignees --limit 100`
2. For each issue, create or update an entry in DenchClaw with object type `issue`
3. Map fields: title → name, body → description, labels → tags, assignees → assignee
 
## Required Fields
- repo: GitHub repo in "owner/repo" format (e.g. "vercel/next.js")
 
## Example Usage
"Sync GitHub issues from vercel/next.js"

With Cursor AI, you can ask it to help write the skill logic, generate example SQL queries, or expand on edge cases. The markdown format means Cursor's AI is operating in its native language.

Building Dench Apps in Cursor#

Dench Apps are self-contained web applications that live in your workspace and have access to DuckDB. They're the right format for dashboards, reports, or internal tools.

An app is a folder with a .dench.yaml manifest and a public/ directory:

apps/
  pipeline-dashboard/
    .dench.yaml
    public/
      index.html
      app.js
      style.css

The manifest:

# .dench.yaml
name: pipeline-dashboard
displayName: Pipeline Dashboard
description: Visual pipeline tracker
entrypoint: public/index.html
permissions:
  - db:read
  - db:write

app.js can call the DenchClaw platform API:

// Fetch deals from DuckDB via platform API
const deals = await Dench.db.query(`
  SELECT stage, count(*) as count, sum(CAST(value AS DECIMAL)) as total
  FROM v_deal
  GROUP BY stage
`);

Building an app in Cursor is fast because Cursor's AI understands the HTML/JS/CSS stack and can help you wire up Chart.js visualizations, data tables, or interactive filters. Start with the prompt:

Build me a pipeline dashboard app that shows deals by stage as a bar chart,
with a table below showing individual deals. Use Chart.js for the chart.

Cursor generates the code; you review and ship it to your DenchClaw workspace.

The gstack Workflow with Cursor#

The gstack workflow (from the gstack skill) structures development into stages: Think → Plan → Build → Review → Test → Ship → Reflect. It's designed for AI-assisted development and pairs naturally with Cursor.

DenchClaw tracks the projects; Cursor executes the code. The workflow:

  1. Think: Ask DenchClaw about the client's requirements. "What are the open feature requests for Acme Corp?"
  2. Plan: Use Cursor's chat to design the implementation. Have it generate a task breakdown.
  3. Build: Code in Cursor. Ask Cursor to write tests, handle edge cases, implement the feature.
  4. Review: DenchClaw stores the PR URL and review notes in the project entry.
  5. Ship: Update DenchClaw. "Mark the 'Dashboard Rebuild' milestone as complete, set next milestone to 'GA launch April 15'."
  6. Reflect: Log lessons learned as a note on the project or company entry.

The key insight: DenchClaw is your persistent memory across projects and clients. Cursor is your execution environment. Both are AI-native. Both run locally.

MCP Integration: DenchClaw Data in Cursor#

MCP (Model Context Protocol) is how AI tools share context. If you've set up DenchClaw's MCP server (covered in detail in the DenchClaw + MCP guide), you can expose your CRM data directly to Cursor's AI.

This means when you're coding in Cursor, you can ask questions like:

  • "What's the tech stack for the Acme project?" (Cursor pulls from DenchClaw via MCP)
  • "Who's the main contact at Acme?" (Cursor looks it up in your CRM)
  • "What's the deadline for this milestone?" (Cursor reads from your DenchClaw projects)

Configure the MCP server in Cursor's settings:

// cursor settings → mcp → add server
{
  "name": "denchclaw",
  "url": "http://localhost:3000/mcp",
  "apiKey": "your-denchclaw-token"
}

Now Cursor's AI has access to your CRM context when generating code. If you're building a customer dashboard, it can auto-fill the client's name, preferences, and branding notes from DenchClaw records.

Developer Workflow That Uses Both Tools#

Here's a concrete daily workflow:

Start of day:

openclaw gateway start
openclaw message "Morning briefing: what projects have deadlines this week, any client notes from yesterday?"
cursor ~/.openclaw-dench/workspace  # review configs, update skills if needed

During a coding session:

  • Work in Cursor on the project
  • When you finish a feature, update DenchClaw: openclaw message "Log: finished OAuth integration for Acme project. 2 hours. Blocked: waiting for their API keys"
  • Ask questions: openclaw message "Has Acme sent their API keys yet?" (agent checks your notes/emails)

End of day:

openclaw message "End of day log: completed OAuth, waiting on API keys from Acme, plan to resume tomorrow. Total billable today: 4h"

The log notes get stored as document entries in DenchClaw. Over time, you build a rich history of every client interaction, code decision, and time log — queryable in plain English.

The Bottom Line#

Cursor and DenchClaw occupy different parts of your workflow, but they complement each other because they share two key properties: both are AI-native and both run locally. Your data doesn't leave your machine. Your AI context is rich. Your workflow doesn't depend on cloud services staying up.

If you're a developer managing clients, projects, or a SaaS — this combination covers your bases.

Ready to try DenchClaw? Install in one command: npx denchclaw. Full setup guide →

Mark Rachapoom

Written by

Mark Rachapoom

Building the future of AI CRM software.

Continue reading

DENCH

© 2026 DenchHQ · San Francisco, CA