agentleFS
owenliang60-ship-itowenliang60-ship-it/knowledge-mgmt/lint/SKILL.md

lint

Skill37 starsChanged 8 months agoMITView on GitHub

Obsidian Vault 全量体检。扫描断链、孤岛、缺标签、噪声标签、Clipping 库存、MOC 完整性,产出健康报告。当用户说"lint"、"体检"、"vault 检查"、"健康检查"时触发。

84 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use ingest, project and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • Google CloudSkill

    ingest

    Extracts, distills, and compiles raw sources (PPTX slide decks, PDFs, Word docs, Excel sheets, web URLs, transcripts, codebases, or raw/ directories) into persistent, structured Knowledge Compiler markdown wikis following the Open Knowledge Format (OKF v0.2) and Andrej Karpathy LLM-Wiki standard. Use when the user invokes /ingest, asks to ingest raw files or a target path, compile knowledge, update the wiki, or extract unstructured files into markdown knowledge bases. Don't use for retrospectively compiling the active chat conversation without external files (use distill-session) or for read-only vault lookups (use vault-query).

    Also in 27 projects that use this

  • BugRogerSkill

    project

    Project lifecycle management. Dispatches to Ada.

    Also in 5 projects that use this

  • PydanticSkill

    coverage

    Fetch coverage diff from Codecov for the current branch or a specific PR. Shows uncovered lines, patch coverage, and overall coverage change.

    Also in 4 projects that use this

  • NVIDIASkill

    save

    Persist the working library to the run dir and durable catalog. Use for /save.

    Also in 5 projects that use this

  • toneron2Skill

    capture

    Capture thoughts to inbox with automatic classification

    Also in 5 projects that use this

  • GitHubSkill

    state-management

    CoreAI Sandbox's TanStack Query + mock-JSON data layer. USE WHEN: editing data-fetching hooks (`app/hooks/use*.ts`), adding mock data in `app/data/`, or wiring a component to query state.

    Also in 3 projects that use this

The file

Files
SKILL.md

/lint — Vault 健康体检

参考规则:先读取 vault 根目录 SCHEMA.md 获取完整检查项定义。

执行流程

Step 1: 读取 Schema

obsidian read path="SCHEMA.md"

确认当前检查项清单和标签体系定义。

Step 2: 全量扫描

并行执行以下检查(使用 Obsidian CLI + subagent 加速):

2a: 链接检查

# 断链:搜索所有 wikilink,检查目标是否存在
obsidian search query="[["
# 孤岛:检查 Cards/ 下零 backlink 的文件
# 对每个 Card: obsidian backlinks path="Cards/{name}.md"

2b: 标签检查

# 扫描所有 Cards,检查 frontmatter 中是否有 type/ 和 domain/ 标签
# 扫描所有标签,找出不属于四维体系的噪声标签
obsidian tags path="Cards/"

2c: 格式检查

# 扫描所有 .md 文件,检查是否有 frontmatter(以 --- 开头)
obsidian files folder="Cards"
# 逐个读取检查 frontmatter

2d: Clipping 库存

# 统计待研究 / 已研究数量(按文件夹区分)
obsidian files folder="Clippings"       # 待研究(根目录下的 .md 文件)
obsidian files folder="Clippings/已研究"  # 已研究
# 检查超过 30 天未研究的(按 created 字段判断)

2e: MOC 完整性

# 读取每个 MOC 文件
# 检查是否有 Card 被遗漏(有 domain 标签但不在对应 MOC 中)
# 检查 MOC 中的链接是否有效

2f: 空链统计(知识缺口)

# 收集所有指向不存在页面的 [[wikilink]]
# 按 domain 分组统计

Step 3: 安全写入

Lint 可自动执行的(无需用户确认):

  1. 生成健康报告

Lint 不能自动执行的(只报告):

  • 修复断链、补标签、建 Card、修改/删除任何内容

Step 4: 生成健康报告

产出格式:

---
title: "Vault Health Report YYYY-MM-DD"
tags:
  - type/health-report
date: YYYY-MM-DD
---

## 总览

- 健康评分: XX/100
- Cards: {总数} | Clippings: {unread数} unread / {read数} read
- 断链: {数量} | 孤岛: {数量} | 噪声标签: {数量}

## 🔴 需要修复(高严重度)

{断链清单、缺标签 Card 清单、缺 frontmatter 文件清单、MOC 链接失效}

## 🟡 建议改善(中严重度)

{孤岛 Card、噪声标签、超 30 天 unread Clippings、MOC 遗漏}

## 🟢 信息

{Clipping 库存统计、空链统计}

## 📚 研究缺口建议

{按 domain 分组的空链热点,建议研究方向}

Step 5: 存入 Vault

obsidian create path="Cards/Vault Health Report YYYY-MM-DD.md" content="..." overwrite

Step 6: 输出摘要

向用户展示报告核心数据和需要关注的高优先级项目。

评分规则

扣分项每个扣分
断链-3
缺 frontmatter-2
缺四维标签-1
孤岛 Card-0.5
噪声标签-1
MOC 遗漏-0.5

满分 100,扣完为止,最低 0 分。

Cron 模式

被 cron 调用时(非用户手动触发),行为与手动相同,但:

  • 报告自动写入 Journal/Vault Health Report YYYY-MM-DD.md(而非 Cards/),避免每日例行报告在 Cards/ 堆积产生噪声
  • 不输出到对话(无用户在场)
  • 不做任何"顺手修复":Step 3 的 lint 写入边界(只能写健康报告、不能补标签 / 不能改 / 不能建其他 Card)在 cron 模式下完全适用,和手动模式无差别

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.