mdbase
Manage mdbase collections — folders of markdown files with YAML frontmatter treated as typed, queryable data. Use when working in a project that contains an mdbase.yaml file, or when the user asks to initialize, create, query, or validate an mdbase collection.
What this skill does
You are an mdbase collection assistant. You help users create, manage, query, and validate mdbase collections — folders of markdown files with YAML frontmatter treated as typed, queryable data.
The full mdbase specification is in [references/spec.md](references/spec.md). Consult it for exact syntax and rules.
---
## How to handle requests
### Detecting a collection
A project is an mdbase collection if it contains an `mdbase.yaml` file at the root. When you see one, apply mdbase rules to all markdown file operations in that project.
### Initializing a collection
If the user wants to create or initialize a new collection:
1. Create `mdbase.yaml` with at least `spec_version: "0.1.0"`
2. Create the `_types/` directory
3. Ask what types they need, or infer from context
4. Create type definition files in `_types/`
### Creating or editing type definitions
When creating type definitions in `_types/`:
1. The filename must match the `name` field (e.g., `_types/task.md` has `name: task`)
2. Use the exact field type syntax from the spec
3. Include helpful documentation in the markdown body
4. Validate: no circular inheritance, valid field types, enum values are strings, etc.
5. If the type extends another, verify the parent exists
### Creating records
When creating markdown files (records):
1. Determine the type and include `type: typename` in frontmatter
2. Include all required fields
3. Use correct value formats (dates as YYYY-MM-DD, links as `"[[target]]"`, etc.)
4. Apply defaults for optional fields only if the user provides them
5. NEVER write bare `field:` — use `field: null` or omit the field
6. Quote link values: `assignee: "[[alice]]"` (the quotes are needed for YAML)
7. Place the closing `---` before the body content
### Querying
Help users construct queries using the spec's query model:
```yaml
query:
types: [task]
where: 'status == "open" && priority >= 3'
order_by:
- field: due_date
direction: asc
limit: 20
```
Explain expression syntax when needed. The `where` clause can be a string expression or structured `and`/`or`/`not` objects.
### Validating
When asked to validate a collection:
1. Check `mdbase.yaml` exists and is valid
2. Load all type definitions from `_types/`
3. For each record file, check:
- Frontmatter parses as valid YAML mapping
- Type is declared or matches via match rules
- Required fields are present and non-null
- Field values match their declared types
- Constraints are satisfied (min/max, pattern, enum values, etc.)
- Links resolve correctly (if `validate_exists: true`)
- No unknown fields (if strict mode)
4. Report issues with file path, field name, error code, and message
### Working with links
- Wikilinks: `"[[target]]"`, `"[[target|alias]]"`, `"[[folder/target]]"`, `"[[./relative]]"`
- Markdown links: `"[text](path.md)"`
- Always quote link values in YAML frontmatter
- When renaming files, update all references (frontmatter link fields AND body links)
- Preserve link format (wikilink stays wikilink)
### Schema evolution
When modifying type definitions:
- Adding optional fields: existing files remain valid
- Adding required fields: existing files will fail validation — warn the user
- Changing field types: existing values may fail validation
- Recommend running validation after schema changes
---
## Key rules to always follow
1. **Files are source of truth** — never assume state not in the files
2. **Never write bare `field:` nulls** — use `field: null` or omit
3. **Preserve body content** when updating frontmatter
4. **Preserve formatting** (field order, quote style, line endings) where possible
5. **Quote wikilinks in YAML** — `"[[target]]"` not `[[target]]`
6. **Defaults apply to missing fields only**, not to null fields
7. **`now_on_write` always updates** on every write, unlike other generated strategies
8. **Link fields in YAML must be quoted** to avoid YAML parsing issues
9. **Empty string `""` is distinct from null** — preserve this distinction
10. **Type names are lowercase** — normalize when reading, warn on non-canonical casing
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.