agentleFS
elevenlabselevenlabs/cli/.agents/skills/custom-commands/SKILL.md

elevenlabs-custom-commands

Skill97 starsChanged 2 months agoMITView on GitHub

How to author custom commands for the elevenlabs CLI using the co-generated SDK.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No manual auth wiring is needed in custom command handlers.

    line 237
  2. Very specific:

    After running fern generate, your custom.rs is preserved.

    line 249
  3. Very specific:

    If a capability is missing and you are not going to add it now, record it: elevenlabs feedback missing-capability "<what you needed>".

    line 256

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

Custom Commands for elevenlabs

Overview

The elevenlabs CLI supports user-authored custom commands that are compiled into the binary alongside the auto-generated API commands. Custom commands get a fully-wired SDK client that inherits the CLI's auth, retries, TLS, base URL, and global headers — zero configuration required.

Architecture

cli/elevenlabs/custom.rs    ← Your command handlers (protected by .fernignore)
cli/elevenlabs/sdk.rs       ← Generated bridge: client() + block_on()
cli/elevenlabs/main.rs      ← Generated entrypoint (calls custom::register)
elevenlabs-sdk/             ← Co-generated typed SDK crate
elevenlabs-types/           ← Co-generated typed model crate

Adding a Custom Command

1. Edit cli/elevenlabs/custom.rs

This file is protected by .fernignore — fern generate will never overwrite it. Register commands in the register() function:

use elevenlabs_sdk::api::*;

pub fn register(app: CliApp) -> CliApp {
    let app = app.command(
        clap::Command::new("get")
            .about("Get history item")
            .arg(clap::Arg::new("history_item_id").required(true))
        ,
        |matches, ctx| {
            let history_item_id = matches.get_one::<String>("history_item_id").unwrap();
            let client = super::sdk::client(ctx);
            let result = super::sdk::block_on(
                client.history.get(history_item_id),
            )?;
            println!("{}", serde_json::to_string_pretty(&result).unwrap());
            Ok(())
        },
    );
    app
}

Then build and test:

cargo build
elevenlabs get <history_item_id>

2. Available SDK Clients

The super::sdk::client(ctx) call returns a elevenlabs_sdk::api::Client with the following sub-clients:

