nix-coding-protocol
Original:🇨🇳 Chinese
Translated
Applicable to code-centric tasks such as coding, debug/debugging, bug fixing, refactor/refactoring, code review, scripting, automation, and implementation planning.
1installs
Sourceplimeor/agent-skills
Added on
NPX Install
npx skill4agent add plimeor/agent-skills nix-coding-protocolTags
Translated version includes tags in frontmatterSKILL.md Content (Chinese)
View Translation Comparison →Purpose
- Deliver correct, maintainable, minimal yet complete engineering results within the authorized scope.
- Reduce the risk of superficial fixes and incorrect modifications through "read first, write later".
- Prioritize fixing root causes over only addressing symptoms when supported by evidence.
Applicable Scenarios
- Bug fixing
- Feature implementation within existing codebases
- Refactoring directly related to code
- Code review / patch review
- Test updates strongly coupled with changes
- Automation, scripting, and engineering workflow modifications
- Technical diagnosis with code, logs, configurations, and tests as primary evidence
Inapplicable Scenarios
- Primary tasks involve knowledge base structure, note design, summary strategies, or document governance
- Primary tasks involve non-code work such as solution comparison, priority ranking, or strategic decision-making
- Primary tasks involve modifying AGENTS, SKILL, prompt architecture, or routing descriptions
Clarify Before Starting the Task
- Target outcome of the request
- Restrictions on tools, languages, dependencies, styles, files, and scope
- Definition of Done
- Whether there are existing frameworks / components / native system capabilities that can directly meet the Request
- Whether the user has explicitly excluded certain solutions, fallbacks, or enhancements
- Related files, interfaces, types, configurations, call points, tests, and local conventions
- Risk areas: compatibility, data, performance, security, deployment, and side effects
Workflow
1. Read First, Write Later
- Read first, then modify.
- At least check the minimal sufficient context required to avoid superficial fixes: related files, interfaces, types, configurations, call points, tests, and nearby conventions.
- Understand the local design intent before changing behavior.
- Do not finalize the patch strategy until key context is clear.
2. Diagnosis
- Distinguish between: symptoms, suspected causes, confirmed causes, selected fixes, and remaining uncertainties.
- Prioritize relying on code, logs, tests, and observed behavior rather than guesses.
- When understanding the system, first look at outputs, logs, code, bug fixes, PR/reviews, and decision traces, then look at PRDs, solutions, and second-hand summaries.
- If only "symptom fixing" can be justified at present, state this clearly.
3. Scope Control
- First answer: "If only the minimum changes are made, which changes are sufficient to solve the problem?"
- If existing frameworks, components, or native system capabilities are sufficient to meet the Request, reuse native capabilities by default instead of adding a second set of mechanisms.
- Do not proactively add custom states, fallback links, extra abstractions, or enhanced interactions for the sake of "being more complete", "more secure", or "convenient optimization".
- Clearly separate the main solution from optional enhancements; unsolicited enhancements must not be included in the main patch.
- Risks can be noted, but risk mitigation plans are only upgraded to implementation content when existing evidence indicates the main solution is insufficient.
- When the user explicitly says "don't do X", "only use Y", or "do phase 1 first", immediately remove any residual parts of the solution that do not meet the boundaries; do not keep them for completeness.
4. Patch Strategy
- Pursue "minimal coherent patches", not "minimal text changes".
- When the root cause is local and supported by sufficient evidence, prioritize fixing the root cause.
- Maintain existing conventions unless the Request requires changes.
- Avoid unnecessary abstractions, dependencies, configuration surfaces, file churn, and architectural drift.
- Do not silently escalate local issues into architectural overhauls.
- If small-scale cleanup can significantly improve correctness, maintainability, or readability, it can be done as a directly coupled change.
5. Verification
- Verify in the narrowest yet most effective way.
- Prioritize using existing tests when they can cover the changes.
- Only add or update tests when they are strongly coupled with the changes, can prevent regressions, or are explicitly required.
- Do not introduce large scaffolding for local changes unless it significantly improves correctness.
- Clearly report: what was verified and what was not.
- Never claim to have observed test results, runtime results, logs, benchmarks, or measurements that were not actually observed.
6. Risk Notification
Only notify of risks relevant to the Request, but do not conceal important risks:
- Compatibility and breaking behavior
- Migration or schema impacts
- Persistence and data integrity
- Performance and memory impacts
- Concurrency or async timing issues
- Security and permission impacts
- Observability or debugging impacts
- Deployment or rollout coupling
Output Requirements
Implementation Tasks
At minimum include:
- Specific code changes or executable patch plans
- Concise explanation: what was changed and why
- Verification status
- Related risks or unresolved issues
Implementation Planning Tasks
At minimum include:
- Minimal executable plan based on existing evidence
- Clear separation between the main solution and optional enhancements
- Explanation of why existing native capabilities are sufficient, or why current evidence does not support additional design
- Explicitly excluded solutions by the user are no longer included in the main plan
Debugging Tasks
At minimum include:
- Symptoms
- Cause judgment best supported by current evidence
- Selected fix or next diagnostic action
- Remaining uncertainties
Code Review Tasks
At minimum include:
- Must-fix issues prioritized
- Optional improvements separated individually
- Evidence for each key conclusion
Completion Criteria
- End-to-end processing of the requested engineering issue within the authorized scope.
- Changes meet the required thresholds for correctness, maintainability, and traceability for the current task.
- Verification status is clear.
- No unverified content is presented as observed facts.
Anti-Patterns
- Starting modifications without reviewing sufficient context
- Using minimal text changes instead of minimal coherent patches
- Silently expanding local fixes into architectural overhauls without authorization
- Adding a second set of mechanisms, fallback links, or custom states when existing native system capabilities are sufficient
- Mixing enhanced experiences, risk mitigation plans, or generalized abstractions into the phase 1 main solution
- Retaining "more complete" solution residuals after the user has explicitly tightened boundaries
- Fabricating test results, runtime results, or benchmarks
- Hiding breaking changes or side effects
- Piling up vague process comments in code tasks