file-reference-skill

示例技能,展示如何使用支持文件进行安全的文件引用解析:演示在受控环境下引用和解析外部或上传文档的流程与注意事项,用于教学和示范目的。

仓库最近推送
GitHub Stars
148
Forks
20
Issues / PRs
5

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "file-reference-skill":https://skillpi.com/zh/skills/deepskill-5a0c1b667732f8b8aa8b23894d458413146453c9581fc8ec4a477a6179faad66。安装前核对上游来源和版本:https://github.com/maxvaega/skillkit。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

示例技能,展示如何使用支持文件进行安全的文件引用解析:演示在受控环境下引用和解析外部或上传文档的流程与注意事项,用于教学和示范目的。

0 下载

介绍来源: third_party · maxvaega · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: file-reference-skill
description: Example skill demonstrating secure file reference resolution with supporting files
allowed-tools: []

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

版本历史

  1. v0.4.0 GitHub ↗
    原版更新说明

    # v0.4.0 ## What's Changed ### advanced progressive disclosure + basic documentation - Advanced Progressive Disclosure with LRU content caching - Mtime-based automatic cache invalidation - Argument normalization for maximum cache efficiency - Thread-safe concurrent invocations with per-skill asyncio locks - Cache management API (get_cache_stats(), clear_cache()) - Performance: <1ms cache hits vs 10-25ms first invocation - Memory efficient: ~2.1KB per cached entry - 80%+ cache hit rate achievable - Created `docs/` folder with basic documentation - fixed `base_dir` issue #5

  2. v0.3.0 GitHub ↗
    原版更新说明

    # v0.3.0 Script Execution - ✅ Script Execution Support (Python, Shell, JavaScript, Ruby, Perl) - ✅ Automatic script detection (recursive, up to 5 levels) - ✅ Security controls (path validation, permission checks, timeout enforcement) - ✅ Environment variable injection (SKILL_NAME, SKILL_BASE_DIR, SKILL_VERSION, SKILLKIT_VERSION) - ✅ LangChain script tool integration (each script exposed as separate StructuredTool) - ✅ Parameters normalization to lower-case - ✅ Comprehensive error handling and audit logging - ✅ Cross-platform support (Linux, macOS, Windows) - ✅ Backward compatible with v0.1/v0.2 (except ToolRestrictionError removed)

  3. v0.2.0 GitHub ↗
    原版更新说明

    - ✅ Full async/await support (`adiscover()`, `ainvoke_skill()`) - ✅ Multi-source skill discovery (project, Anthropic config, plugins, custom paths) - ✅ Plugin ecosystem with MCPB manifest support - ✅ Priority-based conflict resolution - ✅ Fully qualified skill names (`plugin:skill-name`) - ✅ Nested directory structures (up to 5 levels) - ✅ Secure file path resolution with traversal prevention - ✅ LangChain async integration - ✅ Updated examples (async_usage.py, multi_source.py, file_references.py) - ✅ Backward compatible with v0.1

  4. 0.1.0 GitHub ↗
    原版更新说明

    v0.1 ✅ Core skill discovery and metadata management ✅ YAML frontmatter parsing with validation ✅ Progressive disclosure pattern (lazy loading) ✅ Skill invocation with argument substitution ✅ LangChain integration (sync only) ✅ 86% test coverage

当前收录版本

0.0.1

核对来源版本 ↗

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值55/100

亮点

  • 提供清晰的文件引用解析教学示例
  • 涵盖开发者工具链相关实用场景
触发精准85/100

亮点

  • 触发描述清晰完整,边界明确
  • 准确描述了技能的核心功能
结构规范90/100

亮点

  • 文档结构完整,章节划分清晰
  • 包含端到端代码示例和使用说明
  • frontmatter 信息齐全
执行可靠90/100

亮点

  • 工具来源明确,使用官方路径解析器
  • 详细覆盖安全异常处理机制
  • 提供了完整的安全验证流程说明
证据可验 (前四项均值)80/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。