Agent skill
skills-intrusive-memory-swifthablare
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/skills-intrusive-memory-swifthablare
SKILL.md
Skill: Register a Custom Voice Provider
Use this skill when you need to add a new VoiceProvider implementation and expose it through the shared
VoiceProviderRegistry.
Steps
-
Create the provider type
- Add a new file under
Sources/SwiftHablare/Providers/(or a nested folder) that defines a type conforming toVoiceProvider. - Implement
isConfigured()to verify the provider’s own persisted settings (API keys, model IDs, etc.). - Keep persistence local to the provider—use
UserDefaults, the keychain, or custom storage as needed. - Supply a SwiftUI configuration panel by implementing
makeConfigurationView(onConfigured:)when SwiftUI is available.
- Add a new file under
-
Declare a descriptor
- Extend the provider with a static
descriptorproperty returningVoiceProviderDescriptor. - Populate the descriptor with a stable identifier, display name, enablement defaults, and a factory closure that returns a new instance of the provider.
- If the provider needs custom configuration UI, pass a configuration panel builder (otherwise the registry uses
makeConfigurationView(onConfigured:)).
- Extend the provider with a static
-
Register the provider
- During startup (for example in
SwiftHablare.configureVoiceProviders()or app initialization), callawait VoiceProviderRegistry.shared.register(NewProvider.descriptor)or subclassVoiceProviderAutoRegistrarto register automatically when the module loads on Objective-C platforms. - The registry persists enablement state automatically and will call the provider’s
isConfigured()before returning it fromconfiguredProvider(for:).
- During startup (for example in
-
Surface configuration UI
- Use
VoiceProviderRegistry.shared.configurationPanel(for:onConfigured:)when the user enables the provider or wants to edit its settings. - Ensure the configuration view saves credentials/settings and calls the completion handler with
trueupon success so the registry can mark the provider as enabled.
- Use
-
Verify integration
- Fetch the updated catalog with
VoiceProviderRegistry.shared.availableProviders()and confirm the new provider appears with the correct enablement and configuration status. - Run any relevant unit tests or add new coverage specific to the provider.
- Fetch the updated catalog with
References
Sources/SwiftHablare/VoiceProvider.swiftSources/SwiftHablare/VoiceProviderRegistry.swiftSources/SwiftHablare/Providers/AppleVoiceProvider.swiftSources/SwiftHablare/Providers/ElevenLabsVoiceProvider.swift
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?