code-engineering

Guides implementation, refactoring, and review of production code using structural design heuristics.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/UniverLab/univerlab --skill code-engineering-univerlab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-engineering
Source: https://github.com/UniverLab/univerlab/tree/main/public/.well-known/agent-skills/code-engineering
Command: npx skills add https://github.com/UniverLab/univerlab --skill code-engineering-univerlab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing code that merely works is easy; writing code that stays maintainable across multi-file changes, refactors, and reviews is hard. This Skill gives an AI agent a disciplined engineering framework so code changes match existing conventions, avoid speculative abstractions, and leave the codebase in a safer state. ## Core Features & Use Cases - Design Heuristics: Applies an ordered priority of Separation of Concerns, KISS, YAGNI, DRY, Fail Fast, and SOLID when tradeoffs appear during implementation. - Structured Debugging Model: Enforces reproduce-first debugging, reading actual errors, one-variable-per-attempt fixes, and tests that pin every resolved bug. - On-Demand References: Loads a clean-code checklist before finalizing structural changes and a design-pattern catalog only when a real pattern decision arises. - Use Case: When asked to refactor a tangled service module, the agent reads existing conventions first, makes coherent milestone-sized changes, applies guard clauses and fail-fast validation, and verifies with the project's own tests and formatters. ## Quick Start Ask the agent to refactor the payment module for better separation of concerns and have it validate the result with the project's existing test suite.

Frequently Asked Questions about code-engineering

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor legacy code without breaking existing behavior?

Read the existing codebase first to match its conventions, then make changes in logical milestones that can each be validated as a unit. If a milestone stays broken too long, reduce its scope instead of piling on more changes, and pin behavior with tests.

When should I apply a design pattern in my code?

Apply a pattern only when you have a recurring structural problem and the simplest approach creates maintenance issues. Avoid patterns when a plain function or conditional suffices, when only one implementation exists, or when the pattern adds more code than the problem warrants.

What is the best way to debug a bug I cannot reproduce?

Reproduce the failing case before reasoning about fixes, since an untriggerable bug cannot be verified as fixed. Then read the actual error and stack, walk upstream to the first divergence, and change one variable per attempt.

When should I not refactor code during a feature task?

Stop and ask when a refactor would materially expand scope beyond the request, when the architecture is inconsistent and forces a direction choice, or when the clean fix requires changing a public contract, schema, or shared abstraction.

How do I decide between abstraction and duplicated code?

Extract shared logic only when the duplication is truly the same decision repeated, following DRY as a lower priority than KISS and YAGNI. Do not build future-proof abstractions without a present use case, and never duplicate an abstraction that already exists in another layer.