token-provider

Manage multiple instances of the same type using string tokens.

Updated May 10, 2026
One-click install
npx skills add https://github.com/jymchng/injectable --skill token-provider
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: token-provider
Source: https://github.com/jymchng/injectable/tree/main/skills/token-provider
Command: npx skills add https://github.com/jymchng/injectable --skill token-provider

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The token-provider skill addresses the challenge of managing multiple instances of the same type, such as database pools or HTTP clients, with unique identifiers for easier resolution and use in applications.

Core Features & Use Cases

  • Token-based Resolution: Register and resolve multiple instances using string tokens, allowing for different configurations or connections to be used with specific names.
  • Use Case: For example, different database pools for production and development environments can be registered and used by name when required in the application code.

Quick Start

To register and use a token provider:

  1. Register providers with specific tokens.
  2. Resolve a provider using its token.

Frequently Asked Questions about token-provider

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage multiple database pool instances with different configurations in dependency injection?

You can manage multiple database pool instances by registering each provider with a unique string token for dependency injection. This allows you to resolve and retrieve specific configurations by name when needed in your application code.

What is token-based service registration for named dependencies?

Token-based service registration is a mechanism that manages multiple instances of the same type using unique string identifiers. It enables flexible and configurable dependency resolution for applications requiring named service instances.

How do I register and resolve multiple HTTP clients by name in application configuration?

You register each HTTP client instance with a specific string token, then resolve a provider using its token during application configuration. This enables distinct environments like production and development to use separate, named connections.

Can I resolve different provider instances for production and development environments?

Yes, you can register different provider instances with specific tokens representing production and development environments. You then resolve a provider using its assigned token to retrieve the correct configuration for that environment.

What is the best way to handle multi-instance management for identical service types?

The best way to handle multi-instance management for identical service types is using string token resolution. This approach provides unique identifiers for each instance, enabling easier and flexible dependency resolution across your application.