Skip to content

Commit d7600e5

Browse files
authored
Merge pull request #406 from rohan-tessl/improve/skill-review-optimization
feat: improve 5 lowest-scoring skill definitions
2 parents d0d6fee + 98bcbce commit d7600e5

5 files changed

Lines changed: 113 additions & 197 deletions

File tree

  • .agents/skills
Lines changed: 21 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
---
22
name: deepgram-dotnet-conversational-stt
3-
description: Use when evaluating or extending conversational / Flux-style streaming STT support in this C# SDK. The repo has a latest WebSocket listen client under `Deepgram.Models.Listen.v2.WebSocket`, but it does not currently expose Flux-specific request params or turn-aware response types like `TurnInfo`. Use this skill to document that gap honestly and to guide work on the closest supported surface.
3+
description: "Use when evaluating, extending, or writing C# code for conversational speech-to-text, Flux-style real-time transcription, or turn-taking streaming in the Deepgram .NET SDK. Identifies missing Flux request parameters (language_hint, eot_threshold), maps existing WebSocket response types, provides the closest supported LiveSchema code path, and guides adding TurnInfo models and Flux examples. Use `deepgram-dotnet-speech-to-text` for standard streaming transcription without turn awareness."
44
---
55

66
# Using Deepgram Conversational STT / Flux (.NET SDK)
77

88
This repo does **not** currently expose a dedicated Flux / conversational STT API surface comparable to the Python SDK's `listen.v2.connect(...)` + `TurnInfo` flow.
99

10-
## When to use this product
11-
12-
- Use this skill when someone asks for **Flux**, **conversational STT**, **turn-taking**, or `/v2/listen` support in the .NET SDK.
13-
- Use it when deciding whether the current `Listen.v2.WebSocket` client is sufficient for the task.
14-
1510
**Use a different skill when:**
16-
- You only need standard streaming transcription with `ResultResponse`, `SpeechStartedResponse`, and `UtteranceEndResponse``deepgram-dotnet-speech-to-text`.
17-
- You need a full voice assistant instead of transcription-only`deepgram-dotnet-voice-agent`.
11+
- You only need standard streaming transcription without turn awareness`deepgram-dotnet-speech-to-text`.
12+
- You need a full voice assistant (STT + LLM + TTS)`deepgram-dotnet-voice-agent`.
1813

1914
## Current repo status
2015

@@ -30,26 +25,13 @@ What is **not** present in the current repo search:
3025
- No `language_hint`, `eager_eot_threshold`, `eot_threshold`, or similar Flux request properties.
3126
- No README/examples that mention conversational STT explicitly.
3227

33-
## Authentication
34-
35-
```bash
36-
dotnet add package Deepgram
37-
```
38-
39-
```csharp
40-
using Deepgram;
41-
42-
Library.Initialize();
43-
var client = ClientFactory.CreateListenWebSocketClient();
44-
```
45-
46-
`ClientFactory` reads credentials from the `DEEPGRAM_API_KEY` (or `DEEPGRAM_ACCESS_TOKEN`) environment variable by default. To pass them explicitly: `ClientFactory.CreateListenWebSocketClient(apiKey: "...", options: ...)`. `DeepgramWsClientOptions` throws if neither the env var nor an explicit credential is provided.
47-
4828
## Closest supported code path today
4929

5030
```csharp
31+
using Deepgram;
5132
using Deepgram.Models.Listen.v2.WebSocket;
5233

34+
Library.Initialize(); // reads DEEPGRAM_API_KEY env var
5335
var liveClient = ClientFactory.CreateListenWebSocketClient();
5436

5537
await liveClient.Subscribe(new EventHandler<ResultResponse>((sender, e) =>
@@ -83,42 +65,30 @@ Treat this as **standard live STT**, not true Flux parity.
8365

8466
On `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `InterimResults`, `UtteranceEnd`, `VadEvents`, `Endpointing`, `NoDelay`, `Punctuate`, `SmartFormat`, `Keywords`, `Keyterm`, `Diarize`, `Redact`.
8567

86-
## API reference (layered)
87-
88-
1. **In-repo source of truth**:
89-
- `Deepgram/ClientFactory.cs`
90-
- `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`
91-
- `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs`
92-
- `Deepgram/Models/Listen/v2/WebSocket/*.cs`
93-
2. **Canonical OpenAPI**: not the primary reference for this streaming gap
94-
3. **Canonical AsyncAPI (what the product can support, even if this SDK is incomplete)**: https://developers.deepgram.com/asyncapi.yaml
95-
4. **Context7**:
96-
- repo mirror: `https://context7.com/deepgram/deepgram-dotnet-sdk`
97-
- docs corpus: `/llmstxt/developers_deepgram_llms_txt`
98-
5. **Product docs**:
99-
- https://developers.deepgram.com/reference/speech-to-text/listen-flux
100-
- https://developers.deepgram.com/docs/flux/quickstart
101-
- https://developers.deepgram.com/docs/flux/language-prompting
68+
## Workflow: adding Flux support to the SDK
69+
70+
If the task requires real Flux parity, follow these steps in order:
71+
72+
1. **Add request params** — extend `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs` with `LanguageHint`, `EagerEotThreshold`, `EotThreshold`, and other Flux-specific fields. Validate against the AsyncAPI spec.
73+
2. **Add response models** — create `TurnInfo` and any turn-aware event types under `Deepgram/Models/Listen/v2/WebSocket/`. Verify field names match the AsyncAPI spec.
74+
3. **Wire events in the client** — update `Deepgram/Clients/Listen/v2/WebSocket/Client.cs` to deserialize and dispatch new event types.
75+
4. **Write tests** — add unit tests covering serialization of new request params and deserialization of new response types.
76+
5. **Add an example** — create `examples/speech-to-text/websocket/flux/Program.cs` demonstrating a Flux session with turn-taking.
10277

10378
## Gotchas
10479

105-
1. **Be honest: Flux is not first-class here yet.** Do not invent `TurnInfo`-style .NET models or `ConnectFluxAsync(...)` helpers.
106-
2. **The repo's `Listen.v2.WebSocket` naming is misleading if you expect Python parity.** It is the newest streaming client, but not a full conversational surface.
107-
3. **Default API version still resolves from shared options.** `DeepgramWsClientOptions` defaults `APIVersion` to `v1`, so inspect connection URIs before assuming `/v2/listen` behavior.
108-
4. **If the task requires real Flux parity, start by adding models, request params, examples, and tests.** Do not paper over the gap in docs or code.
80+
1. **Flux is not first-class here yet.** Do not invent `TurnInfo`-style .NET models or `ConnectFluxAsync(...)` helpers that are not backed by real implementation.
81+
2. **`Listen.v2.WebSocket` naming is misleading for Python-parity expectations.** It is the newest streaming client, but not a full conversational surface.
82+
3. **`DeepgramWsClientOptions` defaults `APIVersion` to `v1`.** Inspect connection URIs before assuming `/v2/listen` behavior.
10983

11084
## Example files in this repo
11185

11286
- `examples/speech-to-text/websocket/file/Program.cs`
11387
- `examples/speech-to-text/websocket/http/Program.cs`
11488
- `examples/speech-to-text/websocket/microphone/Program.cs`
11589

116-
## Central product skills
117-
118-
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
119-
120-
```bash
121-
npx skills add deepgram/skills
122-
```
90+
## References
12391

124-
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
92+
- In-repo: `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`, `Deepgram/Models/Listen/v2/WebSocket/*.cs`
93+
- AsyncAPI (target spec): https://developers.deepgram.com/asyncapi.yaml
94+
- Product docs: https://developers.deepgram.com/reference/speech-to-text/listen-flux

.agents/skills/deepgram-dotnet-management-api/SKILL.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: deepgram-dotnet-management-api
3-
description: Use when writing or reviewing C# code in this repo that calls Deepgram Management APIs for projects, models, keys, members, invitations, usage, balances, and auth token grants. Covers `ClientFactory.CreateManageClient()` and `ClientFactory.CreateAuthClient()`. Unlike some other SDKs, this repo does not currently expose reusable Voice Agent configuration management endpoints.
3+
description: "Use when writing or reviewing C# code in this repo that calls Deepgram Management APIs for projects, models, keys, members, invitations, usage, balances, and auth token grants. Covers `ClientFactory.CreateManageClient()` and `ClientFactory.CreateAuthClient()`. Unlike some other SDKs, this repo does not currently expose reusable Voice Agent configuration management endpoints."
44
---
55

66
# Using Deepgram Management API (.NET SDK)
@@ -103,31 +103,40 @@ Auth:
103103
- `GrantToken()`
104104
- `GrantToken(GrantTokenSchema)`
105105

