file-reference

Parse @-symbol and natural-language file references to extract content for short-drama planning.

410|79|Updated Jan 10, 2026
One-click install
npx skills add https://github.com/VanGong1999/screen-creative-skills --skill file-reference-vangong1999
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: file-reference
Source: https://github.com/VanGong1999/screen-creative-skills/tree/main/category/tools/file-reference
Command: npx skills add https://github.com/VanGong1999/screen-creative-skills --skill file-reference-vangong1999

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Users often reference uploaded files in conversation using @-symbols or natural language like "the first file" or "the latest uploaded image", and manually resolving these references is error-prone. This Skill automatically detects, parses, and resolves those references, extracting key file content and providing application suggestions for short-drama planning. ## Core Features & Use Cases - Reference Detection: Identifies @-symbol references (e.g., @file1, @image2) and natural-language references (e.g., "第一个文件", "最新上传的图片") in user text. - Content Extraction & Structured Output: Resolves each reference to file metadata and content, then produces a structured analysis report covering file type, name, and key information. - Planning Suggestions: Generates concrete application suggestions for character design, plot structure, and commercialization in vertical short-drama planning. - Use Case: A screenwriter uploads a draft script and a character design image, then asks "analyze @file1 and the latest uploaded image" — the Skill resolves both references, summarizes their content, and suggests how to apply them to the drama plan. ## Quick Start Ask the assistant to parse the file references in your message, such as "analyze @file1 and the first uploaded image, and suggest how to use them in my short-drama plan".

Frequently Asked Questions about file-reference

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I parse @-symbol file references in user messages?▼

Use the FileReferenceParser's detect_file_references method, which applies regex patterns to find @file1, @image2, and similar tokens. It returns a list of detected references that can then be resolved individually against file storage.

How to resolve natural-language file references like "the first file"?▼

The parser maps Chinese ordinal and recency phrases (e.g., 第一个文件, 最新上传的图片) to file indices using built-in pattern dictionaries. Each matched phrase is resolved to a file type and index, then looked up in the provided file storage.

What file types does the file reference parser support?▼

It recognizes documents, images, PDFs, Word files, Excel sheets, text files, audio, and video through a file-type mapping dictionary. Unknown types fall back to a generic file category with default metadata.

Does the parser need external Python packages to run?▼

No, the script uses only Python standard library modules: re, json, typing, and datetime. It runs without installing any third-party dependencies.

What happens when a referenced file is not found in storage?▼

The parser returns default placeholder metadata including an unknown filename and generic content description rather than failing. Resolution errors are captured in an error field so the workflow can continue with remaining references.