tool-call-file-parameter-formatting
Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref).
Best use case
tool-call-file-parameter-formatting is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref).
Teams using tool-call-file-parameter-formatting should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tool-call-file-parameter-formatting/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How tool-call-file-parameter-formatting Compares
| Feature / Agent | tool-call-file-parameter-formatting | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Formats file and URL parameters for tool calls. You must analyze the target tool's parameter names and descriptions to choose the correct format (base64, text, or URL ref).
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# File Parameter Formatting
## Purpose
Standardize file and URL inputs for tool calls using the `file:{prefix}::{path_or_url}` schema. You must determine the correct prefix by strictly analyzing the target tool's parameter definition.
## Instructions
When a tool parameter requires a file or URL, follow this process:
### 1. Analyze Tool Parameter Definition
Inspect the **Parameter Name** and **Parameter Description** in the tool definition to determine the requirement:
* **Requirement: Base64 Content**
* *Clues:* Description mentions "content," "base64," "encoded," "file data".
* *Action:* Use `base64` prefix.
* **Requirement: Plain Text**
* *Purpose:* * *Purpose:* Use this mode to indicate the tool expects the actual text file content as the parameter. When a file is marked with the `text` prefix, the tool-call processor will read the file's contents and pass that text as the tool call parameter.
* *Clues:* Description mentions "text," "string content," "read file," or the file type is code/markdown/logs.
* *Action:* Use `text` prefix.
* **Requirement: URL/Path Reference**
* *Clues:* Parameter name contains `url`, `link`, `uri`, or description says "pass the link" or "reference."
* *Action:* Use `url` prefix.
### 2. Format the Value
Construct the string using the format: `file:{prefix}::{path_or_url}`
* **Prefix:** One of `base64`, `text`, or `url` (determined from step 1)
* **Separator:** Always use `::`
* **Path:**
* For system files: `files/path/to/file.ext`
* For web resources: `https://example.com/resource`
## Thinking Process
Before executing the tool call, perform this check:
1. **Inspect Definition:** "I am calling tool `[tool_name]`. The parameter `[param_name]` has the description: `[description]`."
2. **Deduce Type:** "Based on the name/description, this tool expects [raw content | text string | URL reference]."
3. **Apply Format:** "Therefore, I will use the `[base64 | text | url]` prefix."
## Examples
### Example 1: Visual Analysis Tool
* **Tool Definition:**
* `name`: `analyze_image`
* `parameter`: `image_data`
* `description`: "The base64 encoded contents of the image file."
* **Reasoning:** Description explicitly asks for "encoded contents."
* **Result:** `file:base64::files/images/chart.png`
### Example 2: Browser Tool
* **Tool Definition:**
* `name`: `web_browser`
* `parameter`: `target_url`
* `description`: "The URL to navigate to."
* **Reasoning:** Parameter name is `target_url` and expects a navigation link.
* **Result:** `file:url::https://google.com`
### Example 3: Code Reader
* **Tool Definition:**
* `name`: `read_script`
* `parameter`: `script_content`
* `description`: "The text content of the python script."
* **Reasoning:** Description asks for "text content."
* **Result:** `file:text::files/scripts/main.py`
### Example 4: Format Hint in Tool Name
* **Tool Definition:**
* `name`: `base64_image_processor`
* `parameter`: `image_input`
* `description`: "Image to process."
* **Reasoning:** Tool name contains "base64," indicating it expects encoded content.
* **Result:** `file:base64::files/photos/portrait.jpg`
### Example 5: Format Hint in Tool Description
* **Tool Definition:**
* `name`: `document_analyzer`
* `description`: "Analyzes documents by reading their text content directly."
* `parameter`: `document`
* `description`: "Document to analyze."
* **Reasoning:** Tool description mentions "reading text content directly," suggesting text mode optimization.
* **Result:** `file:text::files/reports/annual_report.txt`
### Example 6: Format Hint in Argument Name
* **Tool Definition:**
* `name`: `fetch_resource`
* `parameter`: `resource_url`
* `description`: "The resource to fetch."
* **Reasoning:** Parameter name ends with `_url`, indicating a URL reference is expected.
* **Result:** `file:url::https://api.example.com/data.json`
### Example 7: Format Hint in Argument Description
* **Tool Definition:**
* `name`: `process_file`
* `parameter`: `input_file`
* `description`: "Pass the base64-encoded file data for processing."
* **Reasoning:** Description explicitly states "base64-encoded file data."
* **Result:** `file:base64::files/uploads/document.pdf`
### Example 8: Multi-file upload tool (array parameter, base64 content)
* **Tool Definition:**
* `name`: `batch_processor`
* `parameter`: `documents` (type: array of strings)
* `description`: "List of base64-encoded file contents."
* **Reasoning:** Description asks for "base64-encoded file contents" for each element.
* **Result:** `["file:base64::files/doc1.pdf", "file:base64::files/doc2.pdf"]`
### Example 9: Multi-file upload tool (array parameter, URL references)
* **Tool Definition:**
* `name`: `rag`
* `parameter`: `attachment_urls` (type: array of strings)
* `description`: "List of URLs pointing to the files to be ingested."
* **Reasoning:** Name `attachment_urls` and description "URLs pointing to the files" indicate URL references for each element.
* **Result:** `["file:url::https://example.com/doc1.pdf", "file:url::https://example.com/doc2.pdf"]`
> **Note:** The `file:{prefix}::` format works for both single string parameters and individual elements within array parameters.
## Common Mistakes
* ❌ Ignoring the tool description and defaulting to `url` for local files.
* ❌ Passing `file:base64::...` to a tool that only asks for a URL string (parameter name `url`).
* ❌ Passing raw paths (`files/doc.pdf`) without the `file:...` schema.Related Skills
total-recall
Memory preservation for Claude Code sessions. Use when approaching token limits, needing to /reset or /compact, switching between complex tasks, or preserving critical session state before context loss. Creates comprehensive memory dumps at /tmp/total-recall containing current state, decisions, artifacts, and next steps for seamless context restoration.
tools-ui-frontend-design
Create distinctive, production-grade frontend interfaces grounded in this repo's design system. Use when asked to build web components, pages, or applications. Combines bold creative direction with token-constrained implementation.
scanning-tools
This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detec...
red-team-tools
This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate su...
planning-with-files
Transforms workflow to use Manus-style persistent markdown files for planning, progress tracking, and knowledge storage. Use when starting complex tasks, multi-step projects, research tasks, or when the user mentions planning, organizing work, tracking progress, or wants structured output.
organizing-files
Organizes macOS files across Desktop, Documents, Downloads, and iCloud Drive into a consistent structure. Use when the user asks to organize files, clean up folders, sort downloads, declutter desktop, tidy up documents, or structure their filesystem. Triggers on "organize", "clean up", "sort files", "declutter", "file mess", "tidy", or any request about file/folder structure on macOS.
on-call-handoff-patterns
Master on-call shift handoffs with context transfer, escalation procedures, and documentation. Use when transitioning on-call responsibilities, documenting shift summaries, or improving on-call pro...
html-tools
This skill should be used when building single-file browser applications, client-side utilities, or interactive tools that need no backend. Covers patterns for state persistence, API integration, and advanced browser capabilities without React or build steps.
hinge-profile-optimizer
Comprehensive, research-backed Hinge dating profile optimization. Use when someone wants to improve their Hinge profile, audit an existing profile, write better prompts/captions, select and order photos strategically, or understand why they're not getting quality matches. This is the thorough process (60-90 mins) - discovery interview, game theory analysis, photo strategy, copy creation, settings optimization, and implementation support. Based on 45+ peer-reviewed sources on dating app behavior.
hic-loop-calling
This skill performs chromatin loop detection from Hi-C .mcool files using cooltools.
global-methylation-profile
This skill performs genome-wide DNA methylation profiling. It supports single-sample and multi-sample workflows to compute methylation density distributions, genomic feature distribution of the methylation profile, and sample-level clustering/PCA. Use it when you want to systematically characterize global methylation patterns from WGBS or similar per-CpG methylation call files.
file-suggestion
Set up fast file suggestions for Claude Code using ripgrep, jq, and fzf. Use this skill when users want to improve file autocomplete performance or add custom file suggestion behavior.