106-
## API reference (layered)
107-
108-
1. **In-repo source of truth**:
109-
- `Deepgram/ClientFactory.cs`
110-
- `Deepgram/Clients/Manage/v1/Client.cs`
111-
- `Deepgram/Clients/Auth/v1/Client.cs`
112-
- `Deepgram/Models/Manage/v1/*.cs`
113-
- `Deepgram/Models/Auth/v1/*.cs`
114-
2. **Canonical OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml
115-
3. **AsyncAPI**: not applicable for these admin endpoints
116-
4. **Context7**:
117-
- repo mirror: `https://context7.com/deepgram/deepgram-dotnet-sdk`
118-
- docs corpus: `/llmstxt/developers_deepgram_llms_txt`
119-
5. **Product docs**:
120-
- https://developers.deepgram.com/reference/manage/projects/list
121-
- https://developers.deepgram.com/reference/manage/models/list
122-
- https://developers.deepgram.com/reference/auth/grant-token
106+
## References
107+
108+
- In-repo: `Deepgram/Clients/Manage/v1/Client.cs`, `Deepgram/Clients/Auth/v1/Client.cs`, `Deepgram/Models/Manage/v1/*.cs`, `Deepgram/Models/Auth/v1/*.cs`
109+
- OpenAPI: https://developers.deepgram.com/openapi.yaml
110+
- Product docs: https://developers.deepgram.com/reference/manage/projects/list, https://developers.deepgram.com/reference/auth/grant-token
111+
112+
## Guard pattern for destructive operations
113+
114+
```csharp
115+
// 1. Verify the resource exists
116+
var key = await client.GetKey(projectId, keyId);
117+
Console.WriteLine($"Found key: {key.ApiKey.Comment} ({keyId})");
118+
119+
// 2. Delete
120+
await client.DeleteKey(projectId, keyId);
121+
122+
// 3. Verify deletion succeeded
123+
try
124+
{
125+
await client.GetKey(projectId, keyId);
126+
Console.Error.WriteLine("ERROR: key still exists after deletion");
127+
}
128+
catch
129+
{
130+
Console.WriteLine("Key deleted successfully.");
131+
}
132+
```
123133

124134
## Gotchas
125135

126136
1. **This repo does not currently expose Voice Agent configuration CRUD.** Do not copy Python `client.voice_agent.configurations.*` examples into C#.
127-
2. **Management and auth are separate clients.** Use `CreateManageClient()` for admin APIs and `CreateAuthClient()` for `GrantToken()`.
128-
3. **Destructive methods are real.** `DeleteProject`, `DeleteKey`, `DeleteInvite`, and `RemoveMember` should stay commented or guarded in examples/tests unless you mean it.
129-
4. **Bearer-token auth is supported.** `DeepgramHttpClientOptions` prefers explicit `accessToken` over `apiKey`, then env vars in that order.
130-
5. **Current examples often fetch a project ID first.** Many sub-resources are project-scoped.
137+
2. **Destructive methods are irreversible.** `DeleteProject`, `DeleteKey`, `DeleteInvite`, and `RemoveMember` should always use the verify-delete-verify pattern above.
138+
3. **Bearer-token auth is supported.** `DeepgramHttpClientOptions` prefers explicit `accessToken` over `apiKey`, then env vars in that order.
139+
4. **Most sub-resources are project-scoped.** Fetch a project ID first via `GetProjects()` before calling key/member/usage methods.
131140

132141
## Example files in this repo
133142

@@ -142,12 +151,4 @@ Auth:
142151
- `examples/auth/grant-token/Program.cs`
143152
- `examples/auth/bearer-token-workflow/Program.cs`
144153

145-
## Central product skills
146-
147-
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
148-
149-
```bash
150-
npx skills add deepgram/skills
151-
```
152-
153-
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
154+
Cross-language product knowledge (API reference, recipes, MCP setup): `npx skills add deepgram/skills`.

.agents/skills/deepgram-dotnet-speech-to-text/SKILL.md

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: deepgram-dotnet-speech-to-text
3-
description: Use when writing or reviewing C# code in this repo that calls Deepgram Speech-to-Text for prerecorded or live transcription. Covers `ClientFactory.CreateListenRESTClient()` with `TranscribeUrl` / `TranscribeFile`, and `ClientFactory.CreateListenWebSocketClient()` with `Connect`, `Subscribe`, and `Send`. Use `deepgram-dotnet-audio-intelligence` for summaries/sentiment/topics overlays, `deepgram-dotnet-conversational-stt` for Flux-specific work (not fully surfaced in this SDK), and `deepgram-dotnet-voice-agent` for full-duplex assistants.
3+
description: "Use when writing or reviewing C# code in this repo that calls Deepgram Speech-to-Text for prerecorded or live transcription. Covers `ClientFactory.CreateListenRESTClient()` with `TranscribeUrl` / `TranscribeFile`, and `ClientFactory.CreateListenWebSocketClient()` with `Connect`, `Subscribe`, and `Send`. Use `deepgram-dotnet-audio-intelligence` for summaries/sentiment/topics overlays, `deepgram-dotnet-conversational-stt` for Flux-specific work, and `deepgram-dotnet-voice-agent` for full-duplex assistants."
44
---
55

