> ## Documentation Index
> Fetch the complete documentation index at: https://vlyai-1c28d863.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cross-project referencing

> Pull a component, schema, or pattern from one of your projects into another. The way vly users build their own personal libraries.

Once you've shipped a few projects, you'll have built useful patterns — a billing flow, a custom date picker, a multi-tenant auth setup — that you'd like to reuse. Cross-project referencing lets you pull these into new projects by reference.

## How it works

<Steps>
  <Step title="In a target project, prompt with a reference">
    "Add billing to this project — use the same setup as in my `acme-corp` project."
  </Step>

  <Step title="vly fetches the relevant code">
    From the named project, with proper auth scoping (you must own both).
  </Step>

  <Step title="Adapts and inserts">
    The agent ports the pattern to the target project, adjusting for differences in schema and naming.
  </Step>
</Steps>

The new project gets its own copy of the code — there's no live link. Updates to the source project don't propagate.

## Example uses

<CardGroup cols={2}>
  <Card title="Reuse a billing setup" icon="credit-card">
    "Use the Stripe subscription flow from my `payments-template` project."
  </Card>

  <Card title="Reuse a component library" icon="boxes">
    "Bring over the `<DataTable />` and `<DateRangePicker />` from `internal-tools`."
  </Card>

  <Card title="Reuse a schema pattern" icon="database">
    "Use the same multi-tenant schema (workspaces, memberships, invites) as `previous-saas`."
  </Card>

  <Card title="Reuse an integration" icon="puzzle">
    "Bring over the Slack notification action from `team-tools`."
  </Card>
</CardGroup>

## Permissions

You can reference any project you own or have admin access to in the same workspace. To reference across workspaces, the source project's owner must explicitly mark it as "shareable" in project settings.

## Tips

<Tip>
  **Build a personal library.** Many vly users keep a `templates` workspace with their favorite patterns. Reference from there into new projects.
</Tip>

<Tip>
  **Reference is one-way.** Once code is copied into the target, edits don't sync back. For shared, evolving code, use a shared component library (npm package) — coming to vly soon; see [roadmap](/resources/roadmap).
</Tip>

## Related

<CardGroup cols={3}>
  <Card title="Templates" icon="file-stack" href="/building/templates">
    Curated, maintained starting points.
  </Card>

  <Card title="Knowledge base" icon="book" href="/building/knowledge-base">
    Project-scoped reference for the agent.
  </Card>

  <Card title="GitHub integration" icon="github" href="/integrations/github">
    For sharing code as actual repos / npm packages.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.