Smart Context
Prepare, review, reuse, and export Obsidian context from one Smart Context reference. Core and Pro capabilities are documented together, with Pro-only sources and outputs labeled where they apply.
In this guide
- Copy Obsidian notes and folders as AI context
- Copy the current Obsidian note with linked context
- Build reusable AI context bundles in Obsidian
- Save and reuse named context bundles
- Attach an AI context manifest to an Obsidian note
- Add external files and code repositories to Smart Context
- Copy images and PDF pages as AI context
- Copy linked context from Obsidian Canvas
- Copy linked context from Obsidian Bases
Copy Obsidian notes and folders as AI context
Smart Context Clipboard exports a reviewed set of notes, blocks, folders, or saved context items into a predictable text, link-tree, or supported media payload. The entry point determines whether the action opens a link-depth chooser or copies directly.

File navigator actions let the user copy a selected source set directly or open it in Builder for review first.
Choose the correct copy surface
| Surface | Output | Depth chooser |
|---|---|---|
| Current note command or ribbon | Text; Pro can also copy supported media | Yes |
| Current note fixed-depth command | Text; Pro can also copy supported media | No |
| Current note link-tree command | Markdown link tree | No |
| File navigator selection | Text; Pro can expose link-tree actions | No |
| Folder context menu or folder picker | Text; Pro can expose link-tree actions | No |
| Builder or Context Selector | Text or link tree; Pro adds media | No |
| Context codeblock | Text | No |
| Saved named-context row | Text | No |
Depth-chooser copy vs direct copy
Current-note chooser copy builds linked context first, then lets you choose depth and backlink inclusion.
File navigator, folder, Builder, codeblock, and saved named-context actions copy directly. They do not open the depth chooser.
Copy the current note

Current-note copy compares depth, backlink direction, and cumulative size before writing to the clipboard.
Current-note copy starts from the active supported source, follows links for the chooser, and includes items from the first Smart Context codeblock in that note at depth 0.
A No codeblock row appears only when excluding those codeblock items changes the depth-0 result.
Why did depth 0 include more than the active note?
Items from the active note's first Smart Context codeblock are included at depth 0.
Copy from the file navigator
Copy selected notes or folders directly from the file navigator.
Use Open selection in Context Builder when the set needs pruning, block-level additions, naming, or a different export action before copy.
Why did no depth chooser open from the file navigator?
File navigator copy is direct. Open the selection in Builder for review, or use current-note copy when link depth is required.
Copy one folder
Copy a folder from its context menu or choose one through the folder-picker command.
Folder copy expands eligible notes and copies them directly; it does not follow a selectable link depth.
Copy from Builder
Core Builder provides:
- Copy text
- Copy link tree
Smart Context Pro adds Copy media. These actions use the context exactly as reviewed in Builder.
Copy a codeblock context
The codeblock copy action exports only the context represented by that block.
Use current-note copy when the note body and its codeblock context should be combined.
Copy a named context
Copying from a saved named-context row exports that saved bundle directly.
The dashboard-row action does not open a separate link-depth chooser.
Can I choose link depth when copying a saved named context?
Not from the dashboard row. That action copies the saved bundle directly.
Copy a Markdown link tree
Link-tree export copies a compact Markdown hierarchy instead of merged note contents.
- vault notes render as Obsidian wikilinks
- external files render as file links when available
- folder nesting is preserved
- excluded items are omitted
- the active note can be marked
(current)
Copy images and PDFs
Smart Context Pro can include a compiled image made from supported images and PDF pages in the same copy operation as the text bundle.
Clipboard support varies by platform and destination. When visual copy is unavailable, Smart Context preserves the text output when possible.
Control exported text with templates

Context and item templates control the structure of exported text.
Context and item templates control copied text.
Use {{FILE_TREE}} for a source tree and item variables for path, name, extension, link depth, modified time, and current-note state.
Read estimates and confirmation notices

