| name | vscode-file-links |
| description | Enforce VS Code Codex file-reference formatting for local chat sessions. Use when Codex should output file references that are readable and VS Code-friendly across projects, especially when preparing prompts, templates, or review responses that must use inline-code `@` absolute paths with line numbers instead of webview, file, vscode, or Markdown-link fallbacks. |
VS Code File Links
Use this skill when a response must include file references for the VS Code Codex chat UI and the format needs to stay stable across projects.
Workflow
- Identify and resolve the actual current workspace root before emitting any project-local path.
- Replace any placeholder with the resolved absolute workspace root before output.
- Output every file reference as standalone inline code using
@ plus an absolute path.
- Use
/ as the path separator on Windows as well.
- Add line information with
#Lline or :line[:column] when needed.
- Avoid fallback formats that tend to open the browser or lose file resolution.
Required Output Rules
- Write project-local files as
`@[resolved-workspace-root]/...` after resolving the actual workspace root.
- Write workspace-external files as
`@C:/...` with the real absolute path.
- Keep each file reference as standalone inline code.
- Do not place file references inside code blocks.
- Do not output project-local file references until the workspace root has been resolved to a real absolute path.
- If the path is unknown, stop and confirm it instead of guessing.
Forbidden Formats
- Do not use
https://file+.vscode-resource....
- Do not use
file:// or vscode://.
- Do not use Markdown links as a file-reference fallback.
- Do not use relative paths, bare filenames, or abbreviated paths.
- Do not leave placeholders such as
[workspace-root-absolute-path] unresolved.
- Do not emit bare
@C:/... text outside inline code.
Quick Examples
- File only:
`@E:/ExampleProject/README.md`
- Line number:
`@E:/ExampleProject/docs/TASK_PROMPT_TEMPLATE.md#L32`
- Alternate line syntax:
`@E:/ExampleProject/src/app.ts:42`
- External file:
`@C:/Users/name/tools/example-tool/config.json#L12`
Reusable Prompt Snippet
When the user wants a reusable rules block, adapt the template in references/link-rules.md.
Validation
Before finishing, check all of the following:
- Every file reference is inline code.
- Every project-local file reference uses the resolved real workspace root.
- Every path is absolute.
- No
file:// remains.
- No
vscode:// remains.
- No Markdown-link fallback remains.
- No unresolved placeholder remains.
- No browser/webview URL remains.