wos-parse-results

Parse search results from the current Web of Science results page or API response, producing structured result data for use by other internal skills.

Last repository push
GitHub Stars
139
Forks
18
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "wos-parse-results" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-53bf3a3fde51015ca3909a5e8a71dde092f14107dc9fb1059c61fe5e5d52e779. Verify the upstream source and version against https://github.com/cookjohn/wos-skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Parse search results from the current Web of Science results page or API response, producing structured result data for use by other internal skills.

0 Downloads

Introduction source: third_party · cookjohn · 0.0.1 Reference

SkillPi interpretation

Tasks
Parse search results from the current WoS results page or API response. Internal skill used by other skills.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: wos-parse-results
description: Parse search results from the current WoS results page or API response. Internal skill used by other skills.
argument-hint: "[number of results to extract, default 10]"
user-invocable: false
disable-model-invocation: false

WoS Parse Results

Internal skill for extracting structured data from WoS. Two modes: API response parsing (preferred) or DOM scraping (fallback).

Mode A: API Response Parsing (preferred)

When using the runQuerySearch API, the response is NDJSON. Parse records from the records payload:

// Parse NDJSON response text
const lines = text.trim().split('\n').map(l => { try { return JSON.parse(l); } catch(e) { return null; } }).filter(Boolean);
const searchInfo = lines.find(l => l.key === 'searchInfo')?.payload;
const recordsData = lines.find(l => l.key === 'records')?.payload;

const records = Object.entries(recordsData).map(([idx, rec]) => ({
  idx: parseInt(idx),
  wosId: rec.colluid,
  title: rec.titles?.item?.en?.[0]?.title || '',
  authors: rec.names?.author?.en?.filter(Boolean).map(a => a.wos_standard).join('; ') || '',
  source: rec.titles?.source?.en?.[0]?.title || '',
  year: rec.pub_info?.pubyear || '',
  vol: rec.pub_info?.vol || '',
  issue: rec.pub_info?.issue || '',
  pages: rec.pub_info?.page_no || '',
  doi: rec.doi || '',
  citations: rec.citation_related?.counts?.WOSCC || 0,
  citationsAll: rec.citation_related?.counts?.ALLDB || 0,
  refCount: rec.ref_count || 0,
  abstract: rec.abstract?.basic?.en?.abstract?.replace(/<[^>]*>/g, '') || '',
  docType: rec.doctypes?.[0] || '',
  oa: rec.oa || false
}));

Mode B: DOM Scraping (fallback)

When the browser is on a results page and API is not available:

async () => {
  for (let i = 0; i < 20; i++) {
    if (document.querySelector('app-record')) break;
    await new Promise(r => setTimeout(r, 500));
  }

  const records = [...document.querySelectorAll('app-record')].map((rec, idx) => {
    const titleEl = rec.querySelector('a[data-ta="summary-record-title-link"]');
    const title = titleEl?.textContent?.trim() || '';
    const href = titleEl?.href || '';
    const wosId = href.match(/WOS:\w+/)?.[0] || '';
    const authorEls = rec.querySelectorAll('a[data-ta*="DisplayName-author"]');
    const authors = [...authorEls].map(a => a.textContent?.trim()).join('; ');
    const sourceEl = rec.querySelector('a[data-ta="jcr-link-menu"]');
    const source = sourceEl?.textContent?.trim()?.replace('arrow_drop_down', '') || '';
    const citedEl = rec.querySelector('a[data-ta="stat-number-citation-related-count"]');
    const citations = citedEl?.textContent?.trim() || '0';
    return { idx: idx + 1, title, wosId, authors, source, citations };
  });

  return { status: 'ok', recordCount: records.length, records };
}

Notes

  • Mode A is always preferred — structured JSON, no selector fragility
  • Mode B is fallback when already on a results page without API access
  • DOM selectors may miss records due to lazy loading or dynamic rendering

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value65/100

Highlights

  • 针对学术文献检索场景,具有明确实用价值
  • 作为内部技能,为其他 Skill 提供结构化数据解析能力
Trigger Precision75/100

Areas to improve

  • 触发词描述缺少具体示例 Reported severity: Minor

    description 说明了用途,但未提供具体的触发关键词或短语示例,可能影响用户理解触发条件。

    Recommendation: 建议在 description 或 skill_body 中添加具体的触发词示例,如“解析WoS结果”、“提取WoS记录”等。

Highlights

  • 触发边界清晰,明确标注为内部技能使用
Structure and Standards95/100

Highlights

  • 文档结构清晰,包含两种模式的详细实现代码
  • 提供了完整的字段说明和端到端示例
  • frontmatter 完整,单文件长度适中
Execution Reliability85/100

Areas to improve

  • DOM 选择器可能存在 fragility Reported severity: Minor

    Mode B 的 DOM 选择器依赖于特定属性(如 data-ta),页面结构变化可能导致解析失败。

    Recommendation: 建议在 Notes 中进一步强调 Mode A 的优先性,并考虑添加更多容错机制或选择器备选方案。

Highlights

  • 提供了两种模式的实现,包含错误处理机制
  • 工具来源明确,覆盖主要异常场景
Evidence Verifiability (mean of the first four)80/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

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

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.