A completion notice confirms that the selected file-navigation source set was copied.
Current-note chooser rows show estimated characters, tokens, and item count.
The final notice can report copied items, characters, selected maximum depth, and exclusions.
Why does the token estimate differ from my AI tool?
The chooser uses an approximation; tokenization differs by model and provider.
File navigator actions
File navigator actions are direct-copy or Builder-seeding surfaces.
Folder context menu
Right-click a folder and choose Copy folder contents to clipboard to copy its eligible notes directly.
Smart Context Pro can also expose a folder link-tree action where supported.
Does folder copy follow links from every note?
No link-depth chooser is used. Folder copy exports the eligible notes resolved from that folder.
Multi-select files
Select at least two eligible Markdown notes, right-click the selection, and choose Copy selected notes as context.
The selected notes copy immediately; no link-depth chooser opens.
Why did the selected notes copy immediately?
File navigator copy is a direct-copy surface. Use Open selection in Context Builder when review is required first.
Why is the multi-select action missing?
Confirm the selection contains at least two currently supported notes or folders.
Multi-select folders
Select at least two folders to copy their eligible notes as one direct context bundle.
Folder contents are resolved before copy. No link-depth chooser opens.
Open selection in Context Builder
Choose Open selection in Context Builder to create a temporary Builder context from selected files and folders.
Use this route when the set needs pruning, block-level additions, naming, exclusions, or a different export action.
Copy as link tree
Smart Context Pro file-navigator link-tree actions copy a compact Markdown hierarchy.
Vault notes become wikilinks, external files use file links when available, folder nesting is preserved, and excluded items are omitted.
Folder picker command
Run Select folder to copy contents to open a searchable folder selector and copy the chosen folder directly.
Template variables and presets
The full template controls live in Smart Context settings; these variables define copied output.
Context template variables
The context template wraps the complete copied bundle.
{{FILE_TREE}} inserts a hierarchical view of the selected context items.
Item template variables
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}} |
is-current when the item belongs to the active note |
{{FILE_TREE}}
The file tree preserves folder nesting, omits excluded items, and marks the first active-note match with (current).
Why is (current) shown only once in the file tree?
The tree intentionally marks the first active-note match. Use {{IS_CURRENT}} in the item template when every matching item needs a marker.
{{IS_CURRENT}}
An item is current when it belongs to the active Obsidian file, including a block from that file.
Every matching item template can receive is-current.
Why does {{IS_CURRENT}} render empty?
The item source path does not match the active Obsidian file, or the active file is unavailable.
Active-note marker rules
{{FILE_TREE}}marks only the first active-note match.{{IS_CURRENT}}can mark every matching item.- The active Obsidian file determines the current-item marker.
Template presets
Current presets include structured XML, Markdown headings, JSON, and custom templates.
XML and Markdown presets include current-item support by default. JSON does not include {{IS_CURRENT}} by default.
Smart Context on mobile
Core note, block, named-context, codeblock, and clipboard flows can remain useful on mobile; external filesystem browsing is excluded.
Supported mobile flows
Mobile can use in-vault flows that do not require desktop filesystem access, including:
- sources and blocks
- named contexts
- Smart Context codeblocks
- text copy, subject to the device and destination clipboard
External files are unavailable
External file and folder suggestions are intentionally unavailable on mobile because they require desktop filesystem access.
A named context that contains external paths can still open, but those external items cannot resolve on mobile.
Why are external-file suggestions missing on mobile?
They require desktop filesystem access.
Named contexts on mobile
Named contexts are the most reusable mobile bundle when all included items live in the synced vault.
Review missing-source indicators before copying a context that was assembled on desktop.
Can I reuse named contexts on mobile?
Yes, when their items resolve from the mobile vault and do not depend on external paths.
Clipboard limitations
Clipboard behavior depends on the mobile operating system, Obsidian version, destination app, and payload size.
There is no documented universal maximum. For large bundles, start with a smaller depth and verify the pasted result in the destination app.
Is there a guaranteed maximum context size on mobile?
No. Test large copies on the target device and destination app.
Clipboard and data boundaries
Smart Context compiles content inside Obsidian. Content leaves the vault only when the user copies, pastes, or explicitly sends it through another configured workflow.
Troubleshooting Smart Context Clipboard
Reduce scope or depth when output is too large; use current-note copy when linked traversal is required; open a selection in Builder when it needs pruning; confirm the active source type; use the media page when images or PDFs are required.
Copy the current Obsidian note with linked context
Current-note copy builds a linked temporary context and lets the user choose depth and backlink inclusion before the clipboard write.

The current-note chooser compares cumulative depth, direction, character, token, and item estimates before copy.
Open the link-depth chooser
Run Copy current to clipboard (choose link depth).
The command validates the active source, refreshes pending source changes, builds linked context, merges the note's Smart Context codeblock, and opens the depth chooser.
Supported current-source types
Core supports:
- Markdown
- Canvas
- Excalidraw Markdown
Pro additionally supports:
- Bases
Understand Depth 0, 1, 2, and 3
Depth 0 contains the current source and embedded or codeblock-added depth-0 items.
Depth 1+ adds linked items up to the selected hop count.
When codeblock items change depth 0, a No codeblock row can appear.
Which depth should I start with?
Use the smallest depth that includes the evidence required by the assignment. Start at depth 0, then move to 1 only when directly linked notes matter.
Outlinks only vs include backlinks
Depth 1+ provides an outlinks-only row and an include-backlinks row.
Choose Include backlinks when incoming links should be part of the copied bundle.
Why are backlinks shown only on some rows?
Backlink inclusion is meaningful when linked traversal begins. Depth 1+ supplies paired outlink-only and include-backlink choices.
Use fixed-depth commands and hotkeys
Fixed-depth commands skip the chooser and are suitable for hotkeys.
Core provides direct current copy for depth 0, depth 1, and depth 1 with backlinks.
Pro adds depth 2 and depth 3, each with and without backlinks.
Use the ribbon action
![]()
The ribbon action opens the same current-note depth chooser as the command.
The current-note ribbon action opens the same chooser flow as the Command Palette command.
Include Smart Context codeblock items
The first Smart Context codeblock in the active note is resolved and merged into the copy bundle.
Merged codeblock items are forced to depth 0, marked as codeblock-derived, and do not trigger additional traversal on their own.
Why is there a No codeblock row?
The active note contains a Smart Context codeblock whose items change the depth-0 bundle. Choose No codeblock to copy the note body without those additions.
Embedded links and Bases behavior
Embedded links in the starting note collapse to depth 0.
Bases embeds in the starting source are also treated as depth 0. Bases embeds discovered in linked notes do not expand additional links.
Read character, token, and item estimates
Each chooser row reports cumulative character count, approximate token count, and item count. The token estimate is directional because provider tokenizers differ.
Copy text or media on Pro
Smart Context Pro can use the Copy with media preference for the same chooser flow, while the text-only override forces a text payload.
Troubleshooting current-note copy
Confirm the source type, choose No codeblock when depth 0 should exclude codeblock additions, start with outlinks-only, reopen the chooser after source changes, and use fixed-depth commands only after the preferred policy is known.
Build reusable AI context bundles in Obsidian
Smart Context Builder assembles a reviewable set of notes, blocks, named contexts, dynamic groups, and supported external items before the bundle is named, copied, or used elsewhere.

Builder keeps selected sources, the current context budget, and the next source suggestions visible in one review surface.
Open Smart Context Builder

A precise file-navigation selection can open directly as a measurable Builder context.
Run Smart Context: Open Selector for New Context.
The modal creates a new context and keeps the active context tree pinned above the suggestion list.
Start from sources, blocks, or named contexts
Core starts with source, block, and named-context entry points.
Pro adds folder, tag, link, Connections, and desktop external-file suggestion scopes.
Add whole sources
Choose a source suggestion and press Enter to add the whole note at depth 0.
Use a source when most of the note belongs in the bundle.
Add precise blocks
From a source suggestion, use Right Arrow or Mod+Enter to browse its blocks.
Add a block when only one heading or section is relevant.
Why should I choose a block instead of the whole note?
Blocks reduce context size when only one section is relevant.
Add named contexts
Browse a named context to add one of its items, or use Mod+Enter to add the complete saved context.
Named-context references remain reusable sources of context rather than copied prose.
Review the active context tree
Selected items render in a reviewable tree with path grouping, type/status icons, size/share information, origin badges, open/preview behavior, and removal controls.
Why is an item shown as included even though I did not add it directly?
It may be derived from a folder or named context. The origin badge identifies that source.
Remove or clear context items
Remove a row to delete the direct item or, in Pro, create a durable exclusion when a broader folder or named context would otherwise add it back.
Clear removes the active context. Pro clear-all also clears current-context exclusions.
Why did removing a derived item create an exclusion?
Deleting the visible child alone would let the broader group add it back. Pro stores one exclusion so the result remains removed.
Read size and share estimates
The Builder size summary reports character count and an approximate token count.
Per-item size/share helps identify the largest items before copy.
Save the bundle as a named context

