Skip to content

Commit ebb169d

Browse files
authored
chore: add agent skills for product usage and maintenance [no-ci] (#401)
* chore: add agent skills for product usage and maintenance Add 8 agent-agnostic skills under .agents/skills/ following the skills.sh convention (discoverable by OpenCode, Claude Code, Codex, Cursor, and 40+ other agent tools via `npx skills`). Product usage skills (7): - using-speech-to-text — /v1/listen REST + WSS - using-text-to-speech — /v1/speak REST + WSS - using-text-intelligence — /v1/read REST - using-audio-intelligence — /v1/listen analytics overlays - using-voice-agent — agent.deepgram.com/v1/agent/converse WSS - using-conversational-stt — /v2/listen Flux WSS - using-management-api — manage.v1.* + voice_agent.configurations Maintainer skill (1): - maintaining-dotnet-sdk — C#/.NET SDK maintenance workflow Each skill includes authentication, quick-start with real C#/.NET code from examples/, key parameters, layered API references (in-repo, OpenAPI, AsyncAPI, Context7, product docs), gotchas, and sibling-skill routing. * docs: cross-reference deepgram/skills for central product knowledge Each product skill now points back to the `deepgram/skills` repo for the consolidated API reference, documentation finder, runnable recipes, third-party integration examples, and MCP setup. This SDK's skills stay language-idiomatic; the central skills stay cross-language. * chore: namespace skill names with deepgram-dotnet- prefix Rename all 8 skill folders (and frontmatter `name` fields and sibling-skill cross-references) to avoid collisions when a user installs skills from multiple Deepgram SDK repos. Old → new: using-speech-to-text → deepgram-dotnet-speech-to-text using-text-to-speech → deepgram-dotnet-text-to-speech using-text-intelligence → deepgram-dotnet-text-intelligence using-audio-intelligence → deepgram-dotnet-audio-intelligence using-voice-agent → deepgram-dotnet-voice-agent using-conversational-stt → deepgram-dotnet-conversational-stt using-management-api → deepgram-dotnet-management-api maintaining-dotnet-sdk → deepgram-dotnet-maintaining-sdk Previously each SDK published identically-named product skills (e.g. every SDK had `using-speech-to-text`), so installing skills from two SDKs would overwrite the first. The `deepgram-` prefix makes the vendor+language explicit and the names globally unique. * docs: write streaming audio to .raw not .wav (Copilot feedback) WebSocket audio frames from Voice Agent and streaming Speak are raw linear16 PCM with no WAV container. Appending them to a .wav file produces an invalid WAV (header missing, sample-rate/channel metadata absent). Switched both examples to write .raw files, matching the pattern used in examples/agent/websocket/no_mic/Program.cs and examples/text-to-speech/websocket/simple/Program.cs. Added an inline comment documenting the two valid options (save raw, or prepend a WAV header). * docs: document ClientFactory credential sources (Copilot feedback) All 5 Dotnet auth snippets now explain that ClientFactory reads credentials from the DEEPGRAM_API_KEY / DEEPGRAM_ACCESS_TOKEN env vars by default, and show how to pass them explicitly via the apiKey:/accessToken: parameter. DeepgramHttpClientOptions / DeepgramWsClientOptions throw if neither source is available, so users pasting the snippet needed to know where credentials come from. Affected skills: audio-intelligence, conversational-stt, voice-agent, text-intelligence, management-api.
1 parent 6a78aca commit ebb169d

8 files changed

Lines changed: 1151 additions & 0 deletions

File tree

  • .agents/skills
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
name: deepgram-dotnet-audio-intelligence
3+
description: Use when writing or reviewing C# code in this repo that enables Deepgram intelligence overlays on Speech-to-Text requests. Covers `PreRecordedSchema` analytics flags such as `Summarize`, `Topics`, `Intents`, `Sentiment`, `DetectLanguage`, `DetectEntities`, `Diarize`, and `Redact`, plus the smaller live-streaming subset on `LiveSchema`. Use `deepgram-dotnet-speech-to-text` for plain transcription and `deepgram-dotnet-text-intelligence` for analytics on already-transcribed text.
4+
---
5+
6+
# Using Deepgram Audio Intelligence (.NET SDK)
7+
8+
Audio analytics live on top of the same STT clients. Turn features on through schema properties.
9+
10+
## When to use this product
11+
12+
- You have audio and want transcript + analytics in one request.
13+
- REST is the main path for summaries, topics, intents, sentiment, and language detection.
14+
15+
**Use a different skill when:**
16+
- You only need transcript text → `deepgram-dotnet-speech-to-text`.
17+
- You already have text and want `/read``deepgram-dotnet-text-intelligence`.
18+
19+
## Authentication
20+
21+
```bash
22+
dotnet add package Deepgram
23+
```
24+
25+
```csharp
26+
using Deepgram;
27+
28+
Library.Initialize();
29+
var client = ClientFactory.CreateListenRESTClient();
30+
```
31+
32+
`ClientFactory` reads credentials from the `DEEPGRAM_API_KEY` (or `DEEPGRAM_ACCESS_TOKEN`) environment variable by default. To pass them explicitly, use `ClientFactory.CreateListenRESTClient(apiKey: "...", options: ...)` / `CreateListenWebSocketClient(apiKey: "...", options: ...)`. `DeepgramHttpClientOptions` / `DeepgramWsClientOptions` throw if neither the env var nor an explicit credential is provided.
33+
34+
## Feature availability: REST vs WebSocket
35+
36+
| Feature | REST (`PreRecordedSchema`) | WebSocket (`LiveSchema`) |
37+
|---|---|---|
38+
| `Diarize` | yes | yes |
39+
| `Redact` | yes | yes |
40+
| `DetectEntities` | yes | not surfaced in `LiveSchema` |
41+
| `Summarize` | yes (`string`) | no |
42+
| `Topics` / `Intents` / `Sentiment` | yes | no |
43+
| `DetectLanguage` | yes | no |
44+
| `CustomTopic` / `CustomIntent` | yes | no |
45+
46+
## Quick start — REST
47+
48+
```csharp
49+
using Deepgram.Models.Listen.v1.REST;
50+
51+
var client = ClientFactory.CreateListenRESTClient();
52+
53+
var response = await client.TranscribeUrl(
54+
new UrlSource("https://dpgr.am/spacewalk.wav"),
55+
new PreRecordedSchema()
56+
{
57+
Model = "nova-3",
58+
Punctuate = true,
59+
SmartFormat = true,
60+
Diarize = true,
61+
Summarize = "v2",
62+
Topics = true,
63+
Intents = true,
64+
Sentiment = true,
65+
DetectLanguage = true,
66+
DetectEntities = true,
67+
Redact = new List<string> { "pii", "numbers" },
68+
Language = "en",
69+
});
70+
71+
Console.WriteLine(response.Results.Channels[0].Alternatives[0].Transcript);
72+
Console.WriteLine(response.Results.Summary);
73+
```
74+
75+
## Quick start — live subset
76+
77+
```csharp
78+
using Deepgram.Models.Listen.v2.WebSocket;
79+
80+
var liveClient = ClientFactory.CreateListenWebSocketClient();
81+
82+
await liveClient.Subscribe(new EventHandler<ResultResponse>((sender, e) =>
83+
{
84+
Console.WriteLine(e.Channel.Alternatives[0].Transcript);
85+
}));
86+
87+
await liveClient.Connect(new LiveSchema()
88+
{
89+
Model = "nova-3",
90+
Diarize = true,
91+
Redact = new List<string> { "pii" },
92+
Encoding = "linear16",
93+
SampleRate = 16000,
94+
});
95+
```
96+
97+
## Key params
98+
99+
REST (`PreRecordedSchema`): `Summarize`, `Topics`, `Intents`, `Sentiment`, `DetectLanguage`, `DetectEntities`, `CustomTopic`, `CustomTopicMode`, `CustomIntent`, `CustomIntentMode`, `Diarize`, `DiarizeVersion`, `Redact`, `Utterances`, plus the regular STT knobs.
100+
101+
Live (`LiveSchema`): `Diarize`, `Redact`, `UtteranceEnd`, `VadEvents`, `Punctuate`, `SmartFormat`, plus normal streaming STT settings.
102+
103+
## API reference (layered)
104+
105+
1. **In-repo source of truth**:
106+
- `Deepgram/Models/Listen/v1/REST/PreRecordedSchema.cs`
107+
- `Deepgram/Models/Listen/v2/WebSocket/LiveSchema.cs`
108+
- `Deepgram/Clients/Listen/v1/REST/Client.cs`
109+
- `Deepgram/Clients/Listen/v2/WebSocket/Client.cs`
110+
2. **Canonical OpenAPI (REST)**: https://developers.deepgram.com/openapi.yaml
111+
3. **Canonical AsyncAPI (streaming / WSS)**: https://developers.deepgram.com/asyncapi.yaml
112+
4. **Context7**:
113+
- repo mirror: `https://context7.com/deepgram/deepgram-dotnet-sdk`
114+
- docs corpus: `/llmstxt/developers_deepgram_llms_txt`
115+
5. **Product docs**:
116+
- https://developers.deepgram.com/docs/stt-intelligence-feature-overview
117+
- https://developers.deepgram.com/docs/summarization
118+
- https://developers.deepgram.com/docs/topic-detection
119+
- https://developers.deepgram.com/docs/intent-recognition
120+
- https://developers.deepgram.com/docs/sentiment-analysis
121+
- https://developers.deepgram.com/docs/language-detection
122+
- https://developers.deepgram.com/docs/redaction
123+
- https://developers.deepgram.com/docs/diarization
124+
125+
## Gotchas
126+
127+
1. **`Summarize` on STT is a string.** Use `Summarize = "v2"`, not `true`.
128+
2. **Most intelligence overlays are REST-only.** The live schema does not expose summary/topic/intent/sentiment/language options.
129+
3. **Redaction is a `List<string>`.** This SDK does not expose the Python-style union of string-or-array.
130+
4. **Custom topics and intents need modes.** Set `CustomTopicMode` / `CustomIntentMode` or the model behavior will not match expectations.
131+
5. **Diarization is available in both paths, but the event shapes differ.** Live results expose speaker data word-by-word in streaming responses.
132+
133+
## Example files in this repo
134+
135+
- `examples/speech-to-text/rest/summary/Program.cs`
136+
- `examples/speech-to-text/rest/sentiment/Program.cs`
137+
- `examples/speech-to-text/rest/topic/Program.cs`
138+
- `examples/speech-to-text/rest/intent/Program.cs`
139+
- `examples/speech-to-text/rest/file/Program.cs`
140+
141+
## Central product skills
142+
143+
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:
144+
145+
```bash
146+
npx skills add deepgram/skills
147+
```
148+
149+
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
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.
4+
---
5+
6+
# Using Deepgram Conversational STT / Flux (.NET SDK)
7+
8+
This repo does **not** currently expose a dedicated Flux / conversational STT API surface comparable to the Python SDK's `listen.v2.connect(...)` + `TurnInfo` flow.
9+
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+
15+
**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`.
18+
19+
## Current repo status
20+
21+
What exists:
22+
- `ClientFactory.CreateListenWebSocketClient()` returns the latest WebSocket listen client.
23+
- Request model: `Deepgram.Models.Listen.v2.WebSocket.LiveSchema`.
24+
- Event models: `OpenResponse`, `MetadataResponse`, `ResultResponse`, `SpeechStartedResponse`, `UtteranceEndResponse`, `CloseResponse`, `ErrorResponse`, `UnhandledResponse`.
25+
- Control helpers: `SendKeepAlive()`, `SendFinalize()`, `SendClose()`, `Send(...)`.
26+
27+
What is **not** present in the current repo search:
28+
- No `flux` model constants or examples.
29+
- No `TurnInfo` / turn-aware event models.
30+
- No `language_hint`, `eager_eot_threshold`, `eot_threshold`, or similar Flux request properties.
31+
- No README/examples that mention conversational STT explicitly.
32+
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+
48+
## Closest supported code path today
49+
50+
```csharp
51+
using Deepgram.Models.Listen.v2.WebSocket;
52+
53+
var liveClient = ClientFactory.CreateListenWebSocketClient();
54+
55+
await liveClient.Subscribe(new EventHandler<ResultResponse>((sender, e) =>
56+
{
57+
var transcript = e.Channel.Alternatives[0].Transcript;
58+
if (!string.IsNullOrWhiteSpace(transcript))
59+
{
60+
Console.WriteLine(transcript);
61+
}
62+
}));
63+
64+
await liveClient.Subscribe(new EventHandler<UtteranceEndResponse>((sender, e) =>
65+
{
66+
Console.WriteLine(e.Type);
67+
}));
68+
69+
await liveClient.Connect(new LiveSchema()
70+
{
71+
Model = "nova-3",
72+
Encoding = "linear16",
73+
SampleRate = 16000,
74+
InterimResults = true,
75+
UtteranceEnd = "1000",
76+
VadEvents = true,
77+
});
78+
```
79+
80+
Treat this as **standard live STT**, not true Flux parity.
81+
82+
## Key params currently available
83+
84+
On `LiveSchema`: `Model`, `Encoding`, `SampleRate`, `InterimResults`, `UtteranceEnd`, `VadEvents`, `Endpointing`, `NoDelay`, `Punctuate`, `SmartFormat`, `Keywords`, `Keyterm`, `Diarize`, `Redact`.
85+
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
102+
103+
## Gotchas
104+
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.
109+
110+
## Example files in this repo
111+
112+
- `examples/speech-to-text/websocket/file/Program.cs`
113+
- `examples/speech-to-text/websocket/http/Program.cs`
114+
- `examples/speech-to-text/websocket/microphone/Program.cs`
115+
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+
```
123+
124+
This SDK ships language-idiomatic code skills; `deepgram/skills` ships cross-language product knowledge (see `api`, `docs`, `recipes`, `examples`, `starters`, `setup-mcp`).
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
---
2+
name: deepgram-dotnet-maintaining-sdk
3+
description: Use when maintaining this hand-written Deepgram .NET SDK: editing client code, models, examples, tests, solution files, CI/CD packaging, or NuGet release flows. This repo is not Fern-generated. Covers `dotnet build`, `dotnet test`, `dotnet pack`, solution-file selection (`Deepgram.sln`, `Deepgram.Dev.sln`, `Deepgram.DevBuild.sln`), `clean-up.sh`, and NuGet publishing conventions from GitHub Actions.
4+
---
5+
6+
# Maintaining the Deepgram .NET SDK
7+
8+
This SDK is hand-maintained C#/.NET code. It is **not** Fern-generated. Do not use Fern regeneration instructions from other Deepgram SDKs here.
9+
10+
## Repo shape
11+
12+
- `Deepgram/` — main SDK package (`Deepgram.csproj`)
13+
- `Deepgram.Microphone/` — microphone helper package (`Deepgram.Microphone.csproj`)
14+
- `Deepgram.Tests/` — unit tests
15+
- `examples/` — runnable local examples
16+
- `tests/` — edge cases / expected failure projects
17+
- `clean-up.sh` — removes `.vs`, `dist`, `obj`, `bin`
18+
- `extras/dg_logo.png` — package icon packed into NuGet packages
19+
20+
## Solution files
21+
22+
- `Deepgram.sln`
23+
- main CI/CD solution
24+
- contains `Deepgram`, `Deepgram.Tests`, `Deepgram.Microphone`
25+
- used by CI, release build, and stable NuGet packaging
26+
- `Deepgram.Dev.sln`
27+
- broad developer solution
28+
- includes examples, edge cases, expected failures, and test/debug projects
29+
- `Deepgram.DevBuild.sln`
30+
- packaging-only developer-build solution
31+
- contains `Deepgram` and `Deepgram.Microphone`
32+
- used for unstable/dev NuGet packages
33+
34+
## Build, test, pack
35+
36+
Stable validation:
37+
38+
```bash
39+
dotnet restore Deepgram.sln
40+
dotnet test Deepgram.sln
41+
dotnet build Deepgram.sln --configuration Release --no-restore
42+
```
43+
44+
Stable pack:
45+
46+
```bash
47+
dotnet restore Deepgram.sln
48+
dotnet build Deepgram.sln --configuration Release --no-restore
49+
dotnet pack Deepgram.sln --configuration Release --no-restore --output ./dist -p:Version=<VERSION>
50+
```
51+
52+
Developer / prerelease pack:
53+
54+
```bash
55+
dotnet restore Deepgram.DevBuild.sln
56+
dotnet build Deepgram.DevBuild.sln --configuration Release --no-restore
57+
dotnet pack Deepgram.DevBuild.sln --configuration Release --no-restore --output ./dist -p:Version=<VERSION>
58+
```
59+
60+
Local cleanup:
61+
62+
```bash
63+
bash ./clean-up.sh
64+
```
65+
66+
## NuGet package behavior
67+
68+
`Deepgram/Deepgram.csproj`:
69+
- stable package ID on `Deepgram.sln`: `Deepgram`
70+
- unstable package ID on `Deepgram.DevBuild.sln`: `Deepgram.Unstable.SDK.Builds`
71+
72+
`Deepgram.Microphone/Deepgram.Microphone.csproj`:
73+
- stable package ID on `Deepgram.sln`: `Deepgram.Microphone`
74+
- unstable package ID on `Deepgram.DevBuild.sln`: `Deepgram.Unstable.Microphone.Builds`
75+
76+
Both projects target:
77+
- `net8.0`
78+
- `netstandard2.0`
79+
80+
Both enable:
81+
- nullable reference types
82+
- implicit usings
83+
- latest language version
84+
85+
## Release flow from GitHub Actions
86+
87+
From `.github/workflows/CD.yml`:
88+
- restore `Deepgram.sln`
89+
- build `Deepgram.sln`
90+
- pack `Deepgram.sln` into `./dist`
91+
- publish with `dotnet nuget push ./dist/**.nupkg --source nuget.org --api-key ${{secrets.NUGET_API_KEY}}`
92+
93+
From `.github/workflows/CD-dev.yml`:
94+
- same flow, but against `Deepgram.DevBuild.sln`
95+
- tag patterns include `-dev`, `-alpha`, `-beta`, `-rc`
96+
97+
## Contribution guidance
98+
99+
- Read `.github/CONTRIBUTING.md` first.
100+
- This repo welcomes docs, tests, bug fixes, and feature work.
101+
- For broad manual validation, use the example projects under `examples/`.
102+
- Keep examples resettable; `examples/README.md` explicitly asks contributors to undo local test edits.
103+
104+
## Codebase-specific maintenance notes
105+
106+
1. **No Fern.** Do not add `.fernignore`, regen scripts, or “frozen file” workflows.
107+
2. **Prefer the non-deprecated client surface.** Use `CreateListenRESTClient`, `CreateListenWebSocketClient`, `CreateSpeakRESTClient`, `CreateSpeakWebSocketClient`, `CreateManageClient`, `CreateAuthClient`, `CreateAgentWebSocketClient`.
108+
3. **Deprecated classes still exist for compatibility.** Examples: `PreRecordedClient`, `LiveClient`, `SpeakClient`, `OnPremClient`. Avoid extending them for new features.
109+
4. **Authentication supports both API keys and bearer access tokens.** `DeepgramHttpClientOptions` and `DeepgramWsClientOptions` implement priority-based credential selection.
110+
5. **The microphone helper is a separate package.** Changes in streaming examples may affect both `Deepgram/` and `Deepgram.Microphone/`.
111+
6. **Packaging metadata depends on the solution name.** If pack output looks wrong, confirm which `.sln` you used.
112+
113+
## Source-of-truth files for maintainers
114+
115+
- `README.md`
116+
- `.github/CONTRIBUTING.md`
117+
- `.github/workflows/CI.yml`
118+
- `.github/workflows/CD.yml`
119+
- `.github/workflows/CD-dev.yml`
120+
- `Deepgram/Deepgram.csproj`
121+
- `Deepgram.Microphone/Deepgram.Microphone.csproj`
122+
- `clean-up.sh`

0 commit comments

Comments
 (0)