ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

focusnote-add-to-daily-note

Add text to today's daily note in FocusNote as a new bullet point

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/trongnguyen29/focusnoteapp
Or

FocusNote: Add to Daily Note

This skill adds user-provided text to today's daily note in FocusNote as a new bullet point.

How It Works

  1. Reads the FocusNote documents path from ~/.lucia/documents-path.txt
  2. Generates today's date in YYYY-MM-DD format
  3. Locates or creates today's daily note
  4. Adds the user's text as a new bullet point
  5. Updates the document's JSON structure files

Prerequisites

  • FocusNote app must be running (it creates ~/.lucia/documents-path.txt on startup)
  • Node.js installed for running the helper script

Implementation

When the user asks to add text to their daily note, follow these steps:

Step 1: Read Documents Path

const fs = require("fs");
const path = require("path");
const os = require("os");

// Read the documents path from FocusNote's config file
const focusnoteConfigPath = path.join(
  os.homedir(),
  ".lucia",
  "documents-path.txt",
);
const documentsPath = fs.readFileSync(focusnoteConfigPath, "utf-8").trim();

Step 2: Generate Today's Date

const today = new Date();
const year = today.getFullYear();
const month = String(today.getMonth() + 1).padStart(2, "0");
const day = String(today.getDate()).padStart(2, "0");
const todayDocName = `${year}-${month}-${day}`;

Step 3: Locate Daily Note Folder

const dailyNotePath = path.join(documentsPath, "notes", todayDocName);
const structurePath = path.join(dailyNotePath, "_structure.json");
const metadataPath = path.join(dailyNotePath, "_metadata.json");
const nodesDir = path.join(dailyNotePath, ".nodes");

Step 4: Create Daily Note If It Doesn't Exist

if (!fs.existsSync(dailyNotePath)) {
  // Create directory structure
  fs.mkdirSync(dailyNotePath, { recursive: true });
  fs.mkdirSync(nodesDir, { recursive: true });

  // Create metadata
  const metadata = {
    name: todayDocName,
    createdAt: Date.now(),
    updatedAt: Date.now(),
  };
  fs.writeFileSync(metadataPath, JSON.stringify(metadata, null, 2));

  // Create empty structure
  const structure = {
    rootNodeIds: [],
    deletedNodeIds: [],
    nodes: {},
  };
  fs.writeFileSync(structurePath, JSON.stringify(structure, null, 2));
}

Step 5: Create New Bullet Node

const { v4: uuidv4 } = require("uuid"); // npm install uuid

// Generate unique node ID
const nodeId = uuidv4();
const timestamp = Date.now();

Metadata

Stars946
Views0
Updated2026-02-13
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-trongnguyen29-focusnoteapp": {
      "enabled": true,
      "auto_update": true
    }
  }
}
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.