FieldTypeDescription
client.historyelevenlabs_sdk::api::HistoryClienthistory operations
client.text_to_sound_effectselevenlabs_sdk::api::TextToSoundEffectsClienttext_to_sound_effects operations
client.audio_isolationelevenlabs_sdk::api::AudioIsolationClientaudio_isolation operations
client.sampleselevenlabs_sdk::api::SamplesClientsamples operations
client.text_to_speechelevenlabs_sdk::api::TextToSpeechClienttext_to_speech operations
client.text_to_dialogueelevenlabs_sdk::api::TextToDialogueClienttext_to_dialogue operations
client.speech_to_speechelevenlabs_sdk::api::SpeechToSpeechClientspeech_to_speech operations
client.text_to_voiceelevenlabs_sdk::api::TextToVoiceClienttext_to_voice operations
client.previewelevenlabs_sdk::api::PreviewClientpreview operations
client.userelevenlabs_sdk::api::UserClientuser operations
client.subscriptionelevenlabs_sdk::api::SubscriptionClientsubscription operations
client.voiceselevenlabs_sdk::api::VoicesClientvoices operations
client.settingselevenlabs_sdk::api::SettingsClient3settings operations
client.accentselevenlabs_sdk::api::AccentsClientaccents operations
client.ivcelevenlabs_sdk::api::IvcClientivc operations
client.pvcelevenlabs_sdk::api::PvcClientpvc operations
client.sampleselevenlabs_sdk::api::SamplesClient2samples operations
client.audioelevenlabs_sdk::api::AudioClient3audio operations
client.waveformelevenlabs_sdk::api::WaveformClientwaveform operations
client.speakerselevenlabs_sdk::api::SpeakersClientspeakers operations
client.audioelevenlabs_sdk::api::AudioClient4audio operations
client.verificationelevenlabs_sdk::api::VerificationClientverification operations
client.captchaelevenlabs_sdk::api::CaptchaClientcaptcha operations
client.sampleselevenlabs_sdk::api::SamplesClient3samples operations
client.audioelevenlabs_sdk::api::AudioClient5audio operations
client.studioelevenlabs_sdk::api::StudioClientstudio operations
client.projectselevenlabs_sdk::api::ProjectsClientprojects operations
client.pronunciation_dictionarieselevenlabs_sdk::api::PronunciationDictionariesClient2pronunciation_dictionaries operations
client.contentelevenlabs_sdk::api::ContentClientcontent operations
client.snapshotselevenlabs_sdk::api::SnapshotsClientsnapshots operations
client.chapterselevenlabs_sdk::api::ChaptersClientchapters operations
client.snapshotselevenlabs_sdk::api::SnapshotsClient2snapshots operations
client.dubbingelevenlabs_sdk::api::DubbingClientdubbing operations
client.projectelevenlabs_sdk::api::ProjectClientproject operations
client.languageelevenlabs_sdk::api::LanguageClientlanguage operations
client.transcriptelevenlabs_sdk::api::TranscriptClient3transcript operations
client.transcriptelevenlabs_sdk::api::TranscriptClient2transcript operations
client.resourceelevenlabs_sdk::api::ResourceClientresource operations
client.languageelevenlabs_sdk::api::LanguageClient2language operations
client.segmentelevenlabs_sdk::api::SegmentClientsegment operations
client.speakerelevenlabs_sdk::api::SpeakerClientspeaker operations
client.segmentelevenlabs_sdk::api::SegmentClient2segment operations
client.audioelevenlabs_sdk::api::AudioClient2audio operations
client.transcriptelevenlabs_sdk::api::TranscriptClienttranscript operations
client.transcriptselevenlabs_sdk::api::TranscriptsClienttranscripts operations
client.modelselevenlabs_sdk::api::ModelsClientmodels operations
client.audio_nativeelevenlabs_sdk::api::AudioNativeClientaudio_native operations
client.usageelevenlabs_sdk::api::UsageClientusage operations
client.pronunciation_dictionarieselevenlabs_sdk::api::PronunciationDictionariesClientpronunciation_dictionaries operations
client.ruleselevenlabs_sdk::api::RulesClientrules operations
client.workspaceelevenlabs_sdk::api::WorkspaceClientworkspace operations
client.audit_logselevenlabs_sdk::api::AuditLogsClientaudit_logs operations
client.auth_connectionselevenlabs_sdk::api::AuthConnectionsClientauth_connections operations
client.groupselevenlabs_sdk::api::GroupsClientgroups operations
client.memberselevenlabs_sdk::api::MembersClient2members operations
client.inviteselevenlabs_sdk::api::InvitesClientinvites operations
client.memberselevenlabs_sdk::api::MembersClientmembers operations
client.resourceselevenlabs_sdk::api::ResourcesClientresources operations
client.usageelevenlabs_sdk::api::UsageClient2usage operations
client.analyticselevenlabs_sdk::api::AnalyticsClient2analytics operations
client.requestselevenlabs_sdk::api::RequestsClientrequests operations
client.service_accountselevenlabs_sdk::api::ServiceAccountsClientservice_accounts operations
client.api_keyselevenlabs_sdk::api::ApiKeysClientapi_keys operations
client.webhookselevenlabs_sdk::api::WebhooksClientwebhooks operations
client.musicelevenlabs_sdk::api::MusicClientmusic operations
client.composition_planelevenlabs_sdk::api::CompositionPlanClientcomposition_plan operations
client.finetuneselevenlabs_sdk::api::FinetunesClientfinetunes operations
client.speech_to_textelevenlabs_sdk::api::SpeechToTextClientspeech_to_text operations
client.transcriptselevenlabs_sdk::api::TranscriptsClient2transcripts operations
client.forced_alignmentelevenlabs_sdk::api::ForcedAlignmentClientforced_alignment operations
client.agentselevenlabs_sdk::api::AgentsClientagents operations
client.conversationselevenlabs_sdk::api::ConversationsClientconversations operations
client.audioelevenlabs_sdk::api::AudioClientaudio operations
client.feedbackelevenlabs_sdk::api::FeedbackClientfeedback operations
client.messageselevenlabs_sdk::api::MessagesClientmessages operations
client.tagselevenlabs_sdk::api::TagsClienttags operations
client.fileselevenlabs_sdk::api::FilesClientfiles operations
client.topicselevenlabs_sdk::api::TopicsClienttopics operations
client.analysiselevenlabs_sdk::api::AnalysisClientanalysis operations
client.twilioelevenlabs_sdk::api::TwilioClienttwilio operations
client.exotelelevenlabs_sdk::api::ExotelClientexotel operations
client.whatsappelevenlabs_sdk::api::WhatsappClientwhatsapp operations
client.summarieselevenlabs_sdk::api::SummariesClientsummaries operations
client.widgetelevenlabs_sdk::api::WidgetClientwidget operations
client.avatarelevenlabs_sdk::api::AvatarClientavatar operations
client.linkelevenlabs_sdk::api::LinkClientlink operations
client.knowledge_baseelevenlabs_sdk::api::KnowledgeBaseClientknowledge_base operations
client.documentselevenlabs_sdk::api::DocumentsClientdocuments operations
client.summarieselevenlabs_sdk::api::SummariesClient2summaries operations
client.chunkelevenlabs_sdk::api::ChunkClientchunk operations
client.chunkselevenlabs_sdk::api::ChunksClientchunks operations
client.crawl_jobselevenlabs_sdk::api::CrawlJobsClientcrawl_jobs operations
client.documentelevenlabs_sdk::api::DocumentClientdocument operations
client.testselevenlabs_sdk::api::TestsClienttests operations
client.folderselevenlabs_sdk::api::FoldersClientfolders operations
client.invocationselevenlabs_sdk::api::InvocationsClientinvocations operations
client.userselevenlabs_sdk::api::UsersClientusers operations
client.triage_ticketselevenlabs_sdk::api::TriageTicketsClienttriage_tickets operations
client.phone_numberselevenlabs_sdk::api::PhoneNumbersClientphone_numbers operations
client.llm_usageelevenlabs_sdk::api::LlmUsageClientllm_usage operations
client.llmelevenlabs_sdk::api::LlmClientllm operations
client.toolselevenlabs_sdk::api::ToolsClienttools operations
client.executionselevenlabs_sdk::api::ExecutionsClientexecutions operations
client.settingselevenlabs_sdk::api::SettingsClientsettings operations
client.secretselevenlabs_sdk::api::SecretsClientsecrets operations
client.batch_callselevenlabs_sdk::api::BatchCallsClientbatch_calls operations
client.sip_trunkelevenlabs_sdk::api::SipTrunkClientsip_trunk operations
client.mcp_serverselevenlabs_sdk::api::McpServersClientmcp_servers operations
client.toolselevenlabs_sdk::api::ToolsClient2tools operations
client.approval_policyelevenlabs_sdk::api::ApprovalPolicyClientapproval_policy operations
client.tool_approvalselevenlabs_sdk::api::ToolApprovalsClienttool_approvals operations
client.tool_configselevenlabs_sdk::api::ToolConfigsClienttool_configs operations
client.whatsapp_accountselevenlabs_sdk::api::WhatsappAccountsClientwhatsapp_accounts operations
client.brancheselevenlabs_sdk::api::BranchesClientbranches operations
client.versionselevenlabs_sdk::api::VersionsClientversions operations
client.deploymentselevenlabs_sdk::api::DeploymentsClientdeployments operations
client.draftselevenlabs_sdk::api::DraftsClientdrafts operations
client.procedureselevenlabs_sdk::api::ProceduresClientprocedures operations
client.draftselevenlabs_sdk::api::DraftsClient2drafts operations
client.agentselevenlabs_sdk::api::AgentsClient2agents operations
client.llm_usageelevenlabs_sdk::api::LlmUsageClient2llm_usage operations
client.analyticselevenlabs_sdk::api::AnalyticsClientanalytics operations
client.live_countelevenlabs_sdk::api::LiveCountClientlive_count operations
client.dashboardelevenlabs_sdk::api::DashboardClientdashboard operations
client.settingselevenlabs_sdk::api::SettingsClient2settings operations
client.speech_engineelevenlabs_sdk::api::SpeechEngineClientspeech_engine operations
client.environment_variableselevenlabs_sdk::api::EnvironmentVariablesClientenvironment_variables operations
client.assetselevenlabs_sdk::api::AssetsClientassets operations
client.flowselevenlabs_sdk::api::FlowsClientflows operations
client.videoelevenlabs_sdk::api::VideoClientvideo operations
client.imageelevenlabs_sdk::api::ImageClientimage operations
client.text_to_speechelevenlabs_sdk::api::TextToSpeechClient2text_to_speech operations
client.productionselevenlabs_sdk::api::ProductionsClientproductions operations
client.orderselevenlabs_sdk::api::OrdersClientorders operations
client.mediaelevenlabs_sdk::api::MediaClientmedia operations
client.itemselevenlabs_sdk::api::ItemsClientitems operations
client.deliverableselevenlabs_sdk::api::DeliverablesClientdeliverables operations
client.languageselevenlabs_sdk::api::LanguagesClientlanguages operations
client.tokenselevenlabs_sdk::api::TokensClienttokens operations
client.single_useelevenlabs_sdk::api::SingleUseClientsingle_use operations
client.workspaceselevenlabs_sdk::api::WorkspacesClientworkspaces operations
client.api_keyselevenlabs_sdk::api::ApiKeysClient2api_keys operations

3. Key Patterns

Get the SDK client (execution-sharing, fully authenticated):

let client = super::sdk::client(ctx);

Run an async SDK call from a sync handler:

let result = super::sdk::block_on(
    client.some_resource.some_method(args),
)?;

Use typed models for request/response serialization:

use elevenlabs_sdk::api::*;

4. Authentication

Custom commands automatically inherit the CLI's authentication. The following auth schemes are configured:

  • OAuth (oauth-authorization-code): env ``

No manual auth wiring is needed in custom command handlers.

Regeneration Safety

FileRegenerated?Notes
cli/elevenlabs/custom.rsNoProtected by .fernignore
cli/elevenlabs/sdk.rsYesBridges AppContext → SDK client
cli/elevenlabs/main.rsYesCalls custom::register(app)
elevenlabs-sdk/YesCo-generated typed SDK crate
elevenlabs-types/YesCo-generated typed models

After running fern generate, your custom.rs is preserved. All generated code (SDK, types, glue, main.rs) is updated to match the latest API spec. If the SDK surface changes (renamed methods, new sub-clients), update your custom.rs to match.

Reporting a gap instead of building one

If a capability is missing and you are not going to add it now, record it: elevenlabs feedback missing-capability "<what you needed>". That is what decides which commands get built next. The agent-facing prose for it lives in cli/elevenlabs/workflow/feedback.rs (LONG_ABOUT) and the emitted skills (workflow/skills.rs, FEEDBACK_SECTION and GAP_POINTER).

Build & Test

# Build the CLI (includes custom commands)
cargo build

# Run your custom command
elevenlabs <your-command> [args]

# Run with verbose output for debugging
RUST_LOG=debug elevenlabs <your-command> [args]

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.