Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metamagic

繁體中文

license MIT Claude Code platform shell Bash

A Claude Code command for quickly optimizing prompts with systematic analysis and clipboard integration.

In D&D, Metamagic allows sorcerers to alter spells. Here, it alters your prompts.

Features

  • Systematic Analysis - Evaluates prompts across 7 dimensions: clarity, completeness, structure, output format, examples, chain-of-thought, and role definition
  • Clipboard Integration - Reads from and writes to clipboard automatically (macOS, Linux, Windows/WSL)
  • Iterative Refinement - Continue the conversation to further adjust results

Installation

git clone https://github.com/Clementtang/metamagic.git ~/metamagic
~/metamagic/install.sh

Use install.sh --link to symlink instead of copy, so edits to the repo take effect immediately.

Usage

# Optimize clipboard content
/op

# Optimize specific text
/op "your prompt here"

# Optimize from file
/op --file path/to/prompt.md

Output Format

## Prompt Analysis

### Original Prompt
[shows original content]

### Issues Found
1. [issue type] [description]
2. [suggestion type] [recommendation]

### Optimized Version

[improved prompt]

The optimized prompt is automatically copied to your clipboard.

Iterative Refinement

After receiving results, you can continue refining:

  • "Make it shorter"
  • "Add more examples"
  • "Rewrite in English"
  • "Optimize for Claude"

Tip: Pair With a Clipboard Manager

Every result is also printed in the conversation, so an overwritten clipboard never loses content — but each /op (and each refinement) replaces what's on your clipboard. If you iterate often and want to keep several versions around, pair Metamagic with a clipboard manager:

  • macOSMaccy (free, open source) or Paste
  • Windows — built-in clipboard history (Win + V)
  • LinuxCopyQ

Requirements

  • Claude Code
  • A clipboard tool for your OS: macOS pbcopy/pbpaste (built in), Linux wl-copy/wl-paste or xclip, Windows/WSL clip/Get-Clipboard

License

MIT

About

Metamagic - Claude Code prompt optimizer with clipboard integration

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages