tachikoma-frontmatter
Analyze Context Lake entities and fix frontmatter issues. Use when asked to run frontmatter cleanup, fix missing fields, validate frontmatter against schema, or standardize entity metadata.
When & Why to Use This Skill
The Tachikoma Frontmatter skill is a specialized utility designed to maintain data integrity and structural consistency within a Context Lake workspace. It automates the tedious process of auditing Markdown frontmatter by validating metadata against a central schema, identifying missing required fields, and correcting formatting inconsistencies to ensure the knowledge base remains machine-readable and highly organized.
Use Cases
- Schema Compliance Auditing: Automatically scan all workspace entities (tasks, notes, roles) to ensure they contain all required fields defined in the .claude/schema.yaml file.
- Metadata Standardization: Normalize inconsistent data entries, such as converting varied date formats to ISO-8601 or standardizing status labels (e.g., changing 'DONE' to 'done') across the entire workspace.
- Intelligent Content Enrichment: Analyze the body text of documents to identify missing metadata—such as extracting a due date mentioned in a task description—and proposing its addition to the frontmatter.
- Bulk Workspace Refactoring: Efficiently manage large-scale metadata updates when schema requirements change, using batch decision files to update hundreds of entities simultaneously with high confidence.
| name | tachikoma-frontmatter |
|---|---|
| description | Analyze Context Lake entities and fix frontmatter issues. Use when asked to run frontmatter cleanup, fix missing fields, validate frontmatter against schema, or standardize entity metadata. |
| allowed-tools | Read, Write, Glob, Grep |
Tachikoma Frontmatter Cleanup
You are running frontmatter cleanup on a Context Lake workspace. Your job is to analyze entities and propose frontmatter fixes by creating decision files.
Context Lake Structure
The workspace IS the Context Lake. Entity directories live at the workspace root:
.claude/schema.yaml- Entity type definitions (REQUIRED for this mode).claude/tachikoma-summary.yaml- Previous observations{entity_type}/- Entity directories (tasks/, notes/, roles/, etc.)decisions/- Where you write proposals
What to Look For
Missing required fields: Entities missing fields defined as required in schema
- Example: Task has no status → propose adding
status: open
- Example: Task has no status → propose adding
Invalid values: Fields with values that don't match schema constraints
- Example: Status is 'DONE' → should be 'done' (lowercase)
Missing optional fields: Content suggests fields that should be added
- Example: Task mentions 'due Friday' → propose adding due date
Inconsistent formatting: Dates, slugs, etc. that don't match patterns
- Example: Date is '1/15/24' → should be '2024-01-15'
Process
- Read
.claude/schema.yamlto understand required fields (STOP if missing) - Read
.claude/tachikoma-summary.yamlfor previous observations - For each entity type in schema, glob all files in that directory
- Read each entity and check frontmatter against schema
- Create decision files for issues found
- Update
.claude/tachikoma-summary.yamlwith findings
Decision Format
Write decisions to decisions/ directory:
---
title: "fix: add required status field to tasks"
status: pending
decision_type: frontmatter_update
subject_path: tasks/example-task.md
confidence: 0.9
created_at: {ISO timestamp}
---
## Current State
Current frontmatter in tasks/example-task.md:
---
title: Example Task
---
## Suggested Change
Updated frontmatter:
---
title: Example Task
status: open
---
## Reasoning
Task is missing required 'status' field per schema. Based on content mentioning 'working on', suggesting 'open'.
Batching
If many entities have the same issue:
- < 5 issues: Create individual decisions
- >= 5 issues: Create one decision listing all affected entities
Example batch decision:
---
title: "fix: add date frontmatter to journal entries"
status: pending
decision_type: frontmatter_update
confidence: 0.9
---
## Current State
7 journal files missing required 'date' frontmatter field.
## Suggested Change
Add date frontmatter to each file (extract from filename):
- journal/2025-11-10-day-zero.md → date: 2025-11-10
- journal/2025-11-11-ceuta.md → date: 2025-11-11
...
## Reasoning
Schema requires 'date' field for journal entries. All files follow YYYY-MM-DD naming, so date can be extracted from filename.
Guidelines
- Schema must exist before running frontmatter cleanup
- Check existing pending decisions to avoid duplicates
- Be specific about what needs to change
- Provide reasoning for suggested values
Output
When done, update .claude/tachikoma-summary.yaml:
last_scan: {ISO timestamp}
cleanup_mode: frontmatter
entity_counts:
tasks: 10
notes: 5
observations:
- All tasks have required fields
- 3 notes missing tags field
pending_decisions:
- frontmatter-fix-notes-tags.md