agentleFS
b1rdmaniab1rdmania/ghostclaw/.claude/skills/add-voice-transcription/SKILL.md

add-voice-transcription

Skill91 starsChanged 7 months agoMITView on GitHub

Add voice message transcription to GhostClaw using ElevenLabs Scribe API. Automatically transcribes voice notes so the agent can read and respond to them.

  • Reads credentials

3 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. 5 are common, 3 are distinctive, and 5 are very specific to this project.

  • 5

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .ghostclaw/state.yaml.

    line 14
  2. Very specific:

    Use AskUserQuestion to collect information:

    line 18
  3. Distinctive:

    If yes, collect it now. If no, direct them to create one at https://elevenlabs.io — sign up and get an API key from Settings > API Keys.

    line 22
  4. Distinctive:

    Run the skills engine to apply this skill's code package.

    line 26
  5. Very specific:

    If .ghostclaw/ directory doesn't exist yet:

    line 30
  6. Distinctive:

    If the apply reports merge conflicts, read the intent files:

    line 49
  7. Common:

    All tests must pass (including the 3 new voice transcription tests) and build must be clean before proceeding.

    line 60
  8. Common:

    If the user doesn't have an API key:

    line 66
  9. Common:

    Wait for the user to provide the key.

    line 77
  10. Very specific:

    Check ELEVENLABS_API_KEY is set in .env

    line 119
  11. Very specific:

    Verify key works: curl -s https://api.elevenlabs.io/v1/user -H "xi-api-key: $ELEVENLABS_API_KEY" | head -c 200

    line 120
  12. Common:

    Check logs for the specific error.

    line 124
  13. Common:

    Verify the chat is registered and the agent is running.

    line 131

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Add Voice Transcription

This skill adds automatic voice message transcription using ElevenLabs Scribe API. When a voice note arrives, it is downloaded, transcribed, and delivered to the agent as [Voice: <transcript>].

Phase 1: Pre-flight

Check if already applied

Read .ghostclaw/state.yaml. If voice-transcription is in applied_skills, skip to Phase 3 (Configure). The code changes are already in place.

Ask the user

Use AskUserQuestion to collect information:

AskUserQuestion: Do you have an ElevenLabs API key?

If yes, collect it now. If no, direct them to create one at https://elevenlabs.io — sign up and get an API key from Settings > API Keys.

Phase 2: Apply Code Changes

Run the skills engine to apply this skill's code package.

Initialize skills system (if needed)

If .ghostclaw/ directory doesn't exist yet:

npx tsx scripts/apply-skill.ts --init

Apply the skill

npx tsx scripts/apply-skill.ts .claude/skills/add-voice-transcription

This deterministically:

  • Adds src/transcription.ts (voice transcription module using ElevenLabs Scribe)
  • Three-way merges voice handling into src/channels/whatsapp.ts (isVoiceMessage check, transcribeAudioMessage call)
  • Three-way merges transcription tests into src/channels/whatsapp.test.ts (mock + 3 test cases)
  • Updates .env.example with ELEVENLABS_API_KEY
  • Records the application in .ghostclaw/state.yaml

If the apply reports merge conflicts, read the intent files:

  • modify/src/channels/whatsapp.ts.intent.md — what changed and invariants for whatsapp.ts
  • modify/src/channels/whatsapp.test.ts.intent.md — what changed for whatsapp.test.ts

Validate code changes

npm test
npm run build

All tests must pass (including the 3 new voice transcription tests) and build must be clean before proceeding.

Phase 3: Configure

Get ElevenLabs API key (if needed)

If the user doesn't have an API key:

I need you to create an ElevenLabs API key:

  1. Go to https://elevenlabs.io and sign up (free tier available)
  2. Go to Settings > API Keys
  3. Click "Create API Key"
  4. Copy the key

The Scribe transcription API is included in all ElevenLabs plans.

Wait for the user to provide the key.

Add to environment

Add to .env:

ELEVENLABS_API_KEY=<their-key>

Build and restart

npm run build
launchctl kickstart -k gui/$(id -u)/com.ghostclaw  # macOS
# Linux: systemctl --user restart ghostclaw

Phase 4: Verify

Test with a voice note

Tell the user:

Send a voice note in any registered chat (Telegram or WhatsApp). The agent should receive it as [Voice: <transcript>] and respond to its content.

Check logs if needed

tail -f logs/ghostclaw.log | grep -i voice

Look for:

  • ElevenLabs transcription complete — successful transcription with character count
  • ELEVENLABS_API_KEY not set — key missing from .env
  • ElevenLabs STT failed — API error (check key validity)
  • Failed to download audio message — media download issue

Troubleshooting

Voice notes show "[Voice Message - transcription unavailable]"

  1. Check ELEVENLABS_API_KEY is set in .env
  2. Verify key works: curl -s https://api.elevenlabs.io/v1/user -H "xi-api-key: $ELEVENLABS_API_KEY" | head -c 200

Voice notes show "[Voice Message - transcription failed]"

Check logs for the specific error. Common causes:

  • Network timeout — transient, will work on next message
  • Invalid API key — regenerate at https://elevenlabs.io Settings > API Keys
  • Rate limiting — wait and retry

Agent doesn't respond to voice notes

Verify the chat is registered and the agent is running. Voice transcription only runs for registered groups.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.