66
# Using Deepgram Speech-to-Text (.NET SDK)
@@ -105,38 +105,31 @@ bool connected = await liveClient.Connect(new LiveSchema()
105105
VadEvents = true,
106106
});
107107

108-
if (connected)
108+
if (!connected)
109109
{
110-
var microphone = new Microphone(liveClient.Send);
111-
microphone.Start();
112-
Console.ReadKey();
113-
microphone.Stop();
114-
await liveClient.Stop();
110+
Console.Error.WriteLine("WebSocket connection failed — check API key and network.");
111+
return;
115112
}
113+
114+
var microphone = new Microphone(liveClient.Send);
115+
microphone.Start();
116+
Console.ReadKey();
117+
microphone.Stop();
118+
await liveClient.Stop();
116119
```
117120

118121
## Key params
119122

120-
REST `PreRecordedSchema`: `Model`, `Language`, `Encoding`, `SampleRate`, `Punctuate`, `SmartFormat`, `Keywords`, `Keyterm`, `Utterances`, `Paragraphs`, `Numerals`, `MultiChannel`, `Replace`, `Search`, `Tag`, `Version`.
123+
REST `PreRecordedSchema`: `Model`, `Language`, `Encoding`, `SampleRate`, `Punctuate`, `SmartFormat`, `Keyterm`, `Utterances`, `Paragraphs`. Full list in `Deepgram/Models/Listen/v1/REST/PreRecordedSchema.cs`.
121124

122-
WebSocket `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `Channels`, `InterimResults`, `UtteranceEnd`, `VadEvents`, `Punctuate`, `SmartFormat`, `Endpointing`, `Keywords`, `Keyterm`, `NoDelay`.
125+
WebSocket `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `InterimResults`, `UtteranceEnd`, `VadEvents`, `Endpointing`, `Keyterm`. Full list in `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs`.
123126

124-
## API reference (layered)
127+
## References
125128

126-
1. **In-repo source of truth**:
127-
- `Deepgram/ClientFactory.cs`
128-
- `Deepgram/Clients/Listen/v1/REST/Client.cs`
129-
- `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`
130-
- `Deepgram/Models/Listen/v1/REST/PreRecordedSchema.cs`
131-
- `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs`
132-
2. **Canonical OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml
133-
3. **Canonical AsyncAPI (streaming / WSS)**: https://developers.deepgram.com/asyncapi.yaml
134-
4. **Context7**:
135-
- repo mirror: `https://context7.com/deepgram/deepgram-dotnet-sdk`
136-
- docs corpus: `/llmstxt/developers_deepgram_llms_txt`
137-
5. **Product docs**:
138-
- https://developers.deepgram.com/reference/speech-to-text/listen-pre-recorded
139-
- https://developers.deepgram.com/reference/speech-to-text/listen-streaming
129+
- In-repo: `Deepgram/Clients/Listen/v1/REST/Client.cs`, `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`
130+
- OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
131+
- AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
132+
- Product docs: https://developers.deepgram.com/reference/speech-to-text/listen-pre-recorded, https://developers.deepgram.com/reference/speech-to-text/listen-streaming
140133

141134
## Gotchas
142135

@@ -157,12 +150,4 @@ WebSocket `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `Channels`, `InterimR
157150
- `examples/speech-to-text/websocket/microphone/Program.cs`
158151
- `tests/edge_cases/stt_v1_client_example/`
159152

160-
## Central product skills
161-
162-
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
163-
164-
```bash
165-
npx skills add deepgram/skills
166-
```
167-
168-
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
153+
Cross-language product knowledge (API reference, recipes, MCP setup): `npx skills add deepgram/skills`.

.agents/skills/deepgram-dotnet-text-to-speech/SKILL.md

Lines changed: 16 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: deepgram-dotnet-text-to-speech
3-
description: Use when writing or reviewing C# code in this repo that calls Deepgram Text-to-Speech. Covers `ClientFactory.CreateSpeakRESTClient()` with `ToStream` / `ToFile`, and `ClientFactory.CreateSpeakWebSocketClient()` with `Connect`, `SpeakWithText`, `Flush`, and streaming `AudioResponse` events. Use `deepgram-dotnet-voice-agent` for full-duplex assistants instead of one-way synthesis.
3+
description: "Use when writing or reviewing C# code in this repo that calls Deepgram Text-to-Speech. Covers `ClientFactory.CreateSpeakRESTClient()` with `ToStream` / `ToFile`, and `ClientFactory.CreateSpeakWebSocketClient()` with `Connect`, `SpeakWithText`, `Flush`, and streaming `AudioResponse` events. Use `deepgram-dotnet-voice-agent` for full-duplex assistants instead of one-way synthesis."
44
---
55

66
# Using Deepgram Text-to-Speech (.NET SDK)
@@ -81,13 +81,16 @@ bool connected = await speakClient.Connect(new SpeakSchema()
8181
SampleRate = 48000,
8282
});
8383

84-
if (connected)
84+
if (!connected)
8585
{
86-
speakClient.SpeakWithText("Hello World!");
87-
speakClient.Flush();
88-
Console.ReadKey();
89-
await speakClient.Stop();
86+
Console.Error.WriteLine("WebSocket connection failed — check API key and network.");
87+
return;
9088
}
89+
90+
speakClient.SpeakWithText("Hello World!");
91+
speakClient.Flush();
92+
Console.ReadKey();
93+
await speakClient.Stop();
9194
```
9295

9396
## Key params
@@ -98,23 +101,12 @@ WebSocket `SpeakSchema`: `Model`, `BitRate`, `Encoding`, `SampleRate`.
98101

99102
Streaming controls: `SpeakWithText`, `Flush`, `Clear`, `Close`, `SendMessageImmediately`.
100103

101-
## API reference (layered)
102-
103-
1. **In-repo source of truth**:
104-
- `Deepgram/ClientFactory.cs`
105-
- `Deepgram/Clients/Speak/v1/REST/Client.cs`
106-
- `Deepgram/Clients/Speak/v2/WebSocket/Client.cs`
107-
- `Deepgram/Models/Speak/v1/REST/SpeakSchema.cs`
108-
- `Deepgram/Models/Speak/v2/WebSocket/SpeakSchema.cs`
109-
2. **Canonical OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml
110-
3. **Canonical AsyncAPI (streaming / WSS)**: https://developers.deepgram.com/asyncapi.yaml
111-
4. **Context7**:
112-
- repo mirror: `https://context7.com/deepgram/deepgram-dotnet-sdk`
113-
- docs corpus: `/llmstxt/developers_deepgram_llms_txt`
114-
5. **Product docs**:
115-
- https://developers.deepgram.com/reference/text-to-speech/speak-request
116-
- https://developers.deepgram.com/reference/text-to-speech/speak-streaming
117-
- https://developers.deepgram.com/docs/tts-models
104+
## References
105+
106+
- In-repo: `Deepgram/Clients/Speak/v1/REST/Client.cs`, `Deepgram/Clients/Speak/v2/WebSocket/Client.cs`, `Deepgram/Models/Speak/v1/REST/SpeakSchema.cs`, `Deepgram/Models/Speak/v2/WebSocket/SpeakSchema.cs`
107+
- OpenAPI (REST): https://developers.deepgram.com/openapi.yaml
108+
- AsyncAPI (WSS): https://developers.deepgram.com/asyncapi.yaml
109+
- Product docs: https://developers.deepgram.com/reference/text-to-speech/speak-request, https://developers.deepgram.com/docs/tts-models
118110

119111
## Gotchas
120112

@@ -133,12 +125,4 @@ Streaming controls: `SpeakWithText`, `Flush`, `Clear`, `Close`, `SendMessageImme
133125
- `examples/text-to-speech/websocket/simple/Program.cs`
134126
- `tests/edge_cases/tts_v1_client_example/`
135127

136-
## Central product skills
137-
138-
For cross-language Deepgram product knowledge — the consolidated API reference, documentation finder, focused runnable recipes, third-party integration examples, and MCP setup — install the central skills:
139-
140-
```bash
141-
npx skills add deepgram/skills
142-
```
143-
144-
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
128+
Cross-language product knowledge (API reference, recipes, MCP setup): `npx skills add deepgram/skills`.

0 commit comments

Comments
 (0)