Provide Inject

Teaches Vue's provide/inject API for dependency injection across components. Use when deeply nested components need access to ancestor data without threading props through intermediate layers.

259 stars 28 forksFrontend & Design

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add PatternsDev/skills --skill provide-inject
Manual install
git clone --depth 1 https://github.com/PatternsDev/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/vue/provide-inject ~/.claude/skills/provide-inject

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Provide/Inject

When managing data between parent and child components, Vue gives us the ability to use something known as **props** to pass data down from parent to child. Props can only flow in one direction, from parent components to child components (and further down). When state changes occur on parent elements, Vue will re-render components that depend on those values.

Using props works well in most cases. However, when working in large applications with a large number of components in the component tree, props can become hard to maintain since props need to be declared in _each and every component_ in the component tree.

## When to Use

- Use this when you need to pass data through deeply nested component trees without prop drilling
- This is helpful for application-wide data like themes, locale, or authentication state

## When NOT to Use

- For parent-child communication where props are simpler, more explicit, and easier to trace
- When the implicit dependency makes components harder to test in isolation or reuse outside the provider tree
- When a state management solution (Pinia) is already in place and provides the same shared state capability

## Instructions

- Use `provide()` in a parent or ancestor component to make data available to all descendants
- Use `inject()` in child components to access provided data
- Use app-level `app.provide()` for data needed across the entire application (e.g., plugins)
Read the full skill on GitHub

Details

Skill name
provide-inject
Path
vue/provide-inject/SKILL.md
Repo updated
15 April 2026

FAQ

What does the Provide Inject skill do?

Teaches Vue's provide/inject API for dependency injection across components. Use when deeply nested components need access to ancestor data without threading props through intermediate layers.

How do I install the Provide Inject skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add PatternsDev/skills --skill provide-inject. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Provide Inject popular?

It lives in PatternsDev/skills, which has 259 GitHub stars and 28 forks.

Related skills

Browse the most popular Claude skills, all frontend & design skills, or write your own with the skills generator.