file-reference-skill

An example skill that shows how a coding agent can safely find supporting files inside its own skill folder. It includes scripts, templates, and documentation.

In plain words
What is it for?
Use it as a reference when building skills that need helper scripts, configuration templates, reports, or example documentation.
Why use it?
It demonstrates how to use bundled files without accidentally accepting unsafe paths such as parent-directory traversal.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/maxvaega/skillkit/file-reference-skill
Any agent
npx skills add maxvaega/skillkit --skill file-reference-skill
Clone the repo
git clone --depth 1 https://github.com/maxvaega/skillkit

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 449 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00449
Opus 5 $0.00008 $0.00225
Sonnet 5 $0.00003 $0.00090
Haiku 4.5 $0.00002 $0.00045

Measured yesterday against content hash 536409f7639d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

file-reference-skill scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 4 executable files (scripts/data_processor.py, scripts/env_demo.py, scripts/helper.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

examples/skills/file-reference-skill/SKILL.md · 69 lines

How it starts

The opening of the file, as written. The whole thing — 69 lines — stays where its author put it; the contents beside it link to each section on GitHub.

File Reference Skill

This skill demonstrates how to use supporting files (scripts, templates, documentation) within a skill directory.

Overview

This skill uses helper scripts and templates for data processing. All supporting files are accessible via relative paths from the skill's base directory.

Available Supporting Files

Scripts

  • scripts/data_processor.py - Main data processing script
  • scripts/validator.py - Input validation utilities
  • scripts/helper.sh - Shell helper script

Templates

  • templates/config.yaml - Configuration template
  • templates/report.md - Report generation template

Documentation

  • docs/usage.md - Detailed usage instructions
  • docs/examples.md - Example use cases

Usage

When this skill is invoked with arguments, it can access supporting files using the FilePathResolver:

from pathlib import Path
from skillkit.core.path_resolver import FilePathResolver

# Get the skill's base directory (injected by BaseDirectoryProcessor)
base_dir = Path("<base_directory_from_context>")

# Resolve supporting files securely
processor_script = FilePathResolver.resolve_path(base_dir, "scripts/data_processor.py")
config_template = FilePathResolver.resolve_path(base_dir, "templates/config.yaml")
usage_docs = FilePathResolver.resolve_path(base_dir, "docs/usage.md")

# Read file contents
with open(processor_script) as f:
    script_code = f.read()

Processing Arguments

The skill expects data file paths as arguments:

Example invocation: file-reference-skill data/input.csv data/output.csv

Processing steps:

  1. Validate input using scripts/validator.py
  2. Process data using scripts/data_processor.py
  3. Generate report using templates/report.md
  4. Output results to specified location

Security Notes

  • All file paths are validated to prevent directory traversal attacks
  • Symlinks are resolved and verified to stay within skill directory
  • Absolute paths and path traversal patterns (../) are blocked
  • Any security violation raises PathSecurityError with detailed logging

Read the full file on GitHub · 69 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 69 lines · 15 tokens per session scan A 536409f7639d

Subscribe to this mod's changes

file-reference-skill is a skill published in the GitHub repository maxvaega/skillkit (146 stars, last pushed 7mo ago), licensed MIT. It adds 15 tokens to every session and 449 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories