Opencli Sitemap Author logo

Opencli Sitemap Author

CommunityPopular
jackwener
opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

Overview

Publisherjackwener
RepositoryOpenCLI
Skill nameopencli-sitemap-author
Stars
29.4K
Forks
2.9K
Bundled files
1
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by jackwener on GitHub. Read the source before you install it.

Installation

Install the Opencli Sitemap Author AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jackwener/OpenCLI.git /tmp/OpenCLI
mkdir -p .claude/skills
cp -r /tmp/OpenCLI/skills/opencli-sitemap-author .claude/skills/opencli-sitemap-author
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Opencli Sitemap Author in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Opencli Sitemap Author on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Opencli Sitemap Author is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

opencli-sitemap-author

You are authoring a task execution graph for agents, not an SEO sitemap. The artifact should help an agent using opencli browser decide where it is, what path to take next, which OpenCLI adapter to prefer, and how to recover when the page disagrees with memory.

Keep the sitemap small and verified. Do not crawl a whole site. Capture only task-relevant paths that you actually observed.


Storage Model

Two layers:

  • Global seed: sitemaps/<site>/ (top-level)
  • Local overlay: ~/.opencli/sites/<site>/sitemap/

Local overlay wins by stable id. Write new discoveries to local first. Promote to global only after review.

Recommended layout:

text
sitemap/
  SITE.md                 # site purpose, auth assumptions, stable page ids
  pages/<page-id>.md      # page state signatures, actions, linked APIs
  pages/_<partial>.md     # cross-page UI partial (e.g. _tweet_card.md)
  workflows/<task-id>.md  # best path, fallback path, avoid list
  pitfalls.md             # durable failure modes and stale areas

Size guidance(实测启发式)

references/sitemap-schema.md §1.1 spec 硬 800 token,但 PoC 实测简单站单 page 1-2 action 自然落到 800-2000 token。强拆反碎,author 用下表决策:

spec 800 是 lazy-load 优化目标 + Phase 2 audit 阈值;下表是 author 实战决策辅助,不替代 spec hard 限制。超 800 的文件 audit 会 flag,author 解释("5 个 cohesive UI primitive 一起放")或拆。

文件 token决策
< 1500自然 size,不动
1500-3000看 cohesion — 5 个 cohesive UI primitive 一起放 OK;mixed 内容拆
> 3000必拆 sub-file 或 partial(agent lazy load budget 真有限制)

Phase 2 cron audit 按 token count 不按 byte count(CJK 中文 token-per-char 比 English 高 30-50%)。


Authoring Loop

  1. Load existing memory: read local overlay first, then global seed if present.
  2. Verify reality: use opencli browser <session> state, find, network, and analyze; browser state is truth. If you just completed an opencli-adapter-author session for this site, start from the retained browse trace under ~/.opencli/sites/<site>/traces/ as seed evidence instead of re-discovering the path from zero.
  3. Record only durable structure: page purpose, stable anchors, state signature, actions, workflows, API references, pitfalls.
  4. Use stable ids: page/action/workflow ids should survive URL params, locale text drift, and minor layout changes.
  5. Write local draft: update ~/.opencli/sites/<site>/sitemap/... unless explicitly promoting to repo.
  6. Mark stale on conflict: if existing sitemap disagrees with current browser state, trust browser state and mark the item stale rather than forcing the old path.

Required Action Schema

Every action edge must include:

yaml
### action:<stable-id>
pre: <current page / state / auth requirements>
do: <agent action, adapter command, or semantic browser command>
post: <URL / state / output that proves success>
fail: <failure signal 1> | <signal 2>
recover: <fallback instruction>; adapter_health_update: <adapter> -> suspect
evidence: opencli browser <cmd> or trace:<path>

Use this compact form by default. Use the longer Markdown form from references/sitemap-schema.md only when an action genuinely needs long explanation. verified_at and source are inherited from file frontmatter; do not repeat them per action.

Do not promote an action without evidence. If a recovery path marks adapter_health_update, the browser-sitemap consumer must write that health update to the local overlay so the next agent does not retry a known-suspect adapter.

Partial pages(跨页通用 UI)

partial 文件 (_<name>.mdurl_patterns: []) 装跨页 UI 原语(如 _tweet_card.md 的 like/reply/repost/bookmark)。被多 page 通过 action:<id> in pages/_<name>.md 引用。

Partial scope rule:partial 内所有 selector(testid / a11y / structural)必须 scoped 到 partial root,不能是 page-level first match。例如 _tweet_card.md:

yaml
# ❌ 错:page-level first match,会点到 timeline 首条非 target card
do: click [data-testid="like"]

# ✅ 对:scoped 到 article root
do: click [data-testid="like"] in article[role="article"] (card scope)

partial 文件顶部写明 scope root 一行:

md
## Card scope rule
所有 testid selector 必须 scoped 到 `article[role="article"]`,不能用 page-level first match。

Workflow Fields

Each workflow should answer:

  • Goal: user-facing task this workflow solves.
  • State signature: minimal observable checkpoint for resume after sleep/compaction.
  • Best path: prefer existing opencli <site> <command> adapter if it covers the goal.
  • Fallback path: browser workflow if the adapter is missing or failing.
  • Avoid: tempting paths that waste turns, trigger modals, or rely on unstable selectors.
  • Stale markers: last verified date and known layout/API drift signals.

Endpoint/API knowledge should reference ids from endpoints.json when available. Do not duplicate full endpoint schemas inside sitemap files.

Fallback on_adapter_fail: convention(推荐)

Fallback path 第一行声明触发条件 + adapter_health_update directive,把"为什么走 fallback"和"标 adapter suspect"放一起:

yaml
on_adapter_fail:
  - adapter_health_update: opencli twitter post -> suspect
  - opencli browser state (verify current page)
  - if not on /home: goto /home
  - action:open_compose in pages/home.md
  - ...

比纯 step list 清晰:consumption skill 看到 on_adapter_fail: key 知道这是 adapter-trigger 而非 entry-point fallback,directive 先执行后续才走 steps。schema v1.2 candidate,目前作为 SKILL guideline 推荐。

SITE.md Top-level routes — 标 uncovered routes

SITE.mdTop-level routes 不仅列已覆盖的 page,也应显式标存在但 sitemap 不导航的 route,避免 agent 默认"sitemap 没列 → 不存在":

md
## Top-level routes

- /home → pages/home.md
- /search → pages/search.md
- /messages → pages/messages.md(DM,本 PoC v1 不覆盖)   # ← 显式 uncovered marker
- /settings → 不在 sitemap scope,agent 自探         # ← 同上

不写 = agent 不知该 route 存在;写 + 标 uncovered = agent 知道存在但 sitemap 帮不上忙,自己探。


Red Lines

  • Sitemap is a hint; current browser state is truth.
  • Do not write secrets, cookies, user-private ids, private messages, or account-specific values.
  • Do not document bypasses for CAPTCHA, WAF, access control, rate limits, or paid gates.
  • Do not store brittle snapshot indices like [17] as durable targets. Store semantic anchors and recovery instructions.
  • Do not describe unverified paths as facts. Use draft or stale labels.
  • Drafts go inside sitemap/draft-<topic>.md, not ~/.opencli/sites/<site>/sitemap.draft.md at the parent level — the latter is invisible to opencli browser sitemap availability detection.

Detailed schema

See references/sitemap-schema.md for the full field-level spec — SITE.md / pages/<id>.md / workflows/<id>.md / apis.md / pitfalls.md schemas, action-level state signatures, adapter_health enum (healthy / suspect / broken), endpoint reference rules, two-layer overlay semantics, draft placement, and Phase 2 validation rules.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Opencli Sitemap Author AI skill do?

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

Why use Opencli Sitemap Author on TypingMind?

Because you install it once and use it with any model. Opencli Sitemap Author is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Opencli Sitemap Author in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jackwener/OpenCLI/tree/main/skills/opencli-sitemap-author. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Opencli Sitemap Author?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Opencli Sitemap Author?

As many as you like. As long as a model supports skills, you can use Opencli Sitemap Author with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Opencli Sitemap Author AI skill free?

Yes. It is published on GitHub by jackwener under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