• bitcoinBitcoin(BTC)$63,966.00-2.00%
  • ethereumEthereum(ETH)$1,855.95-1.60%
  • tetherTether(USDT)$1.000.00%
  • binancecoinBNB(BNB)$565.13-0.50%
  • usd-coinUSDC(USDC)$1.000.00%
  • rippleXRP(XRP)$1.09-2.10%
  • solanaSolana(SOL)$73.88-2.40%
  • tronTRON(TRX)$0.329607-0.40%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.02-2.20%
  • whitebitWhiteBIT Coin(WBT)$55.77-1.90%
  • HyperliquidHyperliquid(HYPE)$57.58-1.80%
  • dogecoinDogecoin(DOGE)$0.069444-0.70%
  • USDSUSDS(USDS)$1.000.00%
  • RainRain(RAIN)$0.0140720.90%
  • leo-tokenLEO Token(LEO)$9.711.00%
  • zcashZcash(ZEC)$477.11-6.10%
  • moneroMonero(XMR)$365.432.30%
  • chainlinkChainlink(LINK)$8.30-2.80%
  • cardanoCardano(ADA)$0.162352-3.30%
  • stellarStellar(XLM)$0.176871-3.60%
  • daiDai(DAI)$1.000.00%
  • CantonCanton(CC)$0.118462-2.50%
  • bitcoin-cashBitcoin Cash(BCH)$210.31-0.90%
  • USD1USD1(USD1)$1.000.00%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.470.40%
  • Ethena USDeEthena USDe(USDE)$1.000.00%
  • litecoinLitecoin(LTC)$45.82-1.90%
  • Global DollarGlobal Dollar(USDG)$1.000.00%
  • hedera-hashgraphHedera(HBAR)$0.070040-1.10%
  • Circle USYCCircle USYC(USYC)$1.130.00%
  • suiSui(SUI)$0.71-5.00%
  • avalanche-2Avalanche(AVAX)$6.270.20%
  • paypal-usdPayPal USD(PYUSD)$1.000.00%
  • crypto-com-chainCronos(CRO)$0.056540-1.00%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • shiba-inuShiba Inu(SHIB)$0.0000041.10%
  • tether-goldTether Gold(XAUT)$4,048.74-0.10%
  • nearNEAR Protocol(NEAR)$1.79-6.60%
  • uniswapUniswap(UNI)$3.65-5.40%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.140.00%
  • OndoOndo(ONDO)$0.380234-4.80%
  • BittensorBittensor(TAO)$190.13-1.90%
  • pax-goldPAX Gold(PAXG)$4,046.24-0.10%
  • World Liberty FinancialWorld Liberty Financial(WLFI)$0.0562010.90%
  • okbOKB(OKB)$82.240.00%
  • AsterAster(ASTER)$0.62-0.40%
  • HTX DAOHTX DAO(HTX)$0.000002-1.20%
  • Ripple USDRipple USD(RLUSD)$1.000.00%
  • MemeCoreMemeCore(M)$1.192.30%
  • usddUSDD(USDD)$1.000.00%
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

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse

Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown

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

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse
AI & Technology

Building Self-Evolving AI Agents with OpenSpace Using Skills, MCP, Lineage, and Low-Cost Reuse

July 25, 2026
Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown
AI & Technology

Datalab Marker v2 vs MinerU, Docling, and Liteparse: Benchmark Breakdown

July 25, 2026
Datalab’s Marker 2 vs MinerU, Docling and LiteParse: 76.0 on olmOCR-bench at 5× MinerU’s Throughput
AI & Technology

Datalab’s Marker 2 vs MinerU, Docling and LiteParse: 76.0 on olmOCR-bench at 5× MinerU’s Throughput

July 25, 2026
Meta Has Pulled Out Of A Renewable Energy Initiative As It Relies More On Natural Gas For Data Centers
AI & Technology

Meta Has Pulled Out Of A Renewable Energy Initiative As It Relies More On Natural Gas For Data Centers

July 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
AI Concentration & the Case for Rebalancing

AI Concentration & the Case for Rebalancing

July 24, 2026
Money Market Account vs. Money Market Fund

Money Market Account vs. Money Market Fund

July 21, 2026
Mortgage Rates Rise To 6.77%, Highest In A Year, Driven By Bond Market Fears Of Inflation And Ballooning Debt

Mortgage Rates Rise To 6.77%, Highest In A Year, Driven By Bond Market Fears Of Inflation And Ballooning Debt

July 23, 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!