Agentify
Make web pages and websites more easily navigable, parseable, and operable by AI agents, web scrapers, and automation tools.
Core Capabilities
1. Analyze
Evaluate web pages or code for agent-friendliness. Produce a scored report (0-100) with actionable improvements.
When to use: The user wants to audit a page, URL, or codebase for agent accessibility.
Workflow:
- 1. Acquire the content:
- URL → fetch and retrieve HTML
- File path → read the file
- Glob pattern → find matching files, analyze each
- IDE selection → analyze selected code
- 2. Read the scoring reference: references/scoring.md
- Read the full checklist: references/checklist.md
- Evaluate across 9 categories (100 points total):
| # | Category | Pts | Focus |
|---|
| 1 | Semantic HTML | 15 | Heading hierarchy, landmarks, semantic tags vs div soup |
| 2 |
ARIA & Accessibility | 15 | Roles, labels, live regions, keyboard attributes |
| 3 | Structured Data | 15 | JSON-LD / schema.org presence, completeness |
| 4 | Form Readability | 10 | Label association, autocomplete, fieldset grouping |
| 5 | Navigation Clarity | 10 | Consistent nav, breadcrumbs, skip links, sitemap |
| 6 | Automation Attributes | 10 | data-testid coverage, data-* for key elements |
| 7 | CSS Selector Stability | 5 | Meaningful class names vs generated hashes |
| 8 | API Discoverability | 10 | Canonical URLs, link relations, OpenAPI |
| 9 | Meta & Machine Signals | 10 | robots meta, description, OG tags, sitemap |
- 5. Output report in this format:
- Score: X/100 (Grade A-F)
- Per-category score breakdown table
- Top 5 priority improvements with before/after code
- Detailed findings per category
- Quick wins section (changes under 5 minutes, 5+ point gain)
2. Rewrite
Transform web templates to be agent-friendly while preserving all existing functionality.
When to use: The user wants to improve existing code for agent consumption.
Workflow:
- 1. Detect framework from file extension (.html, .jsx, .tsx, .vue, .svelte)
- Read the patterns reference: references/patterns.md
- Read framework-specific guidance: references/frameworks.md
- Read and understand the entire file before modifying
- Apply transformations in order:
- Replace non-semantic elements with semantic equivalents (only when intent is unambiguous)
- Add ARIA attributes to interactive elements
- Add
data-testid to buttons, links, inputs, content containers (kebab-case naming)
- Improve form labels, autocomplete, fieldset grouping
- Insert JSON-LD structured data where content type is identifiable
- Add meta tags for full HTML pages
- Add skip links and nav labels
- Fix heading hierarchy
Safety rules (non-negotiable):
- - Never remove existing code, event handlers, or component logic
- Never change class names, IDs, or visual appearance
- Never break framework-specific syntax
- Only add attributes, never replace unless strictly better
- Match existing formatting style
- 6. After modification, summarize: number of changes per category, changes considered but skipped, and follow-up suggestions needing human judgment
3. Design Spec
Generate a comprehensive agent-friendly design specification document for development teams.
When to use: The user wants to establish standards for agent-friendly web development.
Workflow:
- 1. Parse arguments for project name and focus area (e-commerce, dashboard, docs, SaaS, marketing)
- Scan the project if in a code directory:
- Detect framework (package.json, config files)
- Detect test framework
- Grep for existing data-testid, aria-*, schema.org patterns
- Read 2-3 representative components to understand code style
- 3. Read the spec template: references/spec-template.md
- Read the example spec: references/spec-example.md
- Generate a markdown spec to
agent-friendly-spec.md covering:
- Executive summary
- Semantic HTML guidelines
- ARIA & accessibility patterns
- Naming conventions (data-testid, CSS classes, components)
- Structured data (JSON-LD) per page type
- Form design patterns
- Navigation patterns
- API & discoverability
- Meta tags & machine signals
- Component-level checklists
- Testing for agent-friendliness
- Migration guide (quick wins → medium → large effort)
Each section must include: priority level (P0/P1/P2), code examples for the detected framework, anti-patterns, and verification methods.
Shared Knowledge Base
For the canonical reference on all agent-friendly web patterns (semantic HTML, ARIA, structured data, data attributes, forms, navigation, APIs, meta tags, CSS stability, interaction patterns), read: references/knowledge-base.md
Agentify
使网页和网站更易于AI代理、网络爬虫和自动化工具导航、解析和操作。
核心能力
1. 分析
评估网页或代码的代理友好性。生成带可操作改进建议的评分报告(0-100分)。
使用场景: 用户希望审计页面、URL或代码库的代理可访问性。
工作流程:
- 1. 获取内容:
- URL → 获取并检索HTML
- 文件路径 → 读取文件
- 通配符模式 → 查找匹配文件,逐一分析
- IDE选区 → 分析选中代码
- 2. 读取评分参考:references/scoring.md
- 读取完整检查清单:references/checklist.md
- 按9个类别进行评估(总分100分):
| # | 类别 | 分值 | 关注点 |
|---|
| 1 | 语义化HTML | 15 | 标题层级、地标、语义标签 vs div堆砌 |
| 2 |
ARIA与无障碍 | 15 | 角色、标签、动态区域、键盘属性 |
| 3 | 结构化数据 | 15 | JSON-LD / schema.org 存在性及完整性 |
| 4 | 表单可读性 | 10 | 标签关联、自动填充、fieldset分组 |
| 5 | 导航清晰度 | 10 | 一致导航、面包屑、跳过链接、站点地图 |
| 6 | 自动化属性 | 10 | data-testid覆盖、关键元素data-*属性 |
| 7 | CSS选择器稳定性 | 5 | 有意义的类名 vs 生成哈希值 |
| 8 | API可发现性 | 10 | 规范URL、链接关系、OpenAPI |
| 9 | 元数据与机器信号 | 10 | robots元标签、描述、OG标签、站点地图 |
- 5. 按以下格式输出报告:
- 评分:X/100(等级A-F)
- 各类别得分明细表
- 前5项优先改进项及前后代码对比
- 各类别详细发现
- 速赢项(5分钟内可完成,提升5分以上)
2. 重写
将网页模板转换为代理友好形式,同时保留所有现有功能。
使用场景: 用户希望改进现有代码以供代理使用。
工作流程:
- 1. 根据文件扩展名检测框架(.html, .jsx, .tsx, .vue, .svelte)
- 读取模式参考:references/patterns.md
- 读取框架特定指南:references/frameworks.md
- 修改前完整阅读并理解文件
- 按顺序应用转换:
- 将非语义元素替换为语义等价元素(仅在意图明确时)
- 为交互元素添加ARIA属性
- 为按钮、链接、输入框、内容容器添加data-testid(kebab-case命名)
- 改进表单标签、自动填充、fieldset分组
- 在可识别内容类型处插入JSON-LD结构化数据
- 为完整HTML页面添加元标签
- 添加跳过链接和导航标签
- 修复标题层级
安全规则(不可协商):
- - 绝不删除现有代码、事件处理器或组件逻辑
- 绝不更改类名、ID或视觉外观
- 绝不破坏框架特定语法
- 仅添加属性,除非严格更优否则不替换
- 匹配现有格式风格
- 6. 修改后总结:各类别变更数量、考虑但跳过的变更、需要人工判断的后续建议
3. 设计规范
为开发团队生成全面的代理友好设计规范文档。
使用场景: 用户希望建立代理友好网页开发标准。
工作流程:
- 1. 解析项目名称和关注领域参数(电商、仪表盘、文档、SaaS、营销)
- 如果在代码目录中则扫描项目:
- 检测框架(package.json、配置文件)
- 检测测试框架
- 搜索现有data-testid、aria-*、schema.org模式
- 读取2-3个代表性组件以了解代码风格
- 3. 读取规范模板:references/spec-template.md
- 读取示例规范:references/spec-example.md
- 生成markdown规范文件agent-friendly-spec.md,涵盖:
- 执行摘要
- 语义化HTML指南
- ARIA与无障碍模式
- 命名约定(data-testid、CSS类、组件)
- 按页面类型的结构化数据(JSON-LD)
- 表单设计模式
- 导航模式
- API与可发现性
- 元标签与机器信号
- 组件级检查清单
- 代理友好性测试
- 迁移指南(速赢项 → 中等 → 大规模)
每个部分必须包含:优先级(P0/P1/P2)、检测框架的代码示例、反模式及验证方法。
共享知识库
关于所有代理友好网页模式(语义化HTML、ARIA、结构化数据、数据属性、表单、导航、API、元标签、CSS稳定性、交互模式)的规范参考,请阅读:references/knowledge-base.md