Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计提醒

local-ref本地参考

Agent Skill

local-ref 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

188

周安装

8

GitHub Stars

公开资料未说明

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:local-ref(本地参考)
来源仓库:https://github.com/aivokone/ak-skills
仓库路径:skills/local-ref
安装命令:
npx skills add https://github.com/aivokone/ak-skills --skill local-ref
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/aivokone/ak-skills --skill local-ref

简介

local-ref 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 适用于需要根据关键词或任务场景从本地资源中获取信息的场景。
  • 通过安装命令添加到宿主环境后,可结合原始 README 核验具体用法。
  • 安装前需确认权限范围、维护状态,避免触发联网或文件读写操作。
  • local-ref 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Local Reference

Cache library documentation locally so every session reads from disk instead of re-fetching from external sources. Local docs load via Read tool (free, instant) instead of API calls (tokens + latency).

Sources

Fetch documentation from any of these, in order of preference:

  1. Context7 API — curated library docs with code examples. See references/context7-api.md.
  2. WebFetch — official documentation sites (e.g., developer.wordpress.org, getbootstrap.com)
  3. Manual — user-provided docs, internal wikis, or CLI --help output

Commands

Init — local-ref init

Set up local documentation cache for a project.

  1. Detect project technologies from these sources:

- package.json (JS/Node dependencies) - composer.json (PHP dependencies) - AGENTS.md / CLAUDE.md (mentioned frameworks) - requirements.txt / pyproject.toml (Python) - Gemfile (Ruby) - go.mod (Go)

  1. Confirm with user which technologies to cache. Suggest the top 3-5 most relevant. Skip generic/obvious ones (e.g., don't cache "JavaScript" docs for a JS project).
  2. For each technology: a. Scan project code to identify which APIs/patterns are actually used b. Fetch documentation from best available source (see Sources above) c. Filter fetched content to patterns relevant to this project
  3. Write project-specific docs to docs/reference/<topic>.md:

- Start each file with the standard header (see File Header Format below) - Include only patterns relevant to this project's actual code - Cross-reference actual project files when possible (e.g., "Used in lib/acf.php") - Target 100-200 lines per file — enough to be useful, small enough to read quickly

  1. Update AGENTS.md — add a ## Local Reference Documentation section with verbal references (NOT @-references) to the docs: ` ## Local Reference Documentation The docs/reference/ directory contains project-specific API references. Check these files before using external documentation tools: - docs/reference/<file>.md — <brief description> `

Update — local-ref update

Refresh existing local docs.

  1. Read docs/reference/ to find existing doc files
  2. For each file, parse the <!-- source="..." --> header to determine source type and parameters (libraryId/query for context7, url for webfetch)
  3. Re-fetch based on source type:

- context7 — re-fetch using libraryId and query - webfetch — re-fetch from url - manual — skip (flag for user review if stale)

  1. Merge new content while preserving project-specific annotations and cross-references
  2. Update the <!-- cached="..." --> date
  3. Report what changed (updated, skipped manual, failed)

Lookup — local-ref lookup <topic>

Find documentation, local-first.

  1. Check docs/reference/ for a matching file (grep for topic keywords)
  2. If found, read the local file and quote/apply the relevant sections to the current task
  3. If not found, fetch from external source, then ask user if the result should be saved locally

Save — local-ref save (opportunistic, mid-project)

When working on a project and you fetch documentation from an external source (Context7, WebFetch, etc.) that would be useful across sessions:

  1. After using the fetched docs to complete the current task, offer: "This documentation could be useful in future sessions. Save to docs/reference/?"
  2. If user agrees, write a project-specific version (not raw dump) to docs/reference/<topic>.md with the standard header (see File Header Format)
  3. Add the new file to the AGENTS.md ## Local Reference Documentation bullet list so future sessions discover it
  4. Continue with the original task

This keeps docs growing organically as the project evolves, without requiring explicit init or update runs.

Passive Behavior (via AGENTS.md)

The init command adds a ## Local Reference Documentation section to AGENTS.md. This section loads every session (~80 tokens) and tells Claude to check docs/reference/ before external lookups. This passive guidance works without loading the skill itself.

File Header Format

Every cached doc file MUST start with this machine-readable header. The update command depends on it.

# Vite Asset Pipeline — Project Reference
<!-- source="context7" libraryId="/vitejs/vite" query="build manifest plugin configuration" -->
<!-- cached="2026-02-16" -->

Content here...

Header fields:

FieldRequiredValues
sourceyescontext7, webfetch, manual
libraryIdif context7Context7 library ID
urlif webfetchSource URL
queryif applicableQuery used to fetch content
cachedyesISO date (YYYY-MM-DD) of last fetch

For manually created docs, use source="manual":

# Internal Auth API — Project Reference
<!-- source="manual" cached="2026-02-16" -->

When NOT to Cache

Skip local caching when:

  • Rapidly evolving APIs — bleeding-edge or pre-1.0 libraries where docs change weekly
  • One-off lookups — if you only need one fact, fetching is cheaper than maintaining a file
  • Already in AGENTS.md — if the project's agent instructions already cover the topic

When in doubt, cache. Stale docs are better than no docs — update can refresh context7 and webfetch sources automatically (manual sources are flagged for review).

Key Design Rules

  • Verbal references only — never add @docs/reference/... to AGENTS.md (would bloat system prompt). Use plain text descriptions so Claude reads files on-demand.
  • Project-specific over generic — don't dump raw API output. Tailor examples to the project's actual code, file structure, and patterns.
  • Cross-reference project files — mention where patterns are used (e.g., "see lib/assets.php for implementation").
  • One file per topic — keep docs modular. Don't create one giant reference file.
  • 100-200 lines per file — see target in init command above.

File Naming Convention

Use descriptive kebab-case names:

docs/reference/
├── acf-patterns.md
├── vite-asset-pipeline.md
├── wordpress-cpt-taxonomy.md
├── bootstrap-grid-components.md
└── react-hooks-patterns.md

External Source References

See references/context7-api.md for Context7 API endpoints and common library IDs.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.07%
按下载量换算24

Claude

29.88%
按下载量换算20

Cursor

17.58%
按下载量换算12

Gemini CLI

9.07%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills