Skip to content

Official Smart Plugins site Smart Plugins are independent third-party plugins for Obsidian. Smart Connections is the flagship plugin.

Smart Context

Smart Context turns notes and other supported sources into a package you can inspect before copying, exporting, or sending it.

The first current-note copy workflow is available in Core. This page shows the complete Pro interface. Requirements and availability summarizes the edition boundaries.

New to Smart Context?

Start with Getting started with Smart Context. The first workflow copies one active note at Depth 0 and verifies the pasted result.

What the numbers show:

  1. Copy context is the action to use after reviewing the package.
  2. The expanded source tree shows what the package currently contains.
  3. The source-mode tabs choose how to find more evidence.
  4. Search results are candidates until you add them.

In this guide


Copy reviewed context

Choose the smallest output that fits the task. A completed copy notice shows that the action ran. The pasted or opened result shows whether the content is correct.

Output Edition What it puts on the clipboard Verify
Copy text Core and Pro A text package with a context tree and source items. Paths, source bodies, and exclusions match the reviewed package.
Copy media Pro One composite clipboard image built from selected images and rendered PDF pages. Every intended image or page appears and remains readable.
Copy ZIP Pro A ZIP file reference. Open the archive and inspect its file list before sharing it.
Copy link tree Core current-note command and Pro package menus A compact text hierarchy of source links. The hierarchy contains the intended sources.
Copy with Template Core and Pro, with Smart Templates A template-shaped text result. The selected template and sources both appear. This action is added by Smart Templates when it is installed and the package contains items.

If a media or ZIP safety limit appears, cancel and reduce the selection. Use Zip anyway only after reviewing the warning and destination.


File navigator actions

Right-click a supported selection in Obsidian's Files view, then choose the action that matches the amount of review you need:

Action Use it when What happens
Copy selected notes as context At least two selected Markdown notes already form the right package. Copies them immediately. No link-depth chooser opens.
Copy selected folders as context At least two selected folders already form the right package. Resolves their eligible notes into one direct package.
Open selection in Context Builder Selected notes need review, removal, naming, or another output. Opens the selection as a reviewable Builder package.
Open folder in Context Builder A folder needs review before copy. Opens the folder-derived package in Builder.
Select folder to copy contents A searchable folder picker is faster than navigating the Files view. Resolves the chosen folder and copies its eligible contents.

Use direct copy when the selection is already correct. Use Builder when you must remove items, name the package, choose another output, or examine Pro Rules. Direct file and folder actions do not use a selectable link depth. Use the current-note workflow when the task requires link traversal.


Start from the current note

Core and Pro expose different first-copy controls:

Pro also provides Smart Context Pro: Copy current context clipboard (choose link depth) in the Command Palette. It opens the estimated Copy context modal. Selecting a row copies immediately.

What the numbers show:

  1. In the Pro menu, Choose link depth... opens the estimated modal.
  2. Depth 0 - current note opens the direct output submenu for the active note and material it embeds.
  3. Depth 1 - outlinks only opens the direct output submenu for outgoing linked notes.
  4. Depth 1 - include backlinks opens the direct output submenu for incoming and outgoing links.

What the numbers show:

  1. In the Copy context modal, selecting Depth 0 with Current note copies text immediately.
  2. Depth 1 with Outlinks only follows outgoing links.
  3. Depth 1 with Include backlinks follows incoming and outgoing links.
  4. In Pro, Shift + Select copies media for the selected depth.

Depth 0 does not traverse ordinary links. Embedded notes can still appear because they are part of the current note's rendered content. Higher depths follow links breadth-first.

Choose the smallest useful depth

Depth Adds Use it when
0 The current source, embedded material, and depth-0 codeblock additions. The active note already contains the assignment and evidence.
1 - outlinks only Notes linked from the starting source. Intentional outgoing links hold the missing evidence.
1 - include backlinks Outgoing and incoming linked notes. Notes that point to the starting source also matter.
2 or 3 Additional linked layers. A bounded multi-hop relationship is required and the larger package remains reviewable.

