Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问许可证需确认审计通过

context-extraction上下文提取

Agent Skill

context-extraction 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

865

周安装

35

GitHub Stars

3

下载量

272
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/crowdin/skills --skill context-extraction

简介

从字符串中提取上下文信息,支持本地化与翻译场景。

  • 按优先级顺序解析文本、上下文和文件路径线索。context-extraction 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 可用于构建 AI 上下文数据库,提升多语言应用支持能力。
  • 依赖字符串中的隐式结构(如按钮名、错误码),准确性受限于输入质量。
  • 建议配合人工校验,避免自动解析产生误导性结论。

SKILL.md

Context Extraction

Information sources (priority order)

For each string, use these JSONL fields in order - stop when you have enough to write a confident ai_context:

  1. text - the source string itself; always the primary signal
  2. key - often encodes structure (e.g. button.save, modal.title.delete_user, error.network.timeout)
  3. context - may contain a free-text description, a translator comment, a source file reference, or be empty; treat as supplementary and don't assume any specific format
  4. Source files - only if context contains a parseable file path + line number and the string is still ambiguous; read ±10–15 lines around the reference to identify UI element type, surrounding component, and props

Strings that need context

Prioritize these - skip strings that are already clear from text + key alone:

  • Ambiguous short words - single verbs, nouns, or adjectives that change meaning depending on UI placement
  • Color / status names - words that name a color, state, or category; could be a label, badge, or filter
  • ICU / message format strings - strings with plural forms or named parameters whose meaning depends on what's being counted or substituted
  • Strings with inline tags - text containing markup tags where the role of the tagged portion isn't clear from the string alone
  • Short phrases with unclear scope - brief imperative or standalone phrases that could belong to multiple UI contexts

Writing good ai_context values

  • 1–3 sentences, written for a translator - not a developer
  • State the UI element type (button, label, tab, tooltip, modal title, dropdown option, etc.) and where it appears
  • For plurals: what entity is counted, what # is replaced with
  • For inline tags: what the tagged portion renders as (link, code, bold text, etc.)
  • For color/status names: whether it's a selectable option, badge, filter label, etc.
  • Avoid file names and variable names unless they clarify meaning

Examples

StringKeyGood ai_context
"Red"color.red"Color option label in a color picker. Refers to the color red as a selectable choice."
"Blue"*(none)*"Color name used as a selectable option or status label. Clarify based on surrounding UI."
"{count, plural, one {# month} other {# months}}"duration.months"Displays a duration in months. '#' is replaced by the numeric count."
"Edit <0>src/App.tsx</0> and save to test HMR"*(none)*"Instructional UI message. The tagged portion is rendered as an inline code element highlighting a filename."
"New"button.new"Label for a button that creates a new item. The exact entity depends on the current page context."

JSONL file safety rules

Only ever edit the ai_context field value. Never touch id, key, text, file, or context.

Editing procedure

Single-string (1–5 lines): Use StrReplace scoped to the exact line. Target the "ai_context":"" substring (or the full current value if already set):

old: "ai_context":""
new: "ai_context":"Your context here."

Batch (many strings): When dozens or hundreds of lines need context, work in batches instead of one string at a time.

  • Read a portion of the file (or the whole file if manageable), identify lines that need ai_context, fill context for a batch of those lines (parse line as JSON, set ai_context, serialize back to a single line), then write or apply that batch of changes. Repeat for the next batch until done.
  • Prefer writing (or applying edits) in batches of lines rather than a single global read-then-write or hundreds of single-line replacements. Batch size is up to the implementer (e.g. tens or a hundred lines per batch).
  • When batching, still apply the validity checklist below to a sample of changed lines before saving.

Validity checklist (verify before saving)

  • The line is still a single valid JSON object
  • ai_context value is a quoted string
  • No unescaped double quotes inside the value - use \"
  • No literal newlines inside the value - keep it on one line
  • No fields added, removed, or reordered

Character escaping

  • "\"
  • \\\
  • Newline → avoid; use a space instead

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.41%
按下载量换算96

Claude

31.41%
按下载量换算85

Cursor

20.38%
按下载量换算55

Gemini CLI

10.42%
按下载量换算28

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills