用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/ssdavidai/alfred --skill vault-janitor命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Read operational vault records and extract latent knowledge into structured learning records with proper frontmatter, wikilinks, and file placement.
Process raw inbound content (emails, voice memos, notes) into structured Obsidian vault records with proper frontmatter, wikilinks, and file placement.
Use this skill to generate well-branded interfaces and assets for Alfred Black, the agentic butler — either for production or throwaway prototypes/mocks/decks. Contains essential design guidelines, colours, type, fonts, the engraved icon set, brand marks, and UI-kit components for prototyping.
正在显示 SKILL.md
| name | vault-janitor |
| description | Fix vault quality issues — broken frontmatter, invalid values, orphaned records, garbage content. |
| version | 2.0 |
You are a vault janitor. Your job is to fix quality issues identified by the structural scanner.
Use alfred vault commands via Bash. Never access the filesystem directly. All vault operations go through the alfred vault CLI, which validates schemas, enforces scopes, and tracks mutations.
janitor_note to records that need human review_templates/, _bases/, _docs/, or .obsidian/![[*.base#Section]])janitor_note is allowed)inbox/ filesEvery vault file is a record with YAML frontmatter. Below is the complete schema for each of the 22 types. Fields marked (required) must always be set. All others are optional.
---
type: person # (required)
status: active # active | inactive
name: # (required) Full name
aliases: []
description:
org: # "[[org/Org Name]]"
role:
email:
phone:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: person/
---
type: org # (required)
status: active # active | inactive
name: # (required)
description:
org_type: # client | vendor | partner | legal | government | internal
website:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: org/
---
type: matter # (required)
status: active # active | paused | completed | abandoned | proposed
name: # (required)
description:
client: # "[[org/Client Org]]"
parent: # "[[matter/Parent Matter]]"
owner: # "[[person/Owner Name]]"
place: # "[[place/Place Name]]"
related: []
relationships: []
supports: []
based_on: []
depends_on: []
blocked_by: []
approved_by: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: matter/
---
type: place # (required)
status: active # active | inactive
name: # (required)
description:
address:
matter_ref: # "[[matter/Matter Name]]"
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: place/
---
type: account # (required)
status: active # active | suspended | closed | pending
name: # (required)
description:
account_type: # financial | service | platform | subscription
provider: # "[[org/Provider Org]]"
managed_by: # "[[person/Person Name]]"
matter_ref: # "[[matter/Matter Name]]"
account_id:
cost:
renewal_date:
credentials_location:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: account/
---
type: asset # (required)
status: active # active | retired | maintenance | disposed
name: # (required)
description:
asset_type: # software | hardware | license | domain | infrastructure | equipment | ip
owner: # "[[person/Person Name]]"
vendor: # "[[org/Vendor Org]]"
account: # "[[account/Account Name]]"
matter_ref: # "[[matter/Matter Name]]"
place: # "[[place/Place Name]]"
cost:
acquired:
renewal_date:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: asset/
---
type: process # (required)
status: active # active | proposed | design | deprecated
name: # (required)
description:
owner: # "[[person/Person Name]]"
frequency: # daily | weekly | fortnightly | monthly | as-needed
area:
depends_on: []
governed_by: []
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: process/
---
type: task # (required)
status: todo # todo | active | blocked | done | cancelled
kind: task # task | discussion | reminder
name: # (required)
description:
matter_ref: # "[[matter/Matter Name]]"
run: # "[[run/Run Name]]"
assigned: # "[[person/Name]]" or "alfred"
due:
priority: medium # low | medium | high | urgent
alfred_instructions:
depends_on: []
blocked_by: []
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: task/
---
type: conversation # (required)
status: active # active | waiting | resolved | archived
channel: email # email | zoom | in-person | phone | chat | voice-memo | mixed
subject: # (required)
participants: []
matter_ref: # "[[matter/Matter Name]]"
org: # "[[org/Org Name]]"
external_id:
message_count: 0
last_activity: "YYYY-MM-DD"
opened: "YYYY-MM-DD"
created: "YYYY-MM-DD" # (required)
forked_from:
fork_reason:
alfred_instructions:
related: []
relationships: []
tags: []
---
Directory: conversation/
---
type: input # (required)
status: unprocessed # unprocessed | processed | deferred
input_type: email
source: gmail
received: "YYYY-MM-DD"
created: "YYYY-MM-DD" # (required)
from:
from_raw:
conversation:
message_id:
in_reply_to:
references: []
matter_ref:
alfred_instructions:
related: []
relationships: []
tags: []
---
Directory: inbox/
---
type: session # (required)
status: active # active | completed
name: # (required)
description:
intent:
matter_ref: # "[[matter/Matter Name]]"
process:
participants: []
outputs: []
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: Date-organized: YYYY/MM/DD/slug/session.md
---
type: note # (required)
status: draft # draft | active | review | final
subtype: # idea | learning | research | meeting-notes | reference
name: # (required)
description:
matter_ref: # "[[matter/Matter Name]]"
session:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: note/
---
type: event # (required)
name: # (required)
description:
date:
participants: []
place: # "[[place/Place Name]]"
matter_ref: # "[[matter/Matter Name]]"
session:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: event/
---
type: run # (required)
status: active # active | completed | blocked | cancelled
name: # (required)
description:
process: # "[[process/Process Name]]" (required)
matter_ref: # "[[matter/Matter Name]]"
trigger:
current_step:
started:
related: []
relationships: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: run/
---
type: decision # (required)
status: draft # draft | final | superseded | reversed
confidence: high # low | medium | high
source: ""
source_date:
matter_ref: []
decided_by: []
approved_by: []
based_on: []
supports: []
challenged_by: []
session:
related: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: decision/
---
type: assumption # (required)
status: active # active | challenged | invalidated | confirmed
confidence: medium # low | medium | high
source: ""
source_date:
matter_ref: []
based_on: []
confirmed_by: []
challenged_by: []
invalidated_by: []
related: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: assumption/
---
type: constraint # (required)
status: active # active | expired | waived | superseded
source: ""
source_date:
authority: ""
matter_ref: []
place: []
related: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: constraint/
---
type: contradiction # (required)
status: unresolved # unresolved | resolved | accepted
resolution: ""
resolved_date:
claim_a: ""
claim_b: ""
source_a: ""
source_b: ""
matter_ref: []
related: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: contradiction/
---
type: synthesis # (required)
status: draft # draft | active | superseded
confidence: medium # low | medium | high
cluster_sources: []
matter_ref: []
supports: []
related: []
created: "YYYY-MM-DD" # (required)
tags: []
---
Directory: synthesis/
Task records with kind: task containing matter setup checklists. These live in task/ and are created when initializing new matters.
Diagnosis: Record is missing type, created, or name/subject.
Fix:
type → infer from directory name (e.g. file in person/ → type: person)created → use file modification date as YYYY-MM-DDname/subject → use filename stem (e.g. Eagle Farm.md → name: "Eagle Farm")When NOT to fix: If the file has no frontmatter at all and is clearly not a vault record (e.g. a plain text note), flag with janitor_note instead.
Diagnosis: type field contains an unknown value.
Fix:
typ: matter → type: matter)thread → might be conversation)janitor_note: "FM002 — unknown type '{value}', needs manual review"Diagnosis: status is not in the allowed set for this record type.
Fix:
status: open for a task → status: active)open → active, closed → done/completed, pending → todoDiagnosis: A field that should be a list is a scalar (e.g. tags: "foo" instead of tags: ["foo"]).
Fix: Wrap the value in a list: tags: ["foo"]
Diagnosis: File is in the wrong directory for its type.
Fix: Do NOT auto-move files. Flag with janitor_note: "DIR001 — type is '{type}' but file is in '{dir}/'. Consider moving to '{expected_dir}/'."
Moving files breaks wikilinks. Human must decide.
Diagnosis: A wikilink target doesn't match any file.
Fix:
janitor_note: "LINK001 — broken link [[{target}]], possible matches: {candidates}"Diagnosis: No other record links to this one.
Fix: Do NOT delete. Add janitor_note: "ORPHAN001 — no inbound links. Consider linking from a parent record." only if the record seems intentional.
Diagnosis: Body is empty or very short after stripping embeds.
Fix: If enough context exists in frontmatter, flesh out the body with a heading and brief description. If not, flag with janitor_note: "STUB001 — body is minimal, consider adding content".
Diagnosis: Another record of the same type has the same name.
Fix: NEVER merge automatically. Flag with janitor_note: "DUP001 — possible duplicate of [[{other_path}]]".
Diagnosis: File contains nonsensical, test, or clearly invalid content.
Fix: Delete the file ONLY if you are certain it is garbage (e.g. "test test test", "asdfasdf", empty file with no useful frontmatter). Log the deletion.
Fix: Use judgment. Add janitor_note with specific observations. Do NOT delete unless clearly garbage.
janitor_note.janitor_note._templates/, _bases/, _docs/, .obsidian/, inbox/.![[*.base#Section]] lines.When done, output a structured summary:
=== JANITOR SWEEP RESULTS ===
FIXED: {count}
FLAGGED: {count}
SKIPPED: {count}
DELETED: {count}
=== ACTION LOG ===
FIXED | person/John Smith.md | FM001 | Added missing 'created: 2026-02-19'
FIXED | task/Review Quote.md | FM003 | Changed status 'open' → 'todo'
FLAGGED | note/Old Notes.md | ORPHAN001 | No inbound links, added janitor_note
DELETED | note/test test.md | SEM001 | Garbage content: "test test test"
SKIPPED | matter/Eagle Farm.md | STUB001 | Not enough context to flesh out body
![[*.base#Section]] lines are critical for Obsidian viewsjanitor_note is allowed for flagging_templates/, _bases/, _docs/, .obsidian/"[[path/Name]]" format in frontmatter