fdk-file-fetcher

Fetch one source file from any installed package import path and either return code in chat mode or create a local file in create mode.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "fdk-file-fetcher" with this command: npx skills add avesh-h/fdk_file_fetcher/avesh-h-fdk-file-fetcher-fdk-file-fetcher

FDK File Fetcher

Architecture

Target flow:

  1. User gives input (file path, extension, call path, mode, optional output).
  2. Agent runs the script with those inputs.
  3. Script fetches the file from GitHub only (no local fallback).
  4. Script writes the result to stdout (chat: source or JSON; create: JSON).
  5. Agent reads stdout and returns the fetched response to the user.

All source is always fetched from GitHub; the script does not read from local files or node_modules for content.

Requirements

  • The script requires network access to:
    • api.github.com
    • raw.githubusercontent.com
    • registry.npmjs.org (optional, for package metadata)
  • If the agent runs in a sandboxed environment where network is blocked, the script will fail (e.g. ENOTFOUND). In that case the agent must:
    • Report the error from stderr to the user.
    • Mention that the script needs outbound network; suggest running the command locally in a terminal, or enabling network for the agent when running this skill.

When to Use

Use this skill when the user provides:

  • File path
  • Extension
  • Call path
  • mode (chat or create)
  • optional Output (create mode)

Execution Marker

Before running the command, explicitly print in the agent response:

Using skill: fdk-file-fetcher

The script logs to stderr in this format: [fdk-file-fetcher] ...

Input Mapping

  • File path -> --file-path
    • Full package import path to fetch.
    • Example: @gofynd/theme-template/page-layouts/single-checkout/shipment/single-page-shipment
  • Extension -> --extension
  • Call path -> --call-path
    • Local storefront file where that import is used.
    • Example: theme/page-layouts/single-checkout/checkout/checkout.jsx
  • mode -> --mode (chat | create)
  • Output -> --output (create mode only; optional)
  • Optional: --output-format json (chat mode only; recommended when the agent runs the script — see below)
  • Optional overrides: --repo, --ref, --prefer-latest, --source-prefix

Agent Behavior After Running the Command

  1. Run the script (from project root) with the user’s inputs mapped to flags.

  2. Capture stdout and stderr. Note the exit code.

  3. If exit code is 0 (success):

    • Chat mode
      • If you used --output-format json: stdout is one JSON object. Parse it. It has content, repoPath, ref, repo, packageName, importPath. Return the content to the user in a code block with the language set from the extension (e.g. jsx, ts, less). You may briefly mention source: e.g. “From repo at ref, path repoPath.”
      • If you used default (raw): stdout is the raw file content. Return it to the user in a code block with the correct language.
    • Create mode: stdout is JSON. Parse it and tell the user the file was created at outputFile and, if present, show suggestedLocalImport for the caller file.
  4. If exit code is non-zero (failure):

    • Report the stderr content to the user as the error message.
    • If the error mentions network or resolution failure, add that the script needs network access to GitHub (and optionally npm). Suggest running the command locally or enabling network for this skill.

Command Templates

Chat mode (recommended for agent: use --output-format json so you can parse and present reliably):

node scripts/fdk_file_fetcher.js \
  --file-path "@gofynd/theme-template/page-layouts/single-checkout/shipment/single-page-shipment" \
  --extension "less" \
  --call-path "theme/page-layouts/single-checkout/checkout/checkout.jsx" \
  --mode "chat" \
  --output-format "json" \
  --prefer-latest

Chat mode (raw stdout, for terminal use):

node scripts/fdk_file_fetcher.js \
  --file-path "@gofynd/theme-template/page-layouts/single-checkout/shipment/single-page-shipment" \
  --extension "less" \
  --call-path "theme/page-layouts/single-checkout/checkout/checkout.jsx" \
  --mode "chat" \
  --prefer-latest

Create mode:

node scripts/fdk_file_fetcher.js \
  --file-path "@gofynd/theme-template/page-layouts/single-checkout/shipment/single-page-shipment" \
  --extension "jsx" \
  --call-path "theme/page-layouts/single-checkout/checkout/checkout.jsx" \
  --mode "create" \
  --output "theme/page-layouts/single-checkout"

Notes

  • One file per call. Source is always from GitHub; no local fallback.
  • Resolves package/repo from: package-lock.json, installed package.json, then npm registry.
  • Default mode is chat. In create mode, default output is project root.
  • Supported extensions: jsx, tsx, js, ts, less, css, scss, sass.
  • If required details are missing or invalid, show the expected input format (file path, extension, call path, mode, optional output).

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

fynd-theme

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated