component-model-analysis
Evaluate extensibility patterns, abstraction layers, and configuration approaches in frameworks. Use when (1) assessing base class/protocol design, (2) understanding dependency injection patterns, (3) evaluating plugin/extension systems, (4) comparing code-first vs config-first approaches, or (5) determining framework flexibility for customization.
What this skill does
# Component Model Analysis
Evaluates extensibility patterns and configuration approaches.
## Process
1. **Identify base classes** — Find BaseLLM, BaseTool, BaseAgent, etc.
2. **Classify abstraction depth** — Thick (lots of logic) vs thin (interfaces)
3. **Analyze DI patterns** — Constructor, factory, registry, container
4. **Document configuration** — Code-first, config-first, or hybrid
## Abstraction Layer Assessment
### Thick Abstractions
```python
class BaseLLM(ABC):
"""Many methods, lots of inherited behavior"""
def __init__(self, model: str, temperature: float = 0.7):
self.model = model
self.temperature = temperature
self._cache = {}
def generate(self, prompt: str) -> str:
cached = self._check_cache(prompt)
if cached:
return cached
result = self._generate_impl(prompt)
self._update_cache(prompt, result)
return self._postprocess(result)
@abstractmethod
def _generate_impl(self, prompt: str) -> str: ...
def _check_cache(self, prompt): ...
def _update_cache(self, prompt, result): ...
def _postprocess(self, result): ...
def stream(self, prompt): ...
def batch(self, prompts): ...
# ... 15+ more methods
```
**Characteristics**:
- Deep inheritance trees (3+ levels)
- Many non-abstract methods
- Shared state/caching logic
- Hard to understand full behavior
### Thin Abstractions (Protocols)
```python
from typing import Protocol
class LLM(Protocol):
"""Minimal interface contract"""
def generate(self, messages: list[Message]) -> str: ...
class StreamingLLM(Protocol):
def stream(self, messages: list[Message]) -> Iterator[str]: ...
```
**Characteristics**:
- Pure interfaces
- No inherited behavior
- Duck typing compatible
- Easy to mock/test
### Mixed Approach
```python
class LLMBase(ABC):
"""Some shared logic, but minimal"""
@abstractmethod
def generate(self, messages: list) -> str: ...
def generate_with_retry(self, messages: list, retries: int = 3) -> str:
"""Optional convenience method"""
for i in range(retries):
try:
return self.generate(messages)
except RateLimitError:
time.sleep(2 ** i)
raise
```
## Dependency Injection Patterns
### Constructor Injection
```python
class Agent:
def __init__(
self,
llm: LLM,
tools: list[Tool],
memory: Memory | None = None
):
self.llm = llm
self.tools = tools
self.memory = memory or InMemoryStore()
```
**Pros**: Explicit, testable, IDE support
**Cons**: Verbose construction, manual wiring
### Factory Pattern
```python
class Agent:
@classmethod
def from_config(cls, config: AgentConfig) -> "Agent":
llm = LLMFactory.create(config.llm)
tools = [ToolFactory.create(t) for t in config.tools]
return cls(llm=llm, tools=tools)
@classmethod
def from_yaml(cls, path: str) -> "Agent":
config = yaml.safe_load(open(path))
return cls.from_config(AgentConfig(**config))
```
**Pros**: Flexible construction, config-driven
**Cons**: Hidden dependencies, magic
### Global Registry
```python
TOOL_REGISTRY: dict[str, type[Tool]] = {}
def register_tool(name: str):
def decorator(cls):
TOOL_REGISTRY[name] = cls
return cls
return decorator
@register_tool("search")
class SearchTool(Tool): ...
# Usage
tool = TOOL_REGISTRY["search"]()
```
**Pros**: Plugin-friendly, discoverable
**Cons**: Global state, harder to test, implicit
### Container-Based DI
```python
from dependency_injector import containers, providers
class Container(containers.DeclarativeContainer):
config = providers.Configuration()
llm = providers.Singleton(
OpenAI,
api_key=config.openai.api_key
)
agent = providers.Factory(
Agent,
llm=llm
)
```
**Pros**: Full lifecycle control, scopes
**Cons**: Complex, learning curve
## Configuration Strategy
### Code-First
```python
agent = Agent(
llm=OpenAI(model="gpt-4", temperature=0.7),
tools=[SearchTool(), CalculatorTool()],
max_steps=10
)
```
**Characteristics**: Type-safe, IDE completion, refactorable
### Config-First
```yaml
# agent.yaml
llm:
provider: openai
model: gpt-4
temperature: 0.7
tools:
- search
- calculator
max_steps: 10
```
```python
agent = Agent.from_yaml("agent.yaml")
```
**Characteristics**: Non-developer friendly, runtime changes, less type safety
### Hybrid
```python
# Base config from file
base = AgentConfig.from_yaml("agent.yaml")
# Code overrides
agent = Agent(
**base.dict(),
llm=CustomLLM() # Override specific component
)
```
## Output Template
```markdown
## Component Model Analysis: [Framework Name]
### Abstraction Assessment
| Component | Base Class | Depth | Type |
|-----------|-----------|-------|------|
| LLM | BaseLLM | 3 levels | Thick |
| Tool | BaseTool | 2 levels | Mixed |
| Memory | Protocol | 0 levels | Thin |
### Dependency Injection
- **Primary Pattern**: [Constructor/Factory/Registry/Container]
- **Testability**: [Easy/Medium/Hard]
- **Configuration**: [Code/Config/Hybrid]
### Extension Points
| Extension | Mechanism | Difficulty |
|-----------|-----------|------------|
| Custom LLM | Inherit BaseLLM | Medium |
| Custom Tool | @register_tool | Easy |
| Custom Memory | Implement Protocol | Easy |
### Configuration
- **Strategy**: [Code-first/Config-first/Hybrid]
- **Formats**: [Python/YAML/JSON/TOML]
- **Validation**: [Pydantic/Manual/None]
### Recommendations
- [List any concerns or suggestions]
```
## Integration
- **Prerequisite**: `codebase-mapping` to identify base classes
- **Feeds into**: `comparative-matrix` for extensibility decisions
- **Related**: `antipattern-catalog` for inheritance issues
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.