Skip to content

Commit afe4815

Browse files
committed
fix: clean up and update examples
Removed: - mcp.claude.md (just "hello" with MCP config) - full-auto.codex.md (just "hello" with codex flags) - local-llm.codex.md (just "hello" with local provider) - yolo.gemini.md (just "hello" with yolo flag) - env-flags.claude.md (redundant with env-config) Updated: - template-args.claude.md: fix broken $varname → _varname syntax - commit.claude.md: update usage comment, add _stdin - review.claude.md: update usage comment, add print flag - hello.claude.md: simplify and standardize - hello.copilot.md: add usage comment - positional-map.copilot.md: clarify $1 flag mapping Final examples (10): - hello.claude.md, hello.copilot.md (basic) - commit.claude.md, review.claude.md (practical) - env-config.claude.md (environment vars) - template-args.claude.md (template vars with defaults) - positional-map.copilot.md ($1 flag mapping) - positional-vars.claude.md, args-list.claude.md, optional-flags.claude.md (new features)
1 parent f4c6ce3 commit afe4815

11 files changed

+29
-55
lines changed

examples/commit.claude.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
# A practical example: Generate commit messages
3-
# Usage: git diff --staged | ma commit.claude.md
2+
# Generate commit messages from staged changes
3+
# Usage: git diff --staged | md commit.claude.md
44
model: sonnet
5-
p: true
5+
print: true
66
---
77

88
Generate a concise, conventional commit message for the following diff.
@@ -11,3 +11,5 @@ Use the format: type(scope): description
1111
Types: feat, fix, docs, style, refactor, test, chore
1212

1313
Keep it under 72 characters.
14+
15+
{{ _stdin }}

examples/env-flags.claude.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

examples/full-auto.codex.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

examples/hello.claude.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
---
2-
# Command inferred from filename: hello.claude.md → claude
2+
# Basic example - command inferred from filename
3+
# Usage: md hello.claude.md
34
model: sonnet
5+
print: true
46
---
57

6-
Say "Hello from Claude!" and nothing else.
8+
Say "Hello from mdflow!" and nothing else.

examples/hello.copilot.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1+
# Minimal example - no frontmatter needed for copilot
2+
# Usage: md hello.copilot.md
3+
14
Say "Hello from Copilot!" and nothing else.

examples/local-llm.codex.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/mcp.claude.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

examples/positional-map.copilot.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
# Explicit $1 mapping - body passed as --prompt flag
3-
# (Note: copilot gets this automatically from global config)
2+
# Map body to a specific CLI flag using $1
3+
# This passes the body as --prompt <body> instead of as a positional arg
4+
# Usage: md positional-map.copilot.md
45
$1: prompt
56
model: gpt-4.1
67
silent: true

examples/review.claude.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
---
2-
# A practical example: Code review with file imports
3-
# Usage: ma review.claude.md
2+
# Code review with glob imports
3+
# Usage: md review.claude.md
44
model: opus
5+
print: true
56
---
67

78
Review the following code for:

examples/template-args.claude.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
---
2-
# Named template variables with defaults - CLI flags override
3-
# Usage: ma template-args.claude.md
4-
# Or override: ma template-args.claude.md --feature_name "CustomFeature"
5-
$feature_name: Authentication
6-
$target_dir: src/features
2+
# Template variables with defaults - CLI flags override
3+
# Usage: md template-args.claude.md
4+
# Override: md template-args.claude.md --_feature_name "Payments" --_target_dir "src/billing"
5+
_feature_name: Authentication
6+
_target_dir: src/features
77
model: sonnet
88
print: true
99
---
1010

11-
Write a haiku about {{ feature_name }} in {{ target_dir }}.
11+
Create a new feature called "{{ _feature_name }}" in {{ _target_dir }}.
12+
13+
Include:
14+
- A main module file
15+
- Unit tests
16+
- README documentation

0 commit comments

Comments
 (0)