Naming the current source set turns it into a reusable context bundle and confirms the saved milestone in the same working surface.
Enter a name in the Builder header to save the current context.
Slash-delimited names appear as collapsible groups in the named-context dashboard.
Copy from Builder
Core provides:
- Copy text
- Copy link tree
- Clear this context
Pro adds Copy media.
Core, Pro, desktop, and mobile differences
Pro extends Builder with:
- folders
- tags
- external files and folders on desktop
- links and Connections suggestions
- heading filters
- durable exclusions
- media-capable copy
Can I use Builder on mobile?
Core source, block, named-context, and copy flows can remain available. External filesystem suggestions are desktop-only.
Search and navigate suggestions
Suggestion rows use one shared fuzzy-search surface, but each source type owns its primary, alternate, and drill-in actions.
Source suggestions
A source suggestion represents one note.
- Enter adds the source.
- Mod+Enter or Right Arrow opens its block suggestions.
- In Pro, Shift+Enter opens linked-source suggestions.
Block suggestions
Block suggestions represent headings or note sections.
- Enter adds the block.
- Left Arrow returns to the source list when the blocks were opened from one source.
Named-context suggestions
- Enter or Right Arrow opens the saved context's items.
- Mod+Enter adds the complete saved context.
- Left Arrow returns from its item list to the named-context list.
Why is a directly selected item no longer suggested?
The Builder removes directly added items from the available suggestion list.
Folder suggestions
Pro folder suggestions use in-vault folder paths.
- Enter or Right Arrow browses sources in the folder.
- Mod+Enter adds the folder as a dynamic context group.
Tag suggestions
Pro tag suggestions use Obsidian tags.
- Enter browses sources carrying the tag.
- Mod+Enter adds the currently resolved tagged sources.
- Selecting a source inside the tag view adds that source.
Link suggestions
- An add-all row includes linked notes up to the displayed depth.
- Selecting one linked note adds it at depth
0. - Link suggestions include both outgoing links and backlinks by default.
Connections suggestions

Connections suggestions expose ranked candidate notes so the user can add only the sources that belong in the context.
Pro can suggest notes related to a selected source.
- Open a source's Connections candidates.
- Select one candidate to add it.
- Use Mod+Enter to add the visible candidate set when that row offers the bulk action.
- Scores can appear at the right edge of candidate rows.
External suggestions
Pro external suggestions are available on desktop.
- Enter or Right Arrow opens a directory.
- Mod+Enter adds eligible files from the directory.
- Left Arrow returns to the parent directory.
- Selecting a file adds that external file.
Why do external suggestions not appear on mobile?
External browsing requires desktop file access.
Keyboard behavior
Mod means Cmd on macOS and Ctrl on Windows or Linux.
| Key | Typical action |
|---|---|
| Enter | Add or open the highlighted item |
| Mod+Enter | Run the highlighted row's bulk or alternate action |
| Shift+Enter | Open linked-source suggestions where available |
| Right Arrow | Drill into the highlighted item; when no deeper view exists, use its available selection action |
| Left Arrow | Return to the parent suggestion view |
Why did Right Arrow add an item instead of opening another list?
That row had no deeper suggestion view, so Right Arrow used its available selection action.
Understand context tree rows
The tree is the final review surface for included items, sizes, origins, missing states, and removal.
Active tree anatomy
The active tree groups included context by path and displays each final source or block as an interactive row.
Pro exclusions appear in a separate list below the tree because they describe what is omitted, not what is included.
Leaf rows
A leaf can show:
- remove control
- source-type or status icon
- label
- relevance score when available
- exact size and share of the context
- folder or named-context origin badge
- missing-source state
Parent rows
Parent rows group nested sources, blocks, folders, and external paths. Removing a removable parent removes its active descendants from the current context.
Size and share display
Each item can show its human-readable size and its share of the complete context. Use these values to find the largest items before copying.
Origin badges
Origin badges show when an item came from a folder or named context. Select a named-context badge to open its source context when available.
Missing source state
A row is marked missing when its saved reference no longer resolves to an in-vault or external source. Remove or repair the reference before relying on the copied context.
Why does a row say Missing source?
The saved reference no longer resolves to a current note, block, or external file.
Remove controls
Removing a row hides it immediately and updates the current context. Size totals refresh after the context change is processed.
Items included by a named context
In Core, an item included only through a named context cannot be removed independently from the expanded tree. Open the source named context and edit the reusable bundle there.
Why is an item not removable in Core?
It is included through a named context. Open that named context to edit the reusable bundle.
Pro exclusions list
Pro shows current-context exclusions below the active tree. Remove an exclusion to allow the broader folder or named context to include that item again.
Why did a removed item move to the exclusions list?
Pro created an exclusion because a broader group would otherwise add the item back.
Paths and filenames
The tree preserves supported wikilinks, block references, external paths, and filenames containing slashes or hashtags inside link syntax. External items display as readable paths.
Add folders and tags on Pro

A project folder can seed a reviewable dynamic context without adding each note separately.
Folders and tags create dynamic groups whose resolved children can change with the vault.
Folder context items
Pro can save one folder reference as a dynamic context group. When the context opens, eligible notes currently in that folder appear in the active tree.
Why did the contents of a saved folder context change?
Folder groups are dynamic. They resolve the current eligible notes in the folder when the context loads.
Tag context items
Tag suggestions resolve the notes that currently carry the selected tag. Browsing a tag narrows the list; Mod+Enter adds the resolved notes.
Dynamic folder contents
A saved folder group is resolved again when the context loads. Its included notes can change as files move into or out of the folder.
Group item rows
The Builder tree shows a saved folder group as a compact parent while still allowing its included notes to be reviewed.
Remove direct and derived items
Removing a directly added item deletes that selection. Removing a note included by a folder group creates an exclusion only when the folder would otherwise add it back.
Exclusion behavior
One exclusion can represent a removed note or folder subtree. A broader folder exclusion avoids creating a separate rule for every nested file.
Why was a removed child stored as an exclusion?
The parent folder still includes the note. The exclusion prevents it from being added back.
Exclude items from dynamic groups
An exclusion is an exception to a broader folder, external folder, or named context.
Stored exclusions
An exclusion keeps an item out when a broader folder, external folder, or named context would otherwise add it again.
Exclusions are stored separately from selected items so the broader reusable group can remain intact.
Why is an exclusion separate from the selected tree?
It is an exception to a broader source, not an active context item.
Path matching
Smart Context normalizes vault and external path forms before applying exclusions.
A folder exclusion retains folder meaning instead of expanding into one exclusion line for every child.
Named-context exclusions
Exclusions saved inside a referenced named context affect the items resolved from that context.
The exclusions footer lists exclusions stored on the context currently open in Builder; inherited exclusions can still affect the resolved tree.
Folder child exclusions
Removing a child that is included by a selected folder creates an exclusion so the folder does not add it back later.
A known limitation remains for some in-vault folder expansions: a child exclusion may not be applied consistently after the folder is expanded. Review the final tree or copied bundle before relying on this path for sensitive material.
Can I rely on every in-vault folder-child exclusion?
Not yet. Review the final context when a child is excluded from an expanded in-vault folder.
External exclusions
External exclusions use the same visible relative-path style as external codeblock entries.
!../repo/dist
!../repo/src/generated.js
External folder scans apply these exclusions while resolving eligible files.
Exclusions list
The exclusions footer appears below the active context tree.
Each row identifies one stored excluded path or pattern. Exclusions do not appear as active tree items.
Remove an exclusion
Removing an exclusion deletes the exception. A broader selected folder or named context may then include that item again.
Why did a note return after I removed its exclusion?
A selected folder or named context still includes it, and the exception that kept it out was removed.
Clear all
Clear all removes both active context items and exclusions stored on the current context.
Troubleshooting Smart Context Builder
Direct items disappear from suggestions; derived items show origin badges; missing rows require repair; Core may block child removal from a named context; Pro may create exclusions; external suggestions require desktop; review folder-child exclusions because that path has a known gap.
Save and reuse named context bundles
A named context is a persisted Smart Context bundle that can be reopened, edited, copied, and referenced without rebuilding the same set.

The named-context dashboard keeps reusable bundles visible beside the currently expanded source tree.
Save a context with a name

A named bundle preserves the selected sources and their size as a reusable context asset.
Enter a name in the Builder header to persist the current context.
Renaming later updates the saved context instead of creating a second bundle.
When should I use a named context instead of a codeblock?
Use a named context for a reusable bundle across notes. Use a codeblock when the manifest belongs visibly to one note.
Open the named contexts dashboard

The named-context dashboard lists saved bundles and their item counts beside the current Obsidian workspace.
Open the dashboard from its command, a codeblock menu, or another registered entry point.
The list shows saved named contexts.
Add items by dropping them onto a saved context
Drop notes, supported media, folders, Connections results, or Lookup results onto an existing named-context row.
Folders expand recursively to supported context items. A successful drop reports the updated context name and the resolved item count.
Dropping one named context onto another is unavailable because named references require explicit direct and transitive cycle handling. Use Builder when one saved context should reference another.
Organize contexts with slash names
Names containing / render as collapsible hierarchy groups.
Group summaries can show context count and total item count.
Expand and inspect a saved context
Expand a dashboard row to render the shared Smart Context item and Builder components in place.
Reopen a context in Builder
Open the saved context in Builder to add, remove, or review its items.
Rename a named context
Rename changes the saved context name without creating a new bundle. Known codeblock references are updated to the new name.
Does renaming create a new context?
No. It updates the existing saved context and its known codeblock references.
Copy a named context
The row menu can copy the saved context directly.
This is a direct-copy path and does not open the current-note depth chooser.
Can I copy a named context without opening Builder?
Yes. Use the dashboard row menu.
Drag a named context into Smart Chat or a note
Drag the named-context row header into Smart Chat to add a reusable named-context reference to the current response context.
Drag the same row into a supported Markdown editor to insert a complete canonical ctx codeblock. Row action buttons remain interactive and do not start a drag.
Delete a named context
Delete uses visible in-row Confirm and Cancel controls.
After confirmation, the context is removed from the dashboard list.
Handle broken or missing references
A missing-reference state identifies saved notes, blocks, or external paths that no longer resolve. Open Builder to remove the broken row or restore the referenced source before copying.
Named context vs Smart Context codeblock
Use a named context when the bundle should be reused across notes or sessions. Use a codeblock when the manifest should remain visibly attached to one note.
Troubleshooting named contexts
Reopen the dashboard when stale, finish inline Save, repair missing sources in Builder, review codeblock references after renames, and remember dashboard-row copy is direct.
Attach an AI context manifest to an Obsidian note
A Smart Context codeblock keeps a readable context manifest inside the note that owns the assignment. The rendered controls and raw Markdown represent the same note-scoped context.

The rendered codeblock menu exposes named-context creation, Builder, copy, dashboard, and Help actions in the note.
Insert commands
Core command:
- Insert codeblock (add notes & named contexts)
Pro command:
- Insert codeblock (add external files & named contexts)
The command inserts a block when missing and opens Builder scoped to the note's codeblock context.
Supported aliases
These fence aliases render the same native surface:
ctxcontextsmart-context
Rewrites preserve the original alias.
Why did the fence alias remain ctx after editing?
Rewrites preserve the original supported alias.
Use the rendered codeblock UI
The rendered header provides:
- menu
- open Builder
- copy
- help
- live character and token estimates when items exist
The empty state reports that no context items are selected.
Use the codeblock menu
Current menu actions can include:
- Create or convert to named context
- Open Context Builder
- Copy context to clipboard
- Open named-context dashboard
- Help
The create-named action appears only when the current block has enough non-exclusion content to create a useful named context.
Open Builder button
The Builder button opens the context attached to that codeblock.
Context changes made in Builder are synchronized back to the fenced block.
Copy button
The copy button copies only the context resolved from the codeblock.
Use current-note copy when the note body and codeblock context should be merged into one bundle.
Does codeblock copy include the note body?
No. Use current-note copy to combine the note with the context resolved from the codeblock.
Create a named context
Converting a populated block creates a named context from the active items, replaces the block contents with one named-context line, and opens the saved context for review.
The codeblock does not keep nested named-context references inside the newly created context.
Raw line grammar

Whole-note source keys remain readable as one Markdown line per source.
Core stores:
- in-vault source paths
- in-vault block paths such as
Note.md#Heading - named-context lines
Pro also stores:
- in-vault folders
- external files and folders
- exclusion lines beginning with
! - basic glob exclusions
Can an agent understand the block without Obsidian?
The raw lines are readable path and named-context hints. Resolving named contexts and Obsidian-specific items still requires Smart Context in Obsidian.
Add named contexts
Named contexts use:
ctx:: <name>
The prefix follows the block's preserved alias. Renaming a referenced named context updates known including codeblocks.
Exclusion lines
Pro exclusion lines begin with !.
!*.test.js
!../repo/dist
Folder exclusions remain compact and do not expand into one line per excluded child.
Why did removing one external child add an exclusion line?
The stored external folder still includes the child. One exclusion line keeps it removed without replacing the folder with many file lines.
External paths
Pro stores readable paths relative to the vault.
../repo/src/index.js
../repo/src
Builder and copy resolve an external folder into its eligible files.
Current-note copy merge behavior
Current-note copy detects the first context codeblock, hydrates its active items and exclusions, and merges those items at depth 0.
Codeblock items do not trigger additional link traversal merely because they are present in the block.
Mobile behavior
Core note, block, named-context, and direct-copy behavior can remain useful on mobile. External filesystem suggestions and desktop-only file access are unavailable.
Troubleshooting Smart Context codeblocks
Confirm the fence alias, repair missing sources in Builder, choose the codeblock copy action for manifest-only export, use current-note copy for combined export, and review relative paths and exclusions when an external item remains included.
Add external files and code repositories to Smart Context
Smart Context Pro can reference files and folders outside the Obsidian vault, especially when project notes live in Obsidian and source code remains in a nearby repository.
External file and folder context requires Smart Context Pro on desktop.

External suggestions browse a repository with vault-relative folders while keeping private local filesystem paths out of the published frame.
Availability and desktop requirement
External suggestions require direct filesystem access and are unavailable on mobile.
In-vault sources, blocks, and named contexts remain separate mobile-capable flows.
Why do external sources not appear on mobile?
The feature requires desktop filesystem access.
Browse and add one external file
Open the external suggestion scope to browse files near the vault or inside the current external folder.
- The list shows readable relative paths and file extensions.
- Enter adds the highlighted eligible file.
- Added files remain external references; they are not copied into the vault.
Browse external folders
External folders support two actions:
- Enter or Right Arrow opens the folder for browsing.
- Mod+Enter adds eligible folder contents to the context.
Use folder addition for a repository or directory that should remain a reusable context boundary.
Navigate parent and child folders
Use the .. row or Left Arrow to return to the parent folder.
The displayed relative path remains anchored to the original browse root so drill-down does not rewrite the meaning of an already selected path.
Add an external folder
Mod+Enter scans the highlighted folder and adds eligible content within the configured search limits.
When a large folder is incomplete, narrow the folder, review ignore patterns, or increase the external-context limits before adding it again.
Configure ignore patterns
External scans apply built-in exclusions and the ignore patterns configured for external context.
Use one pattern per line for generated output, dependencies, build folders, caches, or private material that should never enter a context bundle. A leading / is interpreted relative to the external browse root.
Why was a repository directory skipped?
It matched an ignore pattern or the scan reached its configured depth or item limit.
Configure scan depth and item limits

External-source settings bound the depth and number of filesystem results returned during browsing.
External-context settings limit how deeply folders are scanned and how many results are returned.
If a folder appears incomplete, first confirm that the missing path was not ignored; then narrow the browse scope or adjust the limits.
Use external paths in a Smart Context codeblock
Pro codeblocks store readable paths relative to the vault location:
../repo/src/index.js
../repo/src
!../repo/dist
The paths remain useful project hints in plain Markdown, including when an agent reads the note outside Obsidian.
Why is an external path stored with ../?
It is relative to the vault location, which keeps nearby repository references readable without moving those files into the vault.
Understand external path syntax
External paths are stored relative to the vault, commonly with ../, so the project note remains a readable map without copying repository files into the vault.
Exclude external files and subfolders
Use broad ignore patterns and context-specific ! lines or exclusions. Prefer one folder exclusion over many child exclusions for builds, dependencies, caches, or generated output.
Use a code repository as context
Include the smallest source set needed by the assignment. Exclude dependencies, builds, caches, generated files, secrets, and unrelated packages.
Troubleshooting external context
External suggestions are desktop-only; skipped paths may match ignore rules or limits; narrow the browse root before raising limits; confirm the file type is readable; review unexpected relative-path normalization.
Copy images and PDF pages as AI context
Smart Context Pro can compile supported images and PDF pages into one labeled visual payload while preserving text as the primary or fallback clipboard output.

Media-capable copy gathers supported images and PDF pages into a visual context payload.
Copy text vs Copy media
Copy text exports the merged text context. Copy media uses the same text context and adds a compiled visual image where the clipboard supports both.
Why did only text paste?
No supported media was found, rendering failed, or the destination accepted only the text clipboard format.
Are images referenced only by a web URL included?
No. External web-image fetching is not part of the documented media-copy input set.
Supported media
Media copy supports images and PDF files. Other attachment types can remain listed in the text output instead of being rendered visually.
Render image attachments
Supported images are scaled without changing their aspect ratio and labeled with their source so each visual remains attributable.
Render PDF pages
Each PDF page is rendered separately. Page labels include the source filename and page number.
Why is a PDF shown as several images?
Each page is rendered separately so it remains visible and attributable.
Understand the compiled media image
Images and PDF pages are arranged into one collage-style image. Paste that single image into a destination that accepts clipboard images.
Clipboard write behavior
Smart Context attempts to copy the merged text and compiled image together. Clipboard capabilities vary by platform and destination, so the destination may paste only one supported format.
Read media counts
Media-capable chooser rows and completion notices show how many supported visual items were included. Use the count as a quick check before pasting.
Text and clipboard fallback behavior
When no supported media is present, visual rendering fails, or image clipboard access is unavailable, Smart Context keeps the text copy where possible.
Media copy does not fetch images referenced only by an external web URL.
Choose link depth for media
Media embedded in the starting source can enter at depth 0. Linked attachments require the depth at which they enter the context graph. Choose the smallest row whose media count contains the needed visuals.
Paste compiled media into an AI tool
Paste into a destination that accepts image clipboard payloads. Some composers work more reliably with an empty text input. When the image is rejected, paste the text and attach media manually.
Troubleshooting media copy
Confirm supported media is selected, reduce depth or PDF pages when output is too large, retry after render failure, confirm the destination accepts images, and do not assume external URL images are supported until verified.
Copy linked context from Obsidian Canvas
Smart Context can start from an active Canvas, resolve file cards into note references, and pass those sources through the linked-context depth flow.
Open a Canvas as the current source
With a .canvas file active, run the normal current-source copy command.
Canvas is a supported Core current-source type.
Resolve linked-note Canvas nodes
Smart Context reads the Canvas and resolves file cards into note references.
Choose link depth
Depth 0 contains the directly represented Canvas sources.
Depth 1+ follows links from those resolved sources according to the current-source copy flow.
What does depth 0 mean for Canvas?
It includes the sources represented directly by the active Canvas.
Understand Canvas copy output
Canvas-derived context uses the same Context and Item templates as other clipboard exports.
The copied result is text context, not a rendered Canvas screenshot, unless media is added through a separate Pro media-capable flow.
Does Smart Context copy the visual positions of Canvas cards?
No. The current context workflow resolves source references and copies their content. It does not encode the Canvas layout as semantic structure.
Use Canvas as a context map
Canvas is useful when file cards already define a bounded project, research, or decision set. The copy flow resolves sources; it does not infer meaning from positions or edges.
Current limitations
Text cards, groups, unsupported nodes, unresolved files, positions, and edge semantics are not guaranteed context items. Use media copy when a visual screenshot is required.
Troubleshooting Canvas copy
Confirm a Canvas is active, check file-card links, start at depth 0, reduce excessive traversal, and use media copy when visual layout matters.
Copy linked context from Obsidian Bases
Smart Context Pro accepts an active .base file in the current-source copy flow. The Base is rendered as text and its links can participate in the depth chooser.

A Base can preserve row-level links that become source references in the copied context.
Requirements
The active source must be a supported .base file, Smart Context Pro must be available, and the Base should be narrowed before copy when row scope matters.
Open a Base as the current source
Smart Context Pro accepts an active .base file in the normal current-note copy flow. The Base is rendered as context text before the depth chooser opens.
Preserve linked references
Links present in the rendered Base remain available to the current-note link-depth flow. Choose a deeper level only when the referenced notes are required to understand the Base output.
Choose link depth
Use depth 0 for the rendered Base itself. Use depth 1 to include notes linked from the rendered output. Filter the Base before copying so link traversal begins from the smallest useful set.
Why did depth 1 make the copy much larger?
It included notes linked from the rendered Base output. Narrow the Base or return to depth 0.
Rendered Base and row-scope limits
Do not treat the visible Base rows as a guaranteed copy boundary. Review the copied text when row scope matters. Raw-file and per-view copy variants are not part of this workflow.
Does Base copy always mean only the currently visible rows?
Do not assume that boundary. Review the copied text and narrow the Base before copying when row scope matters.
Use Connections and Smart Context together in Bases

Connections can rank the Base first; Smart Context can then export the reviewed rows and their references.
Rank a collection with Connections in Bases, narrow it, then copy the active Base. Review the rendered text because visible rows are not yet a guaranteed copy boundary.
Troubleshooting Smart Context for Bases
Confirm the active Base, narrow before increasing depth, review copied row scope, reopen stale views, and do not rely on planned raw-file or per-view variants.