Fixed-depth commands skip the chooser and work well as hotkeys. Core provides direct copy for depth 0, depth 1, and depth 1 with backlinks. Pro adds depth 2 and depth 3, with and without backlinks.

The first Smart Context codeblock in the active note can add items to the depth-0 package. When those additions change the result, the chooser can show a No codeblock row so you can copy the note without them. Embedded notes and a Base embedded in the starting source are also handled at depth 0.

Character, item, and token counts are estimates for choosing a manageable package. The destination can count tokens differently.

For either edition, finish the workflow this way:

  1. Open the note that owns the task.
  2. Copy at the smallest useful depth using the controls for your edition.
  3. Read the copy notice for file and character counts.
  4. Paste into a clean note or composer.
  5. Make sure that the (current) source, every <item> path, and all embedded material are correct.
  6. Widen the depth only when the missing evidence is linked from or back to the note.

In Pro, hold Shift while choosing a depth in the chooser when you intend to copy media instead of text.


Build reusable AI context packages in Obsidian

From the Command Palette, run the Builder command for your installed edition:

In either edition, you can also choose the Smart Context: Open Builder ribbon action. Builder separates the package being reviewed from the source mode used to find evidence.

Read the active package

The Builder header shows Build context, Add sources, and a review area with:

In Pro, the header also shows the Rules count. Token counts are estimates. A destination can tokenize the same text differently.

Choose among the nine source modes

Source mode Edition Use it for
Notes Core and Pro Markdown notes, Bases, and Canvas files.
Media Pro Images and PDF attachments that need visual context.
Folders Pro A dynamic folder-derived source group. Direct folder copy remains available in Core.
Sections Core and Pro A specific heading or block instead of a whole note.
Named contexts Core and Pro A saved, reusable source package.
Linked notes Pro Notes connected to an intentional starting source.
Similar notes Pro Semantically related candidates that still require review.
Tags Pro A dynamic group derived from a tag.
External files Pro, desktop Files or folders outside the vault.

The search footer shows the available keyboard action. Enter adds the highlighted source. Cmd + Enter or the right arrow opens available blocks or sections. Shift + Enter follows links up to the available depth. Use Left Arrow to return to the parent suggestion list.

Choose Sections when only one heading or block is relevant. A smaller section usually produces a more inspectable package than a whole long note.

Check where each source came from

Keep the tree expanded long enough to verify where each source came from. Direct, section-derived, folder-derived, and named-context-derived items can have different update and exclusion behavior.

For mixed-origin packages, expand each branch and read its origin badge. A named context or folder can expand into more items than its dashboard count because its saved rules are applied when Builder resolves the package.

Leaf rows can show source type, size, share of the package, origin, and missing-source state. Remove or restore a missing source before relying on the result. In Core, edit a source named context when one of its derived items cannot be removed independently.

Remove, clear, or manage the package

Removing a direct source removes that selection. In Pro, an inherited item can come from a folder or another dynamic group. When you remove that item, Pro can create an exclusion rule. The rule keeps the item out while the group remains included.

After a rename, duplication, clear, deletion, or source removal, reopen the package. Make sure that the intended change appears. Clear removes the current package contents. Delete context removes a saved context definition.


Inspect and recover Context rules

Edition: Pro.

Open the rule-count control before copying a package assembled from folders, tags, or other dynamic sources.

What the numbers show:

  1. The visible 1 rule chip preserves continuity with the reviewed package.
  2. The global 1 exclude count and override show the current exclusion state.
  3. The Template global heading-exclusion row is visibly On for this package.
  4. Source-mode tabs remain available while Rules are inspected.

Rules make dynamic packages easy to review:

Override a global heading rule for one context

  1. The context name and source boundary identify the package being edited.
  2. Template is a global heading exclusion and is On for this package.

  1. The package and sources stay the same.

  2. Turning Template Off creates an exception for this context.

  3. Switch the override.

  4. Copy the package.

  5. Make sure that the excluded heading appears.

  6. Restore the rule.

  7. Copy the package again.

  8. Make sure that the heading is omitted.

  9. Make sure that the source remains included.

The override does not change the source note.

With the package exception active, the compiled source includes Template, its two reviewed lines, and the following Review boundary.

After the global exclusion is restored, the same source wrapper and Review boundary remain while the Template section is absent.


Save and reuse named contexts

A named context stores a reviewed source definition. Reopen it to resolve the current context package.

Save a named context

Enter a clear name in Builder after the source list is correct. In Pro, check Rules too. Use a name that describes the reusable source set. For example, use Newsletter Launch Evidence instead of the one-off prompt.

Reopen and inspect before reuse

Open the named-context dashboard or select Named contexts in Builder. Before copying, check the source count, availability, and estimate. In Pro, also check Rules. A saved name does not guarantee that every source is present or current.

What the numbers show:

  1. Newsletter Launch Evidence is the selected named context whose menu is open.
  2. Copy text, media, ZIP, and link-tree choices provide different outputs from the same package. Copy with Template is supplied by Smart Templates when available.
  3. Builder, copy, clear, and delete choices manage the selected named context.

Use the dashboard to:

Make a copy, Clear this context, and Delete context affect the saved definition. Before you select one of these actions, make sure that the selected name is correct.

After a lifecycle action:

  1. Reopen the package.
  2. Check its name.
  3. Check its source count.
  4. Check source availability.
  5. In Pro, check Rules.

Where supported, drag a named-context row into Smart Chat or another destination to reuse the package without rebuilding it.


Attach an AI context manifest to an Obsidian note

A Smart Context codeblock keeps a source manifest beside the note that uses it. Run the command for your installed edition:

Core codeblocks accept local note paths and ctx:: named-context lines:

```ctx
projects/Newsletter Launch/00 - Newsletter Launch Plan.md
projects/Newsletter Launch/04 - Channel Plan.md
ctx:: Newsletter Launch Evidence
```

Pro also accepts supported relative external include and exclude lines:

```ctx
../example-project/src
!../example-project/dist
!*.test.js
```

In Reading view, use the rendered action bar only after the source and rendered tree match. The ctx, context, and smart-context fence aliases render the same Smart Context surface. Rewrites preserve the alias used in the note.

Open the manifest in Builder when it needs review. Copy text, media, ZIP, or a link tree only after the rendered sources match the fence.

The menu can also create a named context, open the named-context dashboard, or copy at a selected depth. Pro external include lines and ! exclusion lines remain visible in the note so the package boundary can be reviewed later.

Check the rendered codeblock

Compare the fenced source with the rendered tree. Use an action only after the two views match. After copying or opening the block in Builder, make sure that named contexts resolve to the intended sources. In Pro, make sure that external paths also resolve correctly.


Add external files and code repositories to Smart Context

Edition: Pro. Desktop only.

External files adds files and folders outside the vault. Store portable relative paths when possible. Never publish an absolute home path.

Set a bounded search depth. Set a bounded item limit. Before you scan a repository, exclude dependencies, generated output, caches, and secrets with ignore patterns.

The supported syntax includes:

After you add an external path, expand the resolved tree. Make sure that included files are present. Make sure that excluded folders and patterns are absent. External files are desktop-oriented.

Use ignore patterns and scan limits to keep repositories reviewable. Exclude dependencies, builds, caches, generated output, secrets, and unrelated packages before copying. Prefer one broad folder exclusion over many child exclusions when the boundary is stable.


Copy images and PDF pages as AI context

Edition: Pro.

Add the intended images or PDF pages in Media. Review the package. Then copy it.

Copy media renders supported images and each selected PDF page into one composite clipboard image. Image aspect ratios are preserved, and PDF pages remain attributable through their file and page labels. After copying:

Clipboard capabilities vary by platform and destination, so an app can paste only the text or only the image format it supports. Smart Context does not fetch images that exist only as external web URLs. If the safety limit appears, reduce the number of items or their resolution.


Use Canvas as a source

The Notes source mode includes Canvas files. Add a Canvas only when its referenced material belongs in the package, then inspect the resolved source tree before copying.

At depth 0, the active Canvas contributes sources represented directly by its supported file cards. Higher depths follow links from those resolved sources. The copied result represents source content, not the Canvas layout: card positions, groups, and edge meaning are not encoded as semantic structure. Use Copy media or another visual export when the Canvas arrangement itself is part of the evidence.


Use Bases as a source

The Notes source mode includes Bases. Add the Base. Then examine which notes or rows appear in the reviewed tree.

Use depth 0 for the rendered Base itself. Use depth 1 only when notes linked from the rendered output are required. Narrow the Base first: the rows currently visible in the source view are not a guaranteed copy boundary. After copying, inspect which rows, filters, properties, links, and rendered text reached the destination. Relative this.file or this.note behavior must be judged from the compiled result, not the Base view alone.


Customize copied text

Smart Context settings control how the complete package and each source item are formatted. Current presets include structured XML, Markdown headings, JSON, and custom templates.

Choose an output preset. Paste a small package. Examine the exact structure. Then use the preset in a larger workflow.

The context template can use {{FILE_TREE}} for a hierarchical source map. Item templates support:

Variable Value
{{KEY}} Full item key or path
{{ITEM_NAME}} File or block name without folder path or extension
{{TIME_AGO}} Relative modified time or Missing
{{LINK_DEPTH}} Link depth, default 0
{{EXT}} File extension when available
{{IS_CURRENT}} A marker when the item belongs to the active note

{{FILE_TREE}} marks the first active-note match as current. Use {{IS_CURRENT}} when every matching item needs a marker.


Use Smart Context on mobile

In-vault note, section, named-context, codeblock, and text-copy workflows can remain useful on mobile. External file and folder browsing requires desktop filesystem access. A named context created on desktop can still open on mobile, but external items in it cannot resolve there.

Clipboard behavior depends on the mobile operating system, Obsidian version, destination app, and payload size. There is no universal maximum: start with a small depth and verify the actual paste in the destination.


Recover from missing or oversized sources

What you see What to do
A missing-source row Remove the row or restore the file. Reopen the context. Check the tree.
A folder marked truncated Narrow the folder, use a Section, or split the package.
An incomplete-output confirmation Cancel the copy. Reduce the selection. Copy again unless the partial package is intentional.
A media safety-limit warning Reduce the number of images or PDF pages, or lower their resolution.
An empty copy result Make sure that the package contains at least one included item. Make sure that Rules did not exclude all items.
Clipboard copy fails Keep Builder open. Retry once. If the copy fails again, copy a smaller package or use ZIP.

Privacy and trust

Smart Context assembles the package in Obsidian. Content can leave Obsidian when you copy, paste, export, or send it to another application or provider.

Before sending:

Requirements and availability

This page documents the current desktop Pro interface. The first useful copy does not require Pro.

Edition Current boundary
Core Current-note copy with the depth chooser.
Direct selected-note and folder copy.
Builder note and block selection.
Named contexts.
Note and named-context codeblocks.
Template-driven exports.
Canvas sources.
Pro Media, images, and PDFs.
External files, folders, and repositories.
Dynamic folder and tag groups in Builder.
Exclusions and heading filters.
Richer Bases rendering and advanced workflows.

Direct folder copy is Core. A dynamic folder or tag group inside Builder is Pro. Basic .base source handling is not a Pro-only claim. Pro adds the richer Bases workflow.

Use the live Smart Plugins Store to see which Context edition is installed and active. External files requires desktop file access. Copy with Template requires Smart Templates. On mobile, use only the source and output controls visible in that build. Examine the pasted result before you send it.