Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/navraj007in/architecture-cowork-pluginWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/refactor-stack)<a href="https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/refactor-stack"><img src="https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/refactor-stack/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/navraj007in/architecture-cowork-plugin/refactor-stack"><img src="https://agentmods.dev/badge/commands/navraj007in/architecture-cowork-plugin/refactor-stack.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00019 | $0.03125 |
| Opus 5 | $0.00010 | $0.01563 |
| Sonnet 5 | $0.00004 | $0.00625 |
| Haiku 4.5 | $0.00002 | $0.00313 |
Grade A, and why
refactor-stack scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 369 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/architect:refactor-stack
Trigger
/architect:refactor-stack [change description]
Examples:
/architect:refactor-stack postgres to mongodb/architect:refactor-stack express to fastapi/architect:refactor-stack vercel to railway/architect:refactor-stack add postgres replica
Purpose
When an architecture component needs to change (database engine, framework, cloud provider, ORM), this command performs a coordinated refactor across the entire SDL. It rewrites all affected sections consistently, validates the new architecture against all 20+ SDL rules, flags what downstream artifacts need regeneration, and produces a detailed change report.
This prevents the fragmentation that happens when only a few SDL fields are updated without checking side effects.
Workflow
Quick Navigation
| Phase | Steps |
|---|---|
| Analysis | Step 1 · Step 2 · Step 3 |
| Validation | Step 4 |
| Execution | Step 5 · Step 6 |
| Completion | Step 7 · Step 8 · Step 9 |
Step 1: Read Existing SDL & Validate
Check for solution.sdl.yaml in the current working directory.
If absent, respond:
"No SDL found. Run
/architect:blueprintfirst to design your architecture, then come back to refactor it."
If present, read it in full (or if multi-file, read sdl/README.md then merge the modules).
Store the original SDL in memory for comparison after refactoring.
Step 2: Parse the Change Request
Extract what's being changed from the user's input. Use natural language understanding:
Change patterns to recognize:
| User Input | Parsed Change | Impact |
|---|---|---|
| "postgres to mongodb" | data.primaryDatabase.type: postgres → mongodb |
Database, ORM, entities, migrations |
| "add postgres read replica" | data.secondaryDatabases += { type: postgres, ... } |
Deployment, cost, replication config |
| "express to fastapi" | architecture.projects[].{framework, language, runtime} |
Backend service, ORM, migrations, deployment |
| "vercel to railway" | deployment.cloud: vercel → railway |
Deployment, CI/CD, regions, cost |
| "add elasticsearch" | data.search: { type: elasticsearch } |
Data architecture, integrations, deployment |
| "jwt to oauth2" | auth.strategy: jwt → oauth2 |
Auth, dependencies, integrations, complexity |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 369 lines · 19 tokens per session scan A 9222879d5f08
refactor-stack is a command published in the GitHub repository navraj007in/architecture-cowork-plugin (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 19 tokens to every session and 3,125 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other commands, from other repositories
psql-query
Run ad-hoc PostgreSQL analytics queries against dev/test database.
db
Load the DataFlow skill for zero-config database operations with automatic model-to-node generation.
db
A read-only database consultation command covering SQL Server, SQLite, and PostgreSQL, which are systems for storing structured application data.
db-enum
Enumerate/exploit a database — connect and read first, heavy brute only when justified.
sparc-supabase-admin
🔐 Supabase Admin - You are the Supabase database, authentication, and storage specialist. You design and implement d...
discover-database
Load database skills (PostgreSQL, MongoDB, Redis, optimization).