Back to The Times of Claw

DenchClaw Power User Guide: Advanced Tips and Tricks

DenchClaw power user guide: advanced DuckDB queries, custom action fields, multi-object workflows, keyboard shortcuts, and expert tips for 2026.

Mark Rachapoom
Mark Rachapoom
·7 min read
DenchClaw Power User Guide: Advanced Tips and Tricks

DenchClaw Power User Guide: Advanced Tips and Tricks

After you've used DenchClaw for a few weeks, you start seeing patterns. You learn which prompts work best, which DuckDB queries unlock capabilities the UI doesn't show, and which workflows are worth automating. This guide collects the advanced techniques that separate basic users from power users.

Direct DuckDB Access#

Most users interact with DenchClaw through the AI. Power users query DuckDB directly when they need precision or performance.

Access the DuckDB shell:

duckdb ~/.openclaw-dench/workspace/workspace.duckdb

Or ask the AI to run raw SQL:

Run this SQL: SELECT "Company", COUNT(*) as count, SUM(CAST("Value" AS DOUBLE)) as total_arr FROM v_deals WHERE "Stage" = 'Closed Won' GROUP BY "Company" ORDER BY total_arr DESC LIMIT 10

Useful Power Queries#

Find duplicate contacts:

SELECT "Email", COUNT(*) as dupes
FROM v_people
WHERE "Email" IS NOT NULL AND "Email" != ''
GROUP BY "Email"
HAVING COUNT(*) > 1
ORDER BY dupes DESC;

Cross-object query — contacts with no deals:

SELECT p."Full Name", p."Email", p."Company"
FROM v_people p
LEFT JOIN v_deals d ON p."Company" = d."Company"
WHERE d."Deal Name" IS NULL
AND p."Status" = 'Customer';

Pipeline velocity — average days per stage:

-- Requires activity logging with stage transition dates
SELECT "Stage", AVG(days_in_stage) as avg_days
FROM stage_transitions
GROUP BY "Stage";

Monthly trend analysis:

SELECT 
  strftime(CAST("Last Contacted" AS DATE), '%Y-%m') as month,
  COUNT(*) as contacts_touched
FROM v_people
WHERE "Last Contacted" IS NOT NULL
GROUP BY month
ORDER BY month;

Advanced Action Fields#

Action fields run server-side scripts. Here's a production-grade pattern using Node.js:

// enrich-contact.js
const entry = {
  name: process.env.FIELD_FULL_NAME,
  company: process.env.FIELD_COMPANY,
  email: process.env.FIELD_EMAIL
};
 
// Stream status back to UI
const emit = (type, data) => console.log(JSON.stringify({ type, ...data }));
 
emit('progress', { message: `Searching for ${entry.company}...` });
 
try {
  const res = await fetch(`https://api.clearbit.com/v1/companies/find?domain=${emailDomain}`, {
    headers: { Authorization: `Bearer ${process.env.CLEARBIT_KEY}` }
  });
  const company = await res.json();
 
  emit('update', {
    fields: {
      Industry: company.category?.industry,
      'Company Size': company.metrics?.employeesRange,
      'Funding Stage': company.metrics?.raised ? 'Funded' : 'Bootstrapped'
    }
  });
  emit('success', { message: 'Enriched successfully' });
} catch (e) {
  emit('error', { message: e.message });
}

The action field schema in DenchClaw:

{
  "type": "action",
  "name": "Enrich",
  "script": "enrich-contact.js",
  "runtime": "node",
  "env": ["CLEARBIT_KEY"]
}

Multi-Object Workflows#

The most powerful DenchClaw use cases span multiple objects. Here are patterns that work:

The "contact upgrade" pattern: When a Lead's score hits 70+, automatically promote them to a full Contact and create a linked Deal:

When a lead's score is updated to 70 or above, automatically: create a Contact entry with their details, create a Deal entry with Stage=Discovery, link both to the lead, and notify me via Telegram

The "account health cascade" pattern: When a support ticket is marked as Unresolved after 7 days, automatically reduce the linked customer's Health Score and flag for CS review.

Every morning, check support tickets older than 7 days with Status = Unresolved. For each one, find the linked customer and reduce their Health Score by 10 points if it hasn't already been flagged.

The "weekly briefing" pattern:

Every Monday at 7am, generate a complete weekly brief:
1. Top 5 deals to close this week
2. Customer accounts at risk
3. Leads scored this week (top 10 by score)
4. Partner QBRs this month
5. Renewals coming up in 30 days
Send to Telegram.

Keyboard Shortcuts and UI Tips#

In the web UI at localhost:3100:

  • / key — jump to AI chat
  • Cmd+K — global search across all objects
  • Click any field value — inline edit mode
  • Drag kanban cards — updates stage field directly
  • Shift+click on column header — add secondary sort
  • Right-click on table row — quick actions menu

In Telegram, these prompt patterns work fastest:

/brief  — daily briefing
/add [type] [details]  — quick entry
/find [query]  — search
/update [entry] [field] [value]  — field update
/report [query]  — quick chart

View YAML Mastery#

Views are configured in .object.yaml. Advanced view patterns:

Date range filter:

filters:
  - field: Close Date
    operator: between
    start: "2026-04-01"
    end: "2026-06-30"

Nested OR conditions:

filters:
  - operator: or
    conditions:
      - field: Status
        operator: equals
        value: Lead
      - field: Status
        operator: equals
        value: Prospect

Computed column (show days since last contact):

computed_columns:
  - name: Days Since Contact
    formula: "DATEDIFF('day', CAST(\"Last Contacted\" AS DATE), CURRENT_DATE)"

Subagent Patterns#

For complex analysis or bulk operations, spawn subagents:

In the background: go through every contact in my database that has a LinkedIn URL, visit their profile, and add a note to their entry document summarizing their last 3 posts. Notify me when done.
Spawn a background agent to: import all emails from my Gmail "Sales" label from the last 30 days, extract any deal or contact mentions, and update the relevant records.

Subagents run in isolated sessions — your main conversation stays fast.

Template Variables#

DenchClaw supports template variables in documents and action field outputs:

{{Full Name}} — entry field value
{{date}} — current date
{{ai:summarize}} — AI-generated content
{{entry.Company.ARR}} — related object field

Use these in outreach templates, document templates, and report headers.

Performance Optimization#

For large databases (100k+ entries):

Add DuckDB indexes:

-- Speed up Status filter queries on People
CREATE INDEX idx_people_status 
ON entry_fields(entry_id)
WHERE field_id = (SELECT id FROM fields WHERE name = 'Status' AND object_id = ...);

Archive old entries:

Move all leads that were disqualified more than 1 year ago to an "Archive" status and exclude them from default views

Paginate exports:

Export my people database in batches of 1,000 to CSV files

The 10 Most Useful Daily Prompts#

  1. What needs my attention today? — consolidated action list
  2. Update [name] — [quick update text] — fast entry update
  3. Show me [view name] — jump to any view
  4. Create [object] [details] — fast entry creation
  5. Find [query] in [object] — fast search
  6. Remind me about [thing] in [time] — quick cron
  7. Log call with [name] — [summary] — interaction logging
  8. Score all new leads — batch operation
  9. What's my pipeline this week? — pipeline summary
  10. Build a quick chart showing [data question] — instant analytics

For the foundation, see zero to CRM. For the full platform overview, see what is DenchClaw.

Frequently Asked Questions#

Can I run DenchClaw in headless mode (no web UI)?#

Yes. The gateway runs headlessly and responds to messaging channels. The web UI is optional. Run openclaw gateway start and interact via Telegram only.

How do I back up my workspace automatically?#

Add a cron job: 0 2 * * * cp ~/.openclaw-dench/workspace/workspace.duckdb ~/backups/workspace-$(date +%Y%m%d).duckdb

Can I write custom views in raw SQL instead of YAML?#

Yes. Create a DuckDB view directly: CREATE VIEW v_hot_leads AS SELECT * FROM v_people WHERE "Status" = 'Lead' AND "Lead Score" > 70. It won't appear in the UI but you can query it directly.

How do I speed up AI responses for bulk operations?#

Use explicit batch instructions: "Do this for 20 records, report results in one message." Reduces round-trips. For very large batches, spawn a subagent.

What's the maximum number of objects I can create?#

No hard limit. DenchClaw has been tested with 50+ objects in a single workspace. Performance stays fast because each object maps to a DuckDB view, not a separate database.

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