agentsight-auto-format

agentsight-auto-format is a skill for Claude Code, Codex from alibaba/anolisa. It costs 29 tokens per session (466 once invoked), scanned A, original, Apache-2.0.

An automatic formatting step for Rust, Python, TypeScript, and TSX files after they are edited. It uses each language's local formatter on only the files changed.

In plain words
What is it for?
Running after code edits through a PostToolUse hook, using rustfmt, Ruff or Black, and Prettier when those tools are installed.
Why use it?
It prevents small style differences from accumulating and keeps edited files consistent without formatting the whole project.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/alibaba/anolisa/agentsight-auto-format
Any agent
npx skills add alibaba/anolisa --skill agentsight-auto-format
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

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 agentsight-auto-format

README.md
[![agentmods](https://agentmods.dev/badge/skills/alibaba/anolisa/agentsight-auto-format.svg)](https://agentmods.dev/skills/alibaba/anolisa/agentsight-auto-format)
Your own site
<a href="https://agentmods.dev/skills/alibaba/anolisa/agentsight-auto-format"><img src="https://agentmods.dev/badge/skills/alibaba/anolisa/agentsight-auto-format.svg" alt="Measured on agentmods" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00029 $0.00466
Opus 5 $0.00015 $0.00233
Sonnet 5 $0.00006 $0.00093
Haiku 4.5 $0.00003 $0.00047

Measured 4d ago against content hash 4f6c87520692, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agentsight-auto-format 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (post-edit-format.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/agentsight/develop-skills/agentsight-auto-format/SKILL.md · 43 lines

What it actually says

代码自动格式化

目标

编辑 .rs.py.ts.tsx 文件后,自动运行对应的格式化工具,保持代码风格一致。

触发时自动执行

每次编辑代码文件后(Edit、Write 等操作),对被修改的文件运行对应的格式化命令。格式化失败时静默跳过,不阻断工作流。

格式化规则

扩展名 命令 备注
.rs rustfmt <file> 直接调用,不需要 crate 上下文
.py ruff format <file> 没有 ruff 时用 black --quiet <file>
.ts .tsx prettier --write <file> 需要本地已安装 prettier

注意事项

  • 只格式化本次编辑的文件,不要全量格式化
  • 格式化工具不存在时跳过,不报错
  • 不要用 cargo fmt(需要 crate 上下文,对单文件不友好)
  • 不要用 npx prettier(会触发网络下载,有供应链风险)
  • 提交前仍需运行 cargo fmt --check / cargo clippy 做最终检查

Hook 自动化

本目录下的 post-edit-format.py 脚本可挂接到任何支持 PostToolUse hook 的 agent,实现机械式自动格式化。

脚本从 stdin 读取被编辑的文件信息(支持 hook JSON 和纯文本路径),自动分发到对应 formatter。用法:

echo "/path/to/file.rs" | python3 develop-skills/agentsight-auto-format/post-edit-format.py

各 agent 的 hook 配置方式不同,请参考对应 agent 文档将脚本挂在 PostToolUse(Edit/Write)事件上。hook 配置属于开发者本地设置,不提交仓库。

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 4d ago First seen · 43 lines · 29 tokens per session scan A 4f6c87520692

Subscribe to this mod's changes

agentsight-auto-format is a skill published in the GitHub repository alibaba/anolisa (618 stars, last pushed today), licensed Apache-2.0. It adds 29 tokens to every session and 466 once invoked, about $0.0001 per session on Opus 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

beevibe-team-mesh-negotiation

Multi-round negotiation protocol — covers both initiator and peer roles. Use when about to call negotiate(), when receiving a intent block as a peer, or when receiving an 'escalated' sentinel from a blocked respondnegotiate. Covers proposal crafting, counter-strategy, deadlock detection, when to accept early…

beevibe-ai/beevibe · 112 tokens

beevibe-verify-pr

CI verification before marking a PR-bearing task done. Use BEFORE calling mcpbeevibeupdateprogress(done) on any session whose deliverable is a pull request — including the first dispatch (you opened the PR with gh pr create) and any revision dispatch (you pushed new commits to an existing PR). Watches the PR's…

beevibe-ai/beevibe · 172 tokens

beevibe-pre-task-setup

Cold-start git workspace setup for a fresh beevibe task. Use at the start of a session whose intent has a block but NO or block — i.e. the first dispatch of this task. Checks for an existing repo clone, pulls the base branch if present (clone if missing), prunes any per-task worktrees from earlier tasks whose work has…

beevibe-ai/beevibe · 198 tokens

beevibe-use-repo

You are the child agent inside a fresh Docker sandbox. Borrow the given GitHub repo, produce a real artifact for the goal, and export it. Do not review the repo. The proof is that it works.

beevibe-ai/beevibe · 50 tokens

spec-converge

Iteratively review an instar-development spec with multi-angle internal reviewers (security, scalability, adversarial, integration, decision-completeness, lessons-aware) and real cross-model external reviewers routed through the agent's own installed CLIs (codex → GPT-tier, gemini → Gemini-tier; one pass per available…

JKHeadley/instar · 135 tokens

beevibe-discover-repo

Find the best GitHub repo for a goal, then call userepo to run it in a sandbox. Use whenever the user's goal requires a capability you don't have natively and you haven't been given a specific repo.

beevibe-ai/beevibe · 51 tokens