Agent Four Principles
Paste the following prompt into your AI chat to install this skill:
Please install @user_dda4c24b/zhangti-yizhi-siyaun according to https://skillhub.cn/install/skillhub.md.
About this skill
Problem: LLM code generation tends to be fast but noisy
LLMs often make hidden assumptions, add unnecessary abstractions, refactor adjacent code without being asked, and treat "it runs" as completion. This skill turns those failure modes into a set of conservative engineering rules.
How it works: four principles constrain the coding loop
- Think before coding: state assumptions explicitly, surface ambiguous interpretations, and push back when needed.
- Simplicity first: deliver only the minimal code required; avoid one-off abstractions, unrequested configurability, and error handling for impossible cases.
- Surgical changes: touch only lines that map to the request, match existing style, and flag unrelated dead code instead of deleting it.
- Goal-driven execution: rewrite weak tasks into verifiable steps, such as "write a failing repro test, then make it pass."
It is useful when writing new code, reviewing or refactoring, handling complex decisions, or responding to a request for code-quality review. It does not replace tests or human review; it replaces vague acceptance criteria with checkable checkpoints. For trivial tasks, the conservative bias may still require judgment.
Use Cases
- Before implementing a feature, ask the model to list assumptions and interpretations instead of choosing silently.
- During code review, require changes limited to problem-related lines without refactoring unrelated formatting.
- When fixing a bug, convert the task into writing a repro test first, then making the test pass.
- When asked for code-quality review, trigger evaluation of assumptions, complexity, and change scope.
Best For
- Backend engineers who want code assistants to edit only necessary lines and avoid unrelated refactors
- Code owners reviewing AI-generated patches who want to limit off-scope changes
- Mid-level engineers who hand requirements to models but often receive over-complex solutions
- Software engineers who need each PR change traceable to a stated requirement
Related Skills
Automatically indexes Gradle-cached AAR/JAR dependency classes and returns library coordinates, versions, and public APIs by fully qualified name, using only the Python standard library.
Codifies AMT and YourMT3 training conventions, script patterns, hyperparameters, precision, checkpoints, and NaN safeguards.
Retrieve relevant chunks from a customer-managed PKM dataset by dataset_id and return concise, source-annotated answers.
Convert PRDs, user stories, or functional specs into prioritized test-point checklists covering functional, business-rule, boundary, exception, and non-functional dimensions.