agentsight-auto-format

agentsight-auto-format is a skill for Claude Code 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 Code ✓ vendor

Written for Claude Code: PostToolUse hook event.

Good fit Running after code edits through a PostToolUse hook, using rustfmt, Ruff or Black, and Prettier when those tools are installed.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alibaba/anolisa/agentsight-auto-format
About the project

ANOLISA is a server-side operating layer for AI agent workloads that provides terminal access, token-saving tool-output compression, runtime controls, security, observability, skills, memory, and sandbox management. It is for running and supervising agents from a Linux terminal while retaining an existing shell, agent framework, and sandbox. The catalogue add-ons are components of its agent operating environment and workflows.

alibaba/anolisa · 603 stars · on GitHub · agentic-os.sh

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 alibaba/anolisa --skill agentsight-auto-format
Clone the repo
git clone --depth 1 https://github.com/alibaba/anolisa

Made for: Claude Code.

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/github.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/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 agentsight-auto-format

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 29
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
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.00029 $0.00466
Opus 5.5 $0.00012 $0.00186
Sonnet 5.5 $0.00006 $0.00093
Haiku 4.5 $0.00003 $0.00047

Measured 2mo ago against content hash 4f6c87520692, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 2mo 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. 2mo 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 (603 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 29 tokens to every session and 466 once invoked, about $0.0001 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

agentsight-auto-format compared with skills from other repositories

agentsight-auto-format next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
agentsight-auto-formatalibaba/anolisaSkill6031mo agoApache-2.0A29Claude Code
appsdesplega-ai/agent-swarmSkill1.0ktodayMITA43Claude Code
kapso-whatsappdesplega-ai/agent-swarmSkill1.0ktodayMITA156Claude Code
swarm-scriptsdesplega-ai/agent-swarmSkill1.0ktodayMITA100Claude Code
composiodesplega-ai/agent-swarmSkill1.0ktodayMITA128Claude Code
motion-design-video-analysisdesplega-ai/agent-swarmSkill1.0ktodayMITA107Claude Code
open-prompt-showreeldesplega-ai/agent-swarmSkill1.0ktodayMITA181Claude Code