
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
markdown-agent
Advanced tools
```bash review.claude.md # Run with Claude commit.gemini.md "fix auth bug" # Run with Gemini git diff | explain.claude.md # Pipe through any command ```
review.claude.md # Run with Claude
commit.gemini.md "fix auth bug" # Run with Gemini
git diff | explain.claude.md # Pipe through any command
Your markdown files are now executable AI agents.
Markdown files become first-class CLI commands. Write a prompt in markdown, run it like a script. The command is inferred from the filename.
# review.claude.md
---
model: opus
---
Review this code for bugs and suggest improvements.
@./src/**/*.ts
review.claude.md # Runs: claude --model opus <prompt>
review.claude.md --verbose # Pass extra flags
Name your file task.COMMAND.md and the command is inferred:
task.claude.md # Runs claude
task.gemini.md # Runs gemini
task.codex.md # Runs codex
task.copilot.md # Runs copilot (print mode by default)
Every YAML key becomes a CLI flag passed to the command:
---
model: opus # → --model opus
dangerously-skip-permissions: true # → --dangerously-skip-permissions
mcp-config: ./mcp.json # → --mcp-config ./mcp.json
add-dir: # → --add-dir ./src --add-dir ./tests
- ./src
- ./tests
---
The markdown body is passed as the final argument to the command.
markdown-agent embraces the Unix philosophy:
# Pipe input
git diff | ma review.claude.md
# Chain agents
ma plan.claude.md | ma implement.codex.md
npm install -g markdown-agent
# or
bun install && bun link
# Run with filename-inferred command
ma task.claude.md
ma task.gemini.md
# Override command via --command flag
ma task.md --command claude
ma task.md -c gemini
# Pass additional flags to the command
ma task.claude.md --verbose --debug
Note: Both
maandmarkdown-agentcommands are available.
Commands are resolved in this priority order:
--command claude or -c claudetask.claude.md → claudeIf no command can be resolved, you'll get an error with instructions.
Some CLI flags are "hijacked" by markdown-agent—they're consumed and never passed to the underlying command. This allows generic markdown files without command names to be executed.
--command / -cOverride the command for any markdown file:
# Run a generic .md file with any command
ma task.md --command claude
ma task.md -c gemini
# Override the filename-inferred command
ma task.claude.md --command gemini # Runs gemini, not claude
$varname FieldsFrontmatter fields starting with $ (except $1, $2...) hijack their corresponding CLI flags:
---
$feature_name: Authentication # Default value
$target_dir: src/features # Default value
---
Build {{ feature_name }} in {{ target_dir }}.
# Use defaults
ma create.claude.md
# Override with CLI flags (hijacked, not passed to command)
ma create.claude.md --feature_name "Payments" --target_dir "src/billing"
The --feature_name and --target_dir flags are consumed by markdown-agent for template substitution—they won't be passed to the command.
| Field | Type | Description |
|---|---|---|
args | string[] | Named positional arguments for template variables |
env | object | Set process environment variables |
env | string[] | Pass as --env flags to command |
$1, $2... | string | Map positional args to flags (e.g., $1: prompt) |
_interactive / _i | boolean | Enable interactive mode (overrides print-mode defaults) |
_subcommand | string/string[] | Prepend subcommand(s) to CLI args |
Every other frontmatter key is passed directly to the command:
---
model: opus # → --model opus
dangerously-skip-permissions: true # → --dangerously-skip-permissions
mcp-config: ./mcp.json # → --mcp-config ./mcp.json
p: true # → -p (single char = short flag)
---
Value conversion:
key: "value" → --key valuekey: true → --keykey: false → (omitted)key: [a, b] → --key a --key bAll commands run in print mode by default (non-interactive, exit after completion). Use the .i. filename marker, _interactive frontmatter, or CLI flags to enable interactive mode.
task.claude.md # Runs: claude --print "..."
task.copilot.md # Runs: copilot --silent --prompt "..."
task.codex.md # Runs: codex exec "..."
task.gemini.md # Runs: gemini "..." (one-shot)
Add .i. before the command name in the filename:
task.i.claude.md # Runs: claude "..." (interactive session)
task.i.copilot.md # Runs: copilot --silent --interactive "..."
task.i.codex.md # Runs: codex "..." (interactive session)
task.i.gemini.md # Runs: gemini --prompt-interactive "..."
Or use _interactive (or _i) in frontmatter:
---
_interactive: true # or _interactive: (empty), or _i:
model: opus
---
Review this code with me interactively.
Or use CLI flags:
ma task.claude.md --_interactive # Enable interactive mode
ma task.claude.md -_i # Short form
Set default frontmatter per command in ~/.markdown-agent/config.yaml:
commands:
claude:
model: sonnet # Default model for claude
copilot:
silent: true # Always use --silent for copilot
Built-in defaults: All commands default to print mode with appropriate flags per CLI tool.
# db.claude.md
---
model: opus
mcp-config: ./postgres-mcp.json
dangerously-skip-permissions: true
---
Analyze the database schema and suggest optimizations.
# refactor.gemini.md
---
model: gemini-3-pro-preview
yolo: true
---
Refactor the authentication module to use async/await.
# analyze.codex.md
---
model: o3
sandbox: workspace-write
full-auto: true
---
Analyze this codebase and suggest improvements.
# task.copilot.md
Explain this code.
This runs: copilot --silent --prompt "Explain this code." (print mode)
For interactive mode, use .i. in the filename:
# task.i.copilot.md
Explain this code.
This runs: copilot --silent --interactive "Explain this code."
# create-feature.claude.md
---
args: [feature_name, target_dir]
model: sonnet
---
Create a new feature called "{{ feature_name }}" in {{ target_dir }}.
ma create-feature.claude.md "Auth" "src/features"
# api-test.claude.md
---
env:
API_URL: https://api.example.com
DEBUG: "true"
---
Test the API at !`echo $API_URL`
Inline content from other files or command output directly in your prompts.
Use @ followed by a path to inline file contents:
---
model: claude
---
Follow these coding standards:
@~/.config/coding-standards.md
Now review this code:
@./src/api.ts
@~/path - Expands ~ to home directory@./path - Relative to current markdown file@/path - Absolute pathImports are recursive—imported files can have their own @ imports.
Use glob patterns to include multiple files at once:
Review all TypeScript files in src:
@./src/**/*.ts
Glob imports:
.gitignore automaticallynode_modules, .git, etc.)MA_FORCE_CONTEXT=1 to override the token limitFiles are formatted as XML with path attributes:
<api path="src/api.ts">
...file content...
</api>
<utils path="src/utils.ts">
...file content...
</utils>
Extract specific lines from a file:
@./src/api.ts:10-50
This imports only lines 10-50 from the file.
Extract specific TypeScript/JavaScript symbols (interfaces, types, functions, classes, etc.):
@./src/types.ts#UserInterface
@./src/api.ts#fetchUser
Supported symbols:
interface Name { ... }type Name = ...function Name(...) { ... }class Name { ... }const/let/var Name = ...enum Name { ... }Use !`command` to execute a shell command and inline its output:
Current branch: !`git branch --show-current`
Recent commits:
!`git log --oneline -5`
Based on the above, suggest what to work on next.
Fetch content from URLs (markdown and JSON only):
@https://raw.githubusercontent.com/user/repo/main/README.md
markdown-agent automatically loads .env files from the markdown file's directory.
Files are loaded in order (later files override earlier):
.env - Base environment.env.local - Local overrides (not committed).env.development / .env.production - Environment-specific.env.development.local / .env.production.local - Environment-specific localmy-agents/
├── .env # API_KEY=default
├── .env.local # API_KEY=my-secret (gitignored)
└── review.claude.md
Environment variables are available:
!`echo $API_KEY`Usage: ma <file.md> [any flags for the command]
ma <file.md> --command <cmd>
ma --setup
ma --logs
ma --help
Command resolution:
1. --command flag (e.g., ma task.md --command claude)
2. Filename pattern (e.g., task.claude.md → claude)
All frontmatter keys are passed as CLI flags to the command.
Global defaults can be set in ~/.markdown-agent/config.yaml
ma-specific flags (consumed, not passed to command):
--command, -c Specify command to run
--dry-run Preview without executing
--_interactive, -_i Enable interactive mode
Examples:
ma task.claude.md -p "print mode"
ma task.claude.md --model opus --verbose
ma commit.gemini.md
ma task.md --command claude
ma task.md -c gemini
ma task.claude.md -_i # Run in interactive mode
Without a file:
ma --setup Configure shell to run .md files directly
ma --logs Show log directory
ma --help Show this help
| Variable | Description |
|---|---|
MA_FORCE_CONTEXT | Set to 1 to disable the 100k token limit for glob imports |
NODE_ENV | Controls which .env.[NODE_ENV] file is loaded (default: development) |
Make .md files directly executable:
ma --setup # One-time setup
Then run agents directly:
task.claude.md # Just type the filename
task.claude.md --verbose # With passthrough args
Add to ~/.zshrc:
alias -s md='ma'
export PATH="$HOME/agents:$PATH" # Your agent library
Create a directory of agents and add it to PATH:
~/agents/
├── review.claude.md # Code review
├── commit.gemini.md # Commit messages
├── explain.claude.md # Code explainer
├── test.codex.md # Test generator
└── debug.claude.md # Debugging helper
export PATH="$HOME/agents:$PATH"
Now use them from anywhere:
review.claude.md # Review current directory
commit.gemini.md "add auth" # Generate commit message
git diff | review.claude.md # Review staged changes
~/.markdown-agent/logs/<agent-name>/ for debugging--logs to show the log directory<stdin> tags and prepended to the promptFAQs
```bash review.claude.md # Run with Claude commit.gemini.md "fix auth bug" # Run with Gemini git diff | explain.claude.md # Pipe through any command ```
The npm package markdown-agent receives a total of 1,213 weekly downloads. As such, markdown-agent popularity was classified as popular.
We found that markdown-agent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.