improve-architecture
Skill4 starsChanged 3 months agoMITView on GitHub
Periodically review and improve code architecture. Scan existing PRDs, find deepening opportunities and design debt based on domain language and decision records. Use for regular code health checks or proactive design debt cleanup. Trigger words: architecture, improve-architecture, 重构, 清理, 债务, 架构审查.
8 other projects use a version of this.
Adopted by
Most recently taken up by
- rohitg00/pro-workflowtheir own version, first seen Sep 29, 2026
- linhvu0711/skillstheir own version, first seen Sep 24, 2026
- svyatov/supermatttheir own version, first seen Sep 23, 2026
- a1f/agent-templatestheir own version, first seen Aug 4, 2026
- za4em/skillstheir own version, first seen Jun 8, 2026
- dallenpyrah/skillstheir own version, first seen May 20, 2026
Used with
Projects with it also use retro and commit.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AWSSkillretro
Conduct a retrospective on a coding session.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 3 projects that use this
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- rohitg00/pro-workflow★ 2.9ksame name
- Rune-kit/rune★ 88same name
- a1f/agent-templates★ 2same name
- dallenpyrah/skills★ 2same name
- svyatov/supermatt★ 2same name
- linhvu0711/skills★ 1same name
- PinkneyJiang/skills★ 1same name
- za4em/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Done when: All PRDs scanned, codebase analyzed, findings categorized with priorities and effort estimates
- Distinctive: line 19
Read available domain context before starting.
- Very specific: line 65
PRD Traceability: If findings link to a PRD, fill the Arch reviewed by field:
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Improve Architecture: Review and Improve Code Architecture
🥷 Periodically clean design debt, keep code healthy.
Outcome Contract
- Outcome: Architecture improvement report with findings, priorities, and PRD alignment analysis
- Done when: All PRDs scanned, codebase analyzed, findings categorized with priorities and effort estimates
- Evidence: Collected code patterns, PRD analysis, architecture alignment assessment
- Output: Structured report with blocking/high/medium priority findings
Prerequisites
Read available domain context before starting. If any are missing, proceed without them and note the limitation in the report:
CONTEXT.md— domain glossary (if missing: scan code naming conventions instead)docs/adr/— architecture decisions (if missing: no historical decisions to check against)docs/prd/*.md— product requirements (if missing: report focuses on code patterns only, no PRD alignment analysis)
Process Summary
Step 1: Apply the Skill Entry Protocol — it reads CONTEXT.md, ADRs, and PRDs. Code-level signals (duplication, coupling, long functions) don't strictly require domain context, so proceed even if docs are missing.
Step 2: Analyze current development direction — extract planned features, check compatibility with existing architecture
Step 3: Scan codebase using prioritized strategy — PRD-linked modules first, high-change-frequency modules next, cross-cutting concerns last. For each module, apply the objective detection heuristics in REFERENCE.md §Design Debt Signals (code duplication, long functions, tight coupling, mutable shared state, leaked/missing abstractions, shallow modules, god objects, dead code, speculative generality, message chains, deep inheritance, stub implementations, magic values, swallowed errors, repeated type dispatch — each tagged with the principle it detects, defined in ../rules/engineering-principles.md, and carrying a concrete grep/line-count threshold). Run the ADR compliance check (REFERENCE §3.3) against each ADR in docs/adr/.
Step 4: Analyze findings — categorize as blocking/high priority/medium priority with PRD links. Each finding must have specific location, evidence, and impact.
Step 5: Propose improvements — problem, suggestion, benefit, effort (Low/Medium/High with rationale), linked PRD
Step 6: Generate report — structured findings with next steps
See REFERENCE.md for scanning strategy, detection heuristics, ADR compliance procedure, and extended examples.
Gotchas
| What happened | Rule |
| Modify working code without verifying | Read and understand code before suggesting |
| Rename without improving structure | Deepen modules, don't just rename |
| Change too much at once | Small improvements, one at a time |
| Ignore domain language | Name based on CONTEXT.md terms |
| Violate historical ADR | Check ADRs, create new ADR if needed |
| Ignore PRD constraints | Check if improvement aligns with planned features |
| Introduce new concept without updating | Sync update to CONTEXT.md |
Output
Improve Architecture complete.
Scan scope: [PRDs: N, Code files: N, ADRs: N]
Alignment: [✅ N, ⚠️ N, ❌ N]
Findings: [Blocking: N, High: N, Medium: N]
Next: Review blocking issues → /story to decompose → /implement to orchestrate implementationPRD Traceability: If findings link to a PRD, fill the Arch reviewed by field:
- **Arch reviewed by**: `/improve-architecture` (<YYYY-MM-DD>) — <one-line finding + priority>Workflow Position
Independent periodic activity, not in main development flow:
New feature dev: think → grill → story → implement → review
Bug fix: debug → review (optional)
Independent periodic: improve-architecture (every 2-4 weeks)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

