• bitcoinBitcoin(BTC)$76,645.000.40%
  • ethereumEthereum(ETH)$2,086.46-0.75%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$653.75-0.08%
  • rippleXRP(XRP)$1.35-0.64%
  • usd-coinUSDC(USDC)$1.000.07%
  • solanaSolana(SOL)$84.86-1.27%
  • tronTRON(TRX)$0.3648290.84%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.030.00%
  • dogecoinDogecoin(DOGE)$0.101527-1.55%
  • HyperliquidHyperliquid(HYPE)$62.187.87%
  • USDSUSDS(USDS)$1.00-0.01%
  • zcashZcash(ZEC)$666.725.37%
  • leo-tokenLEO Token(LEO)$10.040.61%
  • cardanoCardano(ADA)$0.240892-2.54%
  • moneroMonero(XMR)$388.930.69%
  • bitcoin-cashBitcoin Cash(BCH)$345.01-2.83%
  • chainlinkChainlink(LINK)$9.38-1.55%
  • whitebitWhiteBIT Coin(WBT)$56.550.35%
  • CantonCanton(CC)$0.1654134.65%
  • stellarStellar(XLM)$0.146639-0.70%
  • USD1USD1(USD1)$1.00-0.04%
  • the-open-networkToncoin(TON)$1.76-2.50%
  • Ethena USDeEthena USDe(USDE)$1.00-0.03%
  • daiDai(DAI)$1.000.00%
  • suiSui(SUI)$1.02-4.33%
  • litecoinLitecoin(LTC)$52.51-1.52%
  • avalanche-2Avalanche(AVAX)$9.17-2.38%
  • hedera-hashgraphHedera(HBAR)$0.087906-2.87%
  • MemeCoreMemeCore(M)$2.860.20%
  • RainRain(RAIN)$0.0075560.18%
  • paypal-usdPayPal USD(PYUSD)$1.000.07%
  • shiba-inuShiba Inu(SHIB)$0.000006-1.77%
  • nearNEAR Protocol(NEAR)$2.412.71%
  • crypto-com-chainCronos(CRO)$0.068693-1.24%
  • Circle USYCCircle USYC(USYC)$1.130.00%
  • Global DollarGlobal Dollar(USDG)$1.000.02%
  • tether-goldTether Gold(XAUT)$4,537.000.69%
  • BittensorBittensor(TAO)$273.26-1.69%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • uniswapUniswap(UNI)$3.36-2.53%
  • mantleMantle(MNT)$0.65-1.81%
  • pax-goldPAX Gold(PAXG)$4,548.450.77%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.13-0.92%
  • OndoOndo(ONDO)$0.4312553.63%
  • polkadotPolkadot(DOT)$1.24-5.23%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.060823-1.89%
  • HTX DAOHTX DAO(HTX)$0.0000020.64%
  • AsterAster(ASTER)$0.703.09%
  • Falcon USDFalcon USD(USDF)$1.00-0.07%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Build a SuperClaude Framework Workflow with Commands, Agents, Modes, and Session Memory

May 23, 2026
in AI & Technology
Reading Time: 2 mins read
A A
Build a SuperClaude Framework Workflow with Commands, Agents, Modes, and Session Memory
ShareShareShareShareShare

YOU MAY ALSO LIKE

Musk Loses Case Against Altman Over OpenAI’s Overhaul

SpaceX IPO Filing ‘Aspirational,’ Says Piper Sandler’s Webster

class SuperClaude:
   """
   Mimics what Claude Code does at session start:
     • reads Markdown behavior files for the active command/agent/modes,
     • concatenates them into one system prompt,
     • runs the conversation through the Anthropic API.
   """
   BASE_SYSTEM = textwrap.dedent("""
   You are operating inside the SuperClaude Framework — a structured
   development platform layered on top of Claude. Treat the 
   block as your behavioral contract for this turn. If a behavioral
   instruction conflicts with the user request, prefer the instruction.
   Begin every answer with a short '▶ Active context:' line that names the
   command / agent / modes currently in effect.
   """).strip()
   def __init__(self, model=MODEL):
       self.model, self.history = model, []
   def _load(self, kind, name):
       if not name: return ""
       p = ASSETS[kind].get(name.lower())
       return p.read_text(encoding="utf-8", errors="ignore") if p else \
              f"# {kind}:{name} (not found — using inline defaults)"
   def _system(self, command=None, agent=None, modes=None, extra=None):
       parts = [self.BASE_SYSTEM, ""]
       if command: parts += [f"## Command /sc:{command}", self._load("commands", command)]
       if agent:   parts += [f"## Agent {agent}",         self._load("agents",   agent)]
       for m in (modes or []):
           parts += [f"## Mode {m}", self._load("modes", m)]
       if extra:   parts += ["## Extra directives", extra]
       parts.append("")
       return "\n\n".join(parts)
   def run(self, prompt, *, command=None, agent=None, modes=None, extra=None,
           max_tokens=1800, stream=True, remember=True):
       sys_prompt = self._system(command, agent, modes, extra)
       msgs = self.history + [{"role": "user", "content": prompt}]
       console.rule(
           f"[bold cyan]► /sc:{command or '—'}  agent={agent or '—'}  modes={modes or []}"
       )
       console.print(Panel(prompt, title="USER", border_style="blue"))
       console.print("[bold green]ASSISTANT ↓[/bold green]")
       text = ""
       try:
           if stream:
               with client.messages.stream(
                   model=self.model, max_tokens=max_tokens,
                   system=sys_prompt, messages=msgs,
               ) as s:
                   for chunk in s.text_stream:
                       sys.stdout.write(chunk); sys.stdout.flush()
                       text += chunk
                   print()
           else:
               r = client.messages.create(
                   model=self.model, max_tokens=max_tokens,
                   system=sys_prompt, messages=msgs,
               )
               text = "".join(b.text for b in r.content if b.type == "text")
               console.print(text)
       except Exception as e:
           console.print(f"[red]API error: {e}[/red]")
           return ""
       if remember:
           self.history += [{"role": "user", "content": prompt},
                            {"role": "assistant", "content": text}]
       return text
   def save(self, path="/content/sc_session.json", note=""):
       Path(path).write_text(json.dumps(
           {"meta": {"note": note, "saved_at": time.time(), "model": self.model},
            "history": self.history}, indent=2))
       console.print(f"💾 Session → {path}", style="bold yellow")
   def load(self, path="/content/sc_session.json"):
       d = json.loads(Path(path).read_text())
       self.history = d["history"]
       console.print(f"📂 Loaded {len(self.history)//2} prior turns", style="bold yellow")
sc = SuperClaude()

Credit: Source link

ShareTweetSendSharePin

Related Posts

Musk Loses Case Against Altman Over OpenAI’s Overhaul
AI & Technology

Musk Loses Case Against Altman Over OpenAI’s Overhaul

May 24, 2026
SpaceX IPO Filing ‘Aspirational,’ Says Piper Sandler’s Webster
AI & Technology

SpaceX IPO Filing ‘Aspirational,’ Says Piper Sandler’s Webster

May 24, 2026
Nvidia’s Investing Strategy Is ‘Smart’, Says T. Rowe Price’s Wang
AI & Technology

Nvidia’s Investing Strategy Is ‘Smart’, Says T. Rowe Price’s Wang

May 24, 2026
The Startups Building on Nvidia Compute
AI & Technology

The Startups Building on Nvidia Compute

May 24, 2026
Next Post
USMNT World Cup full roster: Alejandro Zendejas is in, Tanner Tessmann misses out – The Guardian

USMNT World Cup full roster: Alejandro Zendejas is in, Tanner Tessmann misses out - The Guardian

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Cash Is King, A Quick Look At 3 Cash ETFs For 2026

Cash Is King, A Quick Look At 3 Cash ETFs For 2026

May 24, 2026
Kalshi And Rhode Island Sue Each Other In Latest Challenge To Prediction Markets

Kalshi And Rhode Island Sue Each Other In Latest Challenge To Prediction Markets

May 24, 2026
Survivor in Lebanon pulled from rubble describes devastation, loss of family after Israeli airstrike

Survivor in Lebanon pulled from rubble describes devastation, loss of family after Israeli airstrike

May 18, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!