Skip to main content

SuperFlag

⚠️ MIGRATION NOTICE: If you previously installed context-engine-mcp, please uninstall it and install superflag instead:

pip uninstall context-engine-mcp
pip install superflag

Claude Code Gemini CLI Continue

Note: This project was inspired by the pioneering work in SuperClaude Framework and SuperGemini Framework. Special thanks to SuperClaude-Org team members @NomenAK and @mithun50 whose work made this possible.

SuperFlag provides 18 contextual flags that guide assistant behavior (e.g., --strict, --auto). It exposes an MCP stdio server and small setup helpers for common clients.

Quick Start

# Install
pip install superflag

# Interactive installation (choose platforms)
superflag install

# Direct installation
superflag install --target claude-code  # Claude Code only
superflag install --target gemini-cli   # Gemini CLI only
superflag install --target cn           # Continue only

Then in your client/assistant, use prompts with flags:

  • "Fix this bug --auto" (auto-select flags)
  • "--save" (handoff documentation)
  • "Analyze --strict" (precise, zero-tolerance mode)

18 Flags

Flag Purpose
--analyze Multi-angle systematic analysis
--auto AI selects optimal flag combination
--collab Co-develop solutions through trust-based iteration
--concise Minimal communication
--discover Discover existing solutions before building new
--explain Progressive disclosure
--git Version control best practices
--lean Essential focus only
--load Load handoff documentation
--parallel Multi-agent processing
--performance Speed and efficiency optimization
--readonly Analysis only mode
--refactor Code quality improvement
--reset Reset all flag states to new (clears session cache)
--save Handoff documentation
--seq Sequential thinking
--strict Zero-error enforcement
--todo Task management

Installation

Claude Code

# Install package
pip install superflag

# Install configuration files (automatic MCP registration)
superflag install

Continue Extension

# Install package
pip install superflag

# Install configuration files
superflag install --target cn

Edit ~/.continue/mcpServers/superflag.yaml:

# Standard Python (most common)
name: SuperFlag
command: python
args: ["-m", "superflag"]

# Or use absolute path to specific environment
# name: SuperFlag
# command: /path/to/venv/bin/python
# args: ["-m", "superflag"]

Restart VS Code, then type @ in Continue chat to access MCP tools.

Gemini CLI

# Install package
pip install superflag

# Install configuration files for Gemini CLI
superflag install --target gemini-cli

This command:

  • Appends @SUPERFLAG.md to ~/.gemini/GEMINI.md (adds once; no duplicate)
  • Writes latest instructions to ~/.gemini/SUPERFLAG.md

Register the MCP stdio command in Gemini CLI settings:

  • Command: python -m superflag
  • Args: []
  • Transport: stdio

MCP registration (example)

  • File: ~/.gemini/settings.json
  • Add or merge this into the mcpServers section:
{
  "mcpServers": {
    "superflag": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "superflag"],
      "env": {}
    }
  }
}

Gemini CLI settings

  • Location: ~/.gemini/settings.json
  • Structure:
{
  "mcpServers": {
    "<server-name>": {
      "type": "stdio",
      "command": "<executable or interpreter>",
      "args": ["<arg1>", "<arg2>", "..."],
      "env": { "ENV_KEY": "value" }
    }
  }
}

Common setups

  • pip (python -m):
{
  "mcpServers": {
    "superflag": {
      "type": "stdio",
      "command": "python",
      "args": ["-m", "superflag"],
      "env": {}
    }
  }
}
  • venv absolute path (Windows):
{
  "mcpServers": {
    "superflag": {
      "type": "stdio",
      "command": "C:\\path\\to\\venv\\Scripts\\superflag.exe",
      "args": [],
      "env": {}
    }
  }
}
  • venv with interpreter (module run):
{
  "mcpServers": {
    "superflag": {
      "type": "stdio",
      "command": "/path/to/venv/bin/python",
      "args": ["-m", "superflag"],
      "env": {}
    }
  }
}

Notes

  • type is stdio.
  • If the command is not on PATH, use an absolute path (escape backslashes on Windows).
  • After editing, restart Gemini CLI and verify tools (e.g., list_available_flags).

Usage

In Chat

# Auto mode - AI selects flags
"Refactor this code --auto"

# Direct flags
"--save"  # Creates handoff doc
"--analyze --strict"  # Multi-angle analysis with zero errors
"--reset --analyze"  # Reset session and reapply

# Combined flags
"Review this --analyze --strict --seq"

MCP Tools

  • get_directives(['--flag1', '--flag2']) - Activates flags

Development: use pip install -e . for editable installs.

Configuration updates: edit ~/.superflag/flags.yaml and restart the MCP server.

Optional MCP Servers

Additional MCP servers can complement certain flags:

For --seq flag:

# Sequential thinking server  
claude mcp add -s user -- sequential-thinking npx -y @modelcontextprotocol/server-sequential-thinking

These are optional; SuperFlag works without them.

Session

  • Duplicate flags produce a brief reminder instead of repeating full directives.
  • Use --reset when the task/context changes (resets all flag states to new).
  • The server tracks active flags per session.
  • Note: In Claude, flag states persist through /clear or /compact commands. Use --reset to reinitialize.

--auto

--auto instructs the assistant to analyze the task and pick appropriate flags (do not include --auto in get_directives calls).

Behavior

  • --auto only: the assistant selects a full set of flags automatically.
  • --auto --flag1 --flag2: the assistant applies --flag1, --flag2 and may add additional flags if helpful. User‑specified flags take priority when there is overlap or conflict.
  • --flag1 --flag2 (without --auto): only the specified flags are applied.

Files Created

~/.claude/
├── CLAUDE.md                     # References @SUPERFLAG.md
├── SUPERFLAG.md             # Flag instructions (auto-updated)
├── hooks/
│   └── superflag.py              # Hook for flag detection (Claude Code only)
└── settings.json                 # Updated with hook registration (Claude Code only)

~/.continue/
├── config.yaml         # Contains SuperFlag rules
└── mcpServers/
    ├── superflag.yaml
    ├── sequential-thinking.yaml
    └── context7.yaml

~/.superflag/
└── flags.yaml          # Flag definitions

~/.gemini/
├── GEMINI.md           # References @SUPERFLAG.md
└── SUPERFLAG.md   # Flag instructions (auto-updated)

Uninstallation

# Complete uninstall from all environments (Claude Code + Continue)
superflag uninstall

# Remove Python package
pip uninstall superflag

Note: During uninstallation, ~/.superflag/flags.yaml is backed up to ~/flags.yaml.backup_YYYYMMDD_HHMMSS before removal. During installation, existing flags.yaml is backed up and updated to the latest version.

Claude Code note: Uninstall removes the @SUPERFLAG.md reference from ~/.claude/CLAUDE.md, deletes ~/.claude/SUPERFLAG.md if present, removes the hook file from ~/.claude/hooks/superflag.py, and removes the hook registration from ~/.claude/settings.json.

Gemini CLI note: Uninstall removes the @SUPERFLAG.md reference from ~/.gemini/GEMINI.md and deletes ~/.gemini/SUPERFLAG.md if present.

Continue note: Uninstall removes the SuperFlag rules from ~/.continue/config.yaml (when present) and deletes ~/.continue/mcpServers/superflag.yaml if present.

License

MIT

Metadata

Release files for superflag 3.0.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for superflag 3.0.23
File Size Uploaded
superflag-3.0.23.tar.gz 29.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for superflag 3.0.23
File Interpreter ABI Platform
superflag-3.0.23-py3-none-any.whl Python 3 none any Details

Total release size: 62.0 kB

Release files / superflag-3.0.23.tar.gz

Download URL superflag-3.0.23.tar.gz
Size 29.3 kB
Tags Source
SHA-256 checksum
How to use checksums
cd6975196d80e862b17c3987db88fb3835f98661c977cec16aa1feb9c641f94e
BLAKE2b-256 checksum
How to use checksums
c32e1575994c106d4c0579628af5e20d03113decae718a20ab4d6d88636846e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2025.

Transparency log

Release files / superflag-3.0.23-py3-none-any.whl

Download URL superflag-3.0.23-py3-none-any.whl
Size 32.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c3ed4aa0a93b9c25592f94cc74286a32d4428084d96eb3d7307fe194b7ddee94
BLAKE2b-256 checksum
How to use checksums
73fb4c90e45543ca256292c33aeeb5aafbec996e8da3ec933c996ba7c267bcfd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

3.0.23 This release

2 release files

3.0.22

2 release files

3.0.21

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.2.6

2 release files

2.2.5

2 release files

2.2.4

2 release files

2.2.2

2 release files

2.2.0

2 release files

2.1.8

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page