Skip to content
cccskills
FreePublished on GitHub

plugin-architecture

Build pluggable authentication features using the plugin system with initialization, migrations, routes, and service registration.

The English summary is being prepared. Showing the original description.

Authula/authula273 stars(GitHub 273 + cccskills 0)

Run score Not tested

See how to install

Files included (1)

  • SKILL.md2.1 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Plugin Architecture & Lifecycle

When to use this skill

  • Create new authentication plugins (OAuth2, Magic Link, JWT, etc.)
  • Extend authentication with custom features
  • Define plugin configuration and metadata
  • Handle plugin initialization, migrations, and lifecycle
  • Provide HTTP routes through a plugin
  • Hook into core authentication events

Key principles

  1. Interface-driven: Plugins implement optional interfaces
  2. Composition: Dependencies via context, not inheritance
  3. Self-contained: Each plugin has its own services, repositories, handlers
  4. Lazy initialization: Heavy operations in Init(), not constructors
  5. Event-driven: Plugins hook into core events
  6. Service registry: Plugins register services for other plugins

Pattern

Plugin lifecycle:

  • Define metadata (ID, name, version)
  • Implement Init to retrieve services, create repositories/services
  • Implement optional Routes, Migrations, Middleware
  • Register custom services with registry
  • Implement Close for cleanup

Example

See plugins/email-password/plugin.go for:

  • EmailPasswordPlugin metadata and Init pattern
  • Service retrieval and registration
  • Routes definition and handler wiring
  • Lifecycle management (Close)

Common mistakes

  1. Initializing in constructor instead of Init()
  2. Not retrieving services from registry (use Get with type assertion)
  3. Forgetting type assertions on service retrieval
  4. Registering services with wrong names
  5. Not implementing Close()
  6. Direct plugin-to-plugin dependencies instead of service registry
  7. Not handling initialization errors

References

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Wire dependencies using constructor-based dependency injection throughout services, repositories, and handlers.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

Use this skill when answering questions, explaining concepts, writing technical responses, reviewing code, or helping with development tasks. Communicate in clear, simple, standard English. Keep answers concise and focused, remove unnecessary filler and repetition, explain technical ideas in plain language, and structure information so it is easy to read and understand. When showing code, present it clearly with enough context for the developer to understand what it does and where it belongs.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

A relentless interview to sharpen a plan or design.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

Implement HTTP handlers that parse requests, invoke use cases, and format responses following REST conventions.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

Compact the current conversation into a handoff document for another agent to pick up.

The English summary is being prepared. Showing the original description.

Authula/authula273Updated Oct 24, 2026

See all skills by Authula

Report a problem with this skill