url-analysis

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

URL Analysis

URL分析

This skill validates URLs both technically and contextually, ensuring links are functional and appropriate for their context.
本技能可从技术和上下文层面验证URL,确保链接功能正常且符合其使用场景。

When to Use This Skill

何时使用本技能

  • When validating URLs in content
  • When analyzing link context and appropriateness
  • When extracting links from documents
  • When checking link functionality
  • When ensuring link relevance
  • When auditing link quality
  • 验证内容中的URL时
  • 分析链接的上下文与适用性时
  • 从文档中提取链接时
  • 检查链接功能时
  • 确保链接相关性时
  • 审核链接质量时

What This Skill Does

本技能的功能

  1. Technical Validation: Checks HTTP status, redirects, SSL
  2. Contextual Analysis: Evaluates link appropriateness
  3. Link Extraction: Extracts and categorizes links
  4. Content Relevance: Checks if linked content matches context
  5. Security Analysis: Identifies security concerns
  6. Quality Assessment: Provides link quality scores
  1. 技术验证:检查HTTP状态、重定向、SSL证书
  2. 上下文分析:评估链接的适用性
  3. 链接提取:提取并分类链接
  4. 内容相关性:检查链接内容是否与上下文匹配
  5. 安全分析:识别安全隐患
  6. 质量评估:提供链接质量评分

Helper Scripts

辅助脚本

This skill includes Python helper scripts in
scripts/
:
  • validate_urls.py
    : Validates URLs from files or command line. Checks HTTP status codes, redirects, and accessibility. Outputs JSON with validation results.
    bash
    # Validate URLs from file
    python scripts/validate_urls.py document.md
    
    # Validate single URL
    python scripts/validate_urls.py --url https://example.com
本技能在
scripts/
目录下包含Python辅助脚本:
  • validate_urls.py
    :验证来自文件或命令行的URL。检查HTTP状态码、重定向和可访问性。输出包含验证结果的JSON数据。
    bash
    # Validate URLs from file
    python scripts/validate_urls.py document.md
    
    # Validate single URL
    python scripts/validate_urls.py --url https://example.com

How to Use

使用方法

Validate URLs

验证URL

Validate all URLs in this document
Check if these links are appropriate for their context
Validate all URLs in this document
Check if these links are appropriate for their context

Specific Analysis

特定分析

Extract and analyze all links in this content
Extract and analyze all links in this content

Analysis Process

分析流程

Technical Validation

技术验证

Using Helper Script:
The skill includes a Python helper script for URL validation:
bash
undefined
使用辅助脚本:
本技能包含用于URL验证的Python辅助脚本:
bash
undefined

Validate URLs from a file

Validate URLs from a file

python scripts/validate_urls.py document.md
python scripts/validate_urls.py document.md

Validate a single URL

Validate a single URL

python scripts/validate_urls.py --url https://example.com

**Checks:**

- HTTP status codes (200, 301, 404, etc.)
- Redirect chains
- Response times
- SSL certificate validity
- URL syntax validity
python scripts/validate_urls.py --url https://example.com

**检查项:**

- HTTP状态码(200、301、404等)
- 重定向链
- 响应时间
- SSL证书有效性
- URL语法有效性

Contextual Analysis

上下文分析

Evaluates:
  • Link text vs. destination content
  • Semantic alignment
  • Publication date relevance
  • Authority of source
  • Value to reader
评估内容:
  • 链接文本与目标内容的匹配度
  • 语义一致性
  • 发布日期相关性
  • 来源权威性
  • 对读者的价值

Link Extraction

链接提取

Categorizes:
  • Internal vs. external links
  • Anchor links
  • File downloads
  • API endpoints
分类类型:
  • 内部链接 vs 外部链接
  • 锚点链接
  • 文件下载链接
  • API端点

Examples

示例

Example 1: URL Validation

示例1:URL验证

Input: Validate URLs in blog post
Output:
markdown
undefined
输入:验证博客文章中的URL
输出
markdown
undefined

URL Analysis: Blog Post

URL Analysis: Blog Post

Technical Validation

Technical Validation

  • Status: 200 OK
  • Response Time: 320ms
  • SSL: Valid
  • Redirects: None
  • Status: 404 Not Found
  • Issue: Broken link
  • Fix: Remove or find alternative
  • Status: 200 OK
  • Response Time: 320ms
  • SSL: Valid
  • Redirects: None
  • Status: 404 Not Found
  • Issue: Broken link
  • Fix: Remove or find alternative

Contextual Analysis

Contextual Analysis

  • Link Text: "Learn more about React"
  • Destination: React documentation
  • Relevance: High ✓
  • Status: Appropriate
  • Link Text: "Advanced React patterns"
  • Destination: Homepage (not specific article)
  • Relevance: Low ✗
  • Issue: Link text doesn't match destination
  • Fix: Link to specific article or update link text
undefined
  • Link Text: "Learn more about React"
  • Destination: React documentation
  • Relevance: High ✓
  • Status: Appropriate
  • Link Text: "Advanced React patterns"
  • Destination: Homepage (not specific article)
  • Relevance: Low ✗
  • Issue: Link text doesn't match destination
  • Fix: Link to specific article or update link text
undefined

Best Practices

最佳实践

URL Validation

URL验证

  1. Check Status: Verify all links return 200 or appropriate redirect
  2. Update Redirects: Use final destination, not redirect chains
  3. Context Matters: Ensure links match their context
  4. Security: Prefer HTTPS, check SSL validity
  5. Relevance: Verify linked content matches expectations
  1. 检查状态:验证所有链接返回200状态码或合适的重定向
  2. 更新重定向:使用最终目标链接,而非重定向链
  3. 上下文匹配:确保链接符合其使用场景
  4. 安全优先:优先使用HTTPS,检查SSL有效性
  5. 相关性验证:确认链接内容符合预期

Related Use Cases

相关用例

  • Link validation
  • Content quality assurance
  • SEO link auditing
  • Documentation review
  • Link extraction and analysis
  • 链接验证
  • 内容质量保障
  • SEO链接审核
  • 文档审查
  • 链接提取与分析