AGENT SKILL

presence-pulse

Charisma and presence coach. Scores spoken audio across 5 dimensions (Confidence, Warmth, Clarity, Energy, Authority), returns a radar-ready JSON payload, and identifies the top strength and primary growth area.

License 许可
MIT
最近更新
2026-09-04
Stars
★ 0
Forks
0

01 前言 Front Matter

name
presence-pulse
author
rabbit-r1-skillz
version
1.0.0
description
Charisma and presence coach. Scores spoken audio across 5 dimensions (Confidence, Warmth, Clarity, Energy, Authority), returns a radar-ready JSON payload, and identifies the top strength and primary growth area.

02 资源文件 3

03 SKILL.md 正文

PresencePulse — OpenClaw Skill

PresencePulse is the backend skill that powers the PresencePulse R1 Creation. The Creation captures 30 seconds to 5 minutes of spoken audio via push-to-talk (PTT), converts it to a transcript using the R1's on-device STT, then ships the transcript to this skill for dimensional scoring. The skill uses an LLM to evaluate the speech across five charisma dimensions and returns a JSON payload with per-dimension scores (0–100), a composite weighted score, the top strength, and the primary growth area. Results appear on the R1's radar chart and are stored in session history for trend analysis.

How it works

  1. User holds PTT on the R1 to begin recording (30 s minimum, 5 min maximum).
  2. The R1 transcribes speech in real time using on-device STT (CreationVoiceHandler).
  3. On PTT release, the Creation builds an analysis prompt and calls R1.ocSend('presence-pulse', 'analyze-presence', payload).
  4. OpenClaw (running on your local machine) dispatches the payload to this skill.
  5. The skill sends the transcript and prompt to an LLM, parses the five scores from the response, and writes the result to the shared storage response key.
  6. The R1 reads the response within the 35-second timeout and renders the radar chart, bar scores, and spoken summary.

If the skill is unreachable or the response times out, the Creation falls back to heuristic scoring computed on-device.

Commands

Command Trigger Description
analyze-presence Automatic — end of each PTT recording Scores a transcript across 5 charisma dimensions and returns a JSON payload

Prerequisites

Required

  • Node.js 18+ on your local machine
  • OpenClaw CLI installed and running (openclaw serve)
  • An Anthropic API key for LLM scoring (or an OpenAI key — see Configuration)
  • This skill registered in ~/.openclaw/openclaw.config.json

Network

Both your R1 device and local machine must be on the same network. OpenClaw communicates through its shared-storage bridge; no direct TCP connection to the device is required.

Skill installation

1. Install dependencies

cd ~/.openclaw/skills/presence-pulse
npm install @anthropic-ai/sdk dotenv

2. Configure environment

Create ~/.openclaw/skills/presence-pulse/.env:

# Required — LLM scoring
ANTHROPIC_API_KEY=sk-ant-...

# Optional — use OpenAI instead of Anthropic
# OPENAI_API_KEY=sk-...
# OPENAI_MODEL=gpt-4o-mini

# Optional — override the default Anthropic model
# ANTHROPIC_MODEL=claude-haiku-4-5-20251001

3. Register the skill

Add to ~/.openclaw/openclaw.config.json:

{
  "skills": [
    {
      "name": "presence-pulse",
      "path": "~/.openclaw/skills/presence-pulse/skill.js",
      "description": "Presence coach — dimensional charisma scoring from spoken transcripts"
    }
  ]
}

4. Create the skill file

Create ~/.openclaw/skills/presence-pulse/skill.js:

"use strict";
require("dotenv").config({ path: __dirname + "/.env" });
const Anthropic = require("@anthropic-ai/sdk");

const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY });
const MODEL = process.env.ANTHROPIC_MODEL || "claude-haiku-4-5-20251001";

const DIM_NAMES   = ["Confidence", "Warmth", "Clarity", "Energy", "Authority"];
const DIM_WEIGHTS = [0.22, 0.18, 0.22, 0.18, 0.20];

// ── Entry point called by OpenClaw ────────────────────────
module.exports = async function presencePulse(command, params) {
  if (command !== "analyze-presence") {
    return { error: `Unknown command: ${command}` };
  }

  const { transcript, durationSec, prompt, ts } = params;

  if (!transcript || !transcript.trim()) {
    return {
      scores:      [50, 50, 50, 50, 50],
      overall:     50,
      strength:    "Confidence",
      growthArea:  "Clarity",
      error:       "Empty transcript",
    };
  }

  const analysisPrompt = prompt || buildPrompt(transcript, durationSec);

  let scores;
  try {
    const msg = await anthropic.messages.create({
      model:      MODEL,
      max_tokens: 128,
      messages:   [{ role: "user", content: analysisPrompt }],
    });

    const text   = msg.content[0]?.text?.trim() || "{}";
    const parsed = JSON.parse(text);
    const raw    = Array.isArray(parsed.scores) ? parsed.scores : [];

    if (raw.length === 5) {
      scores = raw.map(s => Math.round(clamp(Number(s) || 50, 0, 100)));
    } else {
      scores = heuristicScores(transcript, durationSec);
    }
  } catch (_) {
    scores = heuristicScores(transcript, durationSec);
  }

  const overall    = weightedOverall(scores);
  const strengthIdx   = scores.indexOf(Math.max(...scores));
  const growthIdx     = scores.indexOf(Math.min(...scores));

  return {
    scores,
    overall,
    strength:   DIM_NAMES[strengthIdx],
    growthArea: DIM_NAMES[growthIdx],
    error:      null,
  };
};

// ── Prompt builder ─────────────────────────────────────────
function buildPrompt(transcript, durationSec) {
  return `You are a charisma and presence coach. Analyze the following spoken transcript (${durationSec} seconds) and score the speaker on 5 dimensions from 0-100. Return ONLY a JSON object like: {"scores":[confidence,warmth,clarity,energy,authority]}

DIMENSIONS:
1. CONFIDENCE (0-100): assertive language, declarative sentences, minimal hedging ("I think", "maybe", "kind of"), strong verb choices
2. WARMTH (0-100): second-person inclusion ("you", "we"), empathy language, humor, self-disclosure, personal anecdotes
3. CLARITY (0-100): sentence structure quality, logical flow, no run-ons, concrete examples, specific details
4. ENERGY (0-100): vocabulary dynamism, sentence length variety, vivid/sensory words, rhetorical momentum
5. AUTHORITY (0-100): expertise signals, specific numbers/statistics/evidence, knowledge demonstration, confident claims

TRANSCRIPT:
"${transcript.slice(0, 800)}"

Respond ONLY with valid JSON: {"scores":[number,number,number,number,number]}`;
}

// ── Weighted composite score ───────────────────────────────
function weightedOverall(scores) {
  return Math.round(scores.reduce((sum, s, i) => sum + s * DIM_WEIGHTS[i], 0));
}

// ── Heuristic fallback (no LLM) ───────────────────────────
function heuristicScores(transcript, durationSec) {
  const words   = transcript.trim().split(/\s+/).filter(Boolean);
  const wpm     = durationSec > 0 ? (words.length / durationSec) * 60 : 0;
  const text    = transcript.toLowerCase();

  const hedges      = (text.match(/\b(maybe|perhaps|kind of|sort of|i think|i guess|probably|possibly)\b/g) || []).length;
  const confidence  = Math.round(clamp(72 - hedges * 4 + (words.length > 80 ? 6 : 0), 20, 95));

  const warmWords   = (text.match(/\b(you|your|we|our|feel|felt|love|joy|care|share|laugh|story)\b/g) || []).length;
  const warmth      = Math.round(clamp(44 + warmWords * 2.5, 20, 95));

  const sentences   = transcript.split(/[.!?]+/).filter(s => s.trim().length > 3);
  const avgLen      = sentences.length ? words.length / sentences.length : 20;
  const clarity     = Math.round(clamp(55 + (avgLen < 18 ? 15 : avgLen > 30 ? -8 : 0), 20, 95));

  const uniqueWords = new Set(words.map(w => w.toLowerCase().replace(/[^a-z]/g, ""))).size;
  const vocabRatio  = words.length > 0 ? uniqueWords / words.length : 0;
  const energy      = Math.round(clamp(50 + (wpm > 120 ? 10 : wpm < 90 ? -6 : 4) + vocabRatio * 30, 20, 95));

  const numbers     = (transcript.match(/\b\d+\.?\d*\b/g) || []).length;
  const authority   = Math.round(clamp(52 + numbers * 3 + (words.length > 100 ? 8 : 0), 20, 95));

  return [confidence, warmth, clarity, energy, authority];
}

function clamp(v, min, max) { return Math.max(min, Math.min(max, v)); }

5. Start OpenClaw

openclaw serve

You should see presence-pulse listed in the registered skills output.

How analyze-presence works

The R1 Creation calls this command once per session, immediately after PTT release. The skill performs the following steps:

  1. Transcript validation — returns a neutral 50/50/50/50/50 stub with an error field if the transcript is empty.
  2. Prompt passthrough — the Creation pre-builds the analysis prompt on-device (buildAnalysisPrompt) and sends it alongside the raw transcript. The skill uses the provided prompt if present; otherwise it rebuilds from the transcript and duration.
  3. LLM scoring — sends the prompt to claude-haiku-4-5-20251001 (fast, low-cost). The model returns a single-line JSON object: {"scores":[c,w,cl,e,a]}.
  4. Validation and clamping — each score is coerced to a number and clamped to [0, 100].
  5. Heuristic fallback — if the LLM response is unparseable or the array length is not exactly 5, the skill falls back to regex-based heuristic scoring (confidence: hedge-word penalty; warmth: second-person density; clarity: sentence-length variance; energy: WPM + vocabulary richness; authority: number/statistic density).
  6. Composite score — computes overall via the weighted sum Confidence×0.22 + Warmth×0.18 + Clarity×0.22 + Energy×0.18 + Authority×0.20.
  7. Strength / growth area identification — selects the highest- and lowest-scoring dimension names and includes them in the response.

Analyzed signals by dimension

Dimension Signals analyzed
Confidence Hedge-word frequency ("maybe", "I think", "kind of", "sort of", "probably"), declarative vs. qualified sentence ratio, strong verb choices
Warmth Second-person inclusion ("you", "your", "we", "our"), empathy language, humor markers, personal anecdotes, self-disclosure
Clarity Sentence structure quality, average sentence length, logical flow, run-on detection, concrete examples, specific details
Energy Vocabulary dynamism, words-per-minute, sentence length variety, vivid and sensory word use, rhetorical momentum
Authority Specific numbers and statistics, expertise signals, evidence-backed claims, confident declarative assertions

The 5 dimensions

# Dimension Weight What it measures
1 Confidence 22% Assertiveness, minimal hedging, command of declarative language
2 Warmth 18% Inclusivity, empathy, personal connection, relatability
3 Clarity 22% Logical structure, sentence quality, concrete specificity
4 Energy 18% Vocal variety (inferred from text), pace, vocabulary richness
5 Authority 20% Expertise signaling, use of evidence and numbers, confident claims

Note on dimensions: The user-facing app labels these Confidence, Warmth, Clarity, Energy, and Authority. The task spec lists "Authenticity" as the fifth dimension; this skill and the on-device Creation both use Authority (the app's canonical name) at position 5. The scores array always follows index order: [confidence, warmth, clarity, energy, authority].

Scoring methodology

Each dimension is scored 0–100 by the LLM based on the signals listed above. The LLM receives a tightly constrained prompt that defines each dimension in operational terms and instructs it to return only {"scores":[n,n,n,n,n]} — no prose, no explanation.

Composite (overall) score is a weighted sum:

overall = round(
  scores[0] × 0.22 +   // Confidence
  scores[1] × 0.18 +   // Warmth
  scores[2] × 0.22 +   // Clarity
  scores[3] × 0.18 +   // Energy
  scores[4] × 0.20     // Authority
)

Confidence and Clarity share the highest weight (22% each) because they most strongly predict perceived speaker credibility. Authority anchors at 20%. Warmth and Energy weight at 18% each — meaningful but secondary to structural communication quality.

Score bands:

Range Band
80–100 Strong
60–79 Solid
40–59 Developing
0–39 Needs focus

Request shape (analyze-presence)

Sent by the R1 Creation via R1.ocSend() (source: index.html line 1340–1344):

{
  "transcript": "string — full STT transcript from the session",
  "durationSec": 47,
  "prompt":     "string — pre-built analysis prompt from the Creation",
  "ts":         1718000000000
}
Field Type Required Description
transcript string yes Raw STT transcript text
durationSec number yes Recording duration in seconds (30–300)
prompt string yes Pre-built LLM prompt from buildAnalysisPrompt() in the Creation
ts number yes Unix timestamp (ms) of the analysis request

Response shape

Written by OpenClaw to the shared storage response key (openclaw:resp):

{
  "status": "done",
  "ts": 1718000000000,
  "data": {
    "scores":    [74, 61, 82, 68, 77],
    "overall":   73,
    "strength":  "Clarity",
    "growthArea": "Warmth",
    "error":     null
  }
}
Field Type Description
scores number[5] Per-dimension scores, 0–100, in order: [Confidence, Warmth, Clarity, Energy, Authority]
overall number Weighted composite score, 0–100
strength string Name of the highest-scoring dimension
growthArea string Name of the lowest-scoring dimension
error string|null Error message if scoring failed; null on success

The R1 Creation reads the response within 35 seconds (ocReceive({ timeoutMs: 35000 }), source: index.html line 1345). If the timeout elapses, the Creation uses on-device heuristic scoring and continues normally — no user-visible error.

Configuration

Variable Default Description
ANTHROPIC_API_KEY — Required. Anthropic API key.
ANTHROPIC_MODEL claude-haiku-4-5-20251001 Anthropic model to use. Switch to claude-sonnet-4-6 for higher accuracy at higher cost.
OPENAI_API_KEY — Optional. If set, skill uses OpenAI instead of Anthropic.
OPENAI_MODEL gpt-4o-mini OpenAI model when OPENAI_API_KEY is present.

claude-haiku-4-5-20251001 is the recommended default — it returns scores in under 2 seconds, well within the 35-second R1 timeout, at low per-request cost.

Security

  • ANTHROPIC_API_KEY (and any OpenAI key) are read from the .env file and never logged or returned in the response.
  • Do not commit .env to version control. Add **/.env to your .gitignore.
  • This skill transmits only the transcript text (up to 800 characters) to the configured LLM provider. No audio data, no device identifiers, and no user account information leave your machine.
  • The skill is read-only with respect to your local filesystem — it reads the transcript from OpenClaw's bridge and writes a score response. It does not write to disk.
  • OpenClaw communicates over localhost by default. Verify your firewall does not expose the OpenClaw port externally.
  • Transcripts can contain sensitive spoken content. The LLM provider you configure will receive this text. Review your provider's data retention policy if this is a concern.

Troubleshooting

R1 shows radar chart with all scores at 50 (default)

The Creation received no response within 35 seconds and fell back to heuristic scoring, or the heuristic also returned defaults. Check:

  • openclaw serve is running: openclaw status
  • presence-pulse appears in the registered skills list
  • ANTHROPIC_API_KEY is valid: node -e "require('./skill.js')('analyze-presence', {transcript:'test',durationSec:5,prompt:'',ts:Date.now()}).then(console.log)"

Scores seem wrong or all identical

The LLM returned an unparseable response and the skill fell back to heuristics. Check:

  • The transcript is not empty (minimum ~10 words for meaningful scoring)
  • The model is accessible — verify the API key has active quota
  • Switch to claude-sonnet-4-6 via ANTHROPIC_MODEL for more reliable JSON adherence on unusual transcripts

OpenClaw times out (amber LED on R1 during analysis)

  • The LLM call took over 35 seconds — unusual for Haiku. Check network latency to the Anthropic API.
  • The transcript slice sent is capped at 800 characters; longer recordings do not increase LLM latency.
  • Run openclaw serve --verbose to see per-skill timing.

presence-pulse not found in registered skills

  • Verify the name field in openclaw.config.json is exactly presence-pulse (matches the ocSend call in the Creation).
  • Restart OpenClaw after editing openclaw.config.json.

Skill crashes on startup (Cannot find module '@anthropic-ai/sdk')

Run npm install inside ~/.openclaw/skills/presence-pulse/.

04 同仓库更多 Skills

ajohnsonnow
ajohnsonnow/r1-warren

whisper-quiz

WhisperQuiz — voice-answered trivia game for Rabbit R1. Generates questions via the R1's built-in LLM, captures spoken answers via STT, and evaluates correctness with flexible LLM-based matching.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

walk-cast

Walking podcast production skill. Receives raw audio metadata and transcript from the R1, removes long pauses, applies noise reduction and normalization, generates AI chapter titles and episode metadata via LLM, and uploads the final episode to your configured podcast RSS host (Spotify for Podcasters / Anchor, Podbean, Buzzsprout, RSS.com, or any FTP-accessible feed).

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-novel

Local machine skill for VoiceNovel — handles story export to disk.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-guide

Environment description and navigation assistant for blind and low-vision users. Analyzes camera frames via a vision LLM, reads visible text, identifies scene categories (people/vehicles/food/hazards/exits), performs 360° scans, retrieves GPS position, and sends emergency SMS alerts — all via audio feedback with zero screen dependency.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-draft

Voice-driven document drafting for the Rabbit R1. Dictate stream-of-consciousness speech; the R1 formats it into Email, Blog Post, Report, Proposal, Meeting Notes, Creative Writing, Code Comments, Cover Letter, or Tweet Thread — then saves the result to a configured folder on your local machine via OpenClaw.

★ 0
ajohnsonnow
ajohnsonnow/r1-warren

voice-commit

Hands-free git and CI workflow voice controller for the Rabbit R1. Speak git/CI commands and hear results — commit, push, status, PR management, test runs, and deploy, all voice-driven via OpenClaw.

★ 0