Mdscript — AI skill for Claude Code
A template language for composable LLM prompt engineering.
How to install Mdscript
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open dean0x/mdscript and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Mdscript does
A template language for composable LLM prompt engineering. Write prompts with variables, loops, conditionals, functions, and imports, then compile to clean Markdown.
Alternatives in AI
- ARIS Agent Guide — For AI agents reading this repo 6.2k ★
- Agent Rules Books — AGENTS.md rules / skills for AI coding agents: Codex, Cursor & Claude Code 2.6k ★
- Auto Re Agent — Open-source AI reverse-engineering agent using Ghidra and LLMs to reconstruct and validate C/C++ functions fro 1.4k ★
README
MDS - Markdown Script
[](https://github.com/dean0x/mdscript/actions/workflows/ci.yml) [](https://crates.io/crates/mds-cli) [](https://www.npmjs.com/package/@mdscript/mds) [](LICENSE)
LLM prompts grow into copy-pasted walls of text that drift across agents, models, and environments. MDS gives you variables, functions, imports, and conditionals so you can write prompts once and compose them everywhere, compiled to clean Markdown.
Built for AI engineers who manage prompt libraries across agents, models, and environments.
Quick Start
**Install the CLI** (Rust):
cargo install mds-cli
**Or install via npm** (Node or browser):
npm install @mdscript/mds
**Create and compile a starter template**:
mds init # creates hello.mds
mds build hello.mds # compiles to hello.md
mds build hello.mds -o - # stdout
**For multi-file prompt libraries**, templates compose via `@import` — for example:
---
model: claude-sonnet
tools: [search, calculator]
---
@import "./safety.mds" as guard
@import "./personas.mds" as persona
{{persona.code_reviewer("TypeScript")}}
{{guard.safety_rules()}}
## Available Tools
@for tool in tools:
- **{{tool}}**
@end
@if model == "claude-sonnet":
Use extended thinking for complex tasks.
@end
See [`examples/prompt-library/`](examples/prompt-library/) for a complete reusable prompt library using `@export`/`@import` (personas, formatting, guardrails). If imports from cross-directory libraries are rejected with a containment error, see [Project root](#project-root).
Unlike general-purpose template engines, MDS is Markdown-native: no delimiters to escape, no runtime to configure. The compiler catches undefined varia
Related Skills
AI Jup
A JupyterLab extension that adds AI-powered prompt cells with special syntax for referencing kernel variables
Cersei
The Rust SDK for building coding agents. Tool execution, LLM streaming, graph memory, sub-agent orchestration,
Wikify Repo
Compile any codebase into a grounded, lint-clean markdown wiki your AI agent can actually trust — SCIP symbol
System Ir
System Context Compiler — compile code, config, infra, runtime, and intent into an evidence-backed machine mod
Claude Code Global Config
Production-ready global CLAUDE.md template for Claude Code CLI - Anthropic's AI coding assistant. Clean Archit
No Vibe Btw
One-shot escape hatch — let AI write code to project files for a single task, then restore no-vibe mode
Related Agents
Unit Test
Write Vitest unit tests targeting 80% branch coverage for pure functions, server utilities, and composable log
Code Renamer
Use this agent when you need to rename classes, methods, functions, or variables in code files to align with s
Dead Code Detector
Find unused functions, methods, variables, and unreachable code blocks using reference checking