skill-constraints

skill-constraints is a skill for Claude Code, Codex from rexleimo/aios. It costs 48 tokens per session (1,434 once invoked), scanned A, original, MIT.

A set of safety rules for browser automation, where an agent controls a web browser to read pages or perform actions. It defines how browser tools should be used, when to take screenshots, and when a person must check the result.

In plain words
What is it for?
Use it when setting up or checking browser or MCP operations, including page reading, screenshots, publishing, liking, commenting, and other website actions.
Why use it?
It reduces unsafe, hard-to-trace, or overly aggressive browser actions. It also sets a consistent order for collecting page text, HTML, and visual evidence.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions Codex; mentions OpenCode.

Good fit Use it when setting up or checking browser or MCP operations, including page reading, screenshots, publishing, liking, commenting, and other website actions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rexleimo/aios/skill-constraints
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add rexleimo/aios --skill skill-constraints
Clone the repo
git clone --depth 1 https://github.com/rexleimo/aios

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for skill-constraints

README.md
[![agentmods](https://agentmods.dev/badge/skills/rexleimo/aios/skill-constraints/github.svg)](https://agentmods.dev/skills/rexleimo/aios/skill-constraints)
Your own site
<a href="https://agentmods.dev/skills/rexleimo/aios/skill-constraints"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/skill-constraints/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for skill-constraints

Your own site · 80×15
<a href="https://agentmods.dev/skills/rexleimo/aios/skill-constraints"><img src="https://agentmods.dev/badge/skills/rexleimo/aios/skill-constraints.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,434 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.01434
Opus 5.5 $0.00019 $0.00574
Sonnet 5.5 $0.00010 $0.00287
Haiku 4.5 $0.00005 $0.00143

Measured 29d ago against content hash 1a261820c0b9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

skill-constraints scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 29d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skill-sources/skill-constraints/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

浏览器操作约束

Working directory: any (MCP tools are session-relative; file paths are relative to project root)

所有浏览器自动化操作 MUST 遵循此约束规则,确保安全、高效、可追溯。

When to Use

  • 执行任何浏览器自动化操作时
  • 使用 MCP 工具(page.extract_text, page.get_html, page.screenshot 等)时
  • 进行任何运营操作(发布笔记、点赞、评论等)时

Core Pattern

浏览器操作

0. 启动浏览器时默认要求可见界面并走 CDP
   - 优先:`chrome.launch_cdp { port: 9222, user_data_dir: '~/.chrome-cdp-profile' }`
   - 随后:`browser.connect_cdp { cdp_url: 'http://127.0.0.1:9222' }`
   - 仅在无图形环境或后台 smoke test 时才允许 headless 模式
   - 当同一 `userDataDir` 被其他进程占用时,优先复用已启动浏览器,不共享被锁目录
   - 若目标是“多个 agent 共享同一登录态”,统一连接同一个 CDP endpoint

1. 优先使用文本/DOM证据做决策
   - 先读 `page.extract_text`,必要时补充 `page.get_html`
   - 比整页截图更高效,可快速定位按钮文案和页面状态
   - 不使用 `chrome-devtools` 工具链执行业务流程,统一走 `mcp-browser-use` 的 browser-use 工具链(`chrome.*` / `browser.*` / `page.*`)

2. 只有视觉信息不足时才截图,并保存到 temp/ 目录
    - 条件:文本/HTML 证据不足以判断状态
    - 使用:`page.screenshot`
    - 路径:`aios/temp/{操作类型}_{时间戳}.png`
    - 示例:`login_20240301_120000.png`
    - 若 `aios/temp/` 不存在则先创建:`mkdir -p aios/temp`

操作间隔

Every browser action (click, type, navigate) MUST be followed by a random wait. No exceptions.

Use page.wait with a random duration, or if running in a shell context:

sleep $((RANDOM % 26 + 5))

In MCP context, use page.wait({ duration: <random 5-30s> }) or equivalent.

This is not optional — skipping intervals risks detection and account bans. If you batch operations without waiting, the entire task is considered failed regardless of outcome.

Rules

MUST NOT(禁止行为)

行为 原因
直接在对话中粘贴大段截图 浪费 token,MUST 保存到文件
跳过反检测 每次操作前 MUST 执行
跳过操作间隔 MUST 随机 5-30 秒
在非 temp 目录保存截图 MUST 保存到 aios/temp/
自动化执行第三方平台登录 登录 MUST 由人工完成(含 2FA)

MUST(必需行为)

行为 原因
操作前执行反检测 使用反检测脚本(如项目中已有)或通过 CDP 指纹配置规则
截图保存到 temp/ 路径固定为 aios/temp/
先读文本/DOM page.extract_text → page.get_html
使用 grep 搜索快照 先保存 snapshot 到文件,再用 grep 搜索
记录到历史 关键操作写入 .aios/context-db checkpoint/event
登录态检测 识别到登录页/验证码/2FA 时 MUST 先提示用户协作登录

Read the full file on GitHub · 135 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 29d ago Changed 1a261820c0b9
  2. 1mo ago Changed 7a51d86b1160
  3. 1mo ago Changed beb55e80ebc0
  4. 1mo ago Changed 8fc56ce2b6aa
  5. 1mo ago First seen · 135 lines · 48 tokens per session scan A 4aea2515b980

Subscribe to this mod's changes

skill-constraints is a skill published in the GitHub repository rexleimo/aios (54 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 1,434 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

opencli-autofix

Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you through collecting a trace artifact, patching the adapter, retrying, and filing an upstream GitHub issue after a verified fix. Works with any AI agent.

jackwener/OpenCLI · 61 tokens

opencli-adapter-author

Build or improve an OpenCLI JS adapter using observed site behavior, existing adapters and browser API evidence. For ad-hoc browser interaction, see opencli-browser.

jackwener/OpenCLI · 38 tokens

opencli-browser

Drive Chrome with OpenCLI to inspect pages, interact with logged-in sites, capture API evidence, and manage native tabs, groups and windows. For reusable adapters, see opencli-adapter-author.

jackwener/OpenCLI · 43 tokens

webcmd-browser

Use when a live browser task requires Playwright interaction, authenticated handoff, visible UI verification, or ad-hoc page inspection.

agentrhq/webcmd · 30 tokens

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

nicobailon/surf-cli · 60 tokens

web-browsing-cli

Token-efficient web browsing and web content extraction for AI agents. Use when reading a URL, browsing websites, checking links, extracting static page content, or replacing raw HTML and browser screenshots.

only-cli/oc · 